Skip to content

update_location_smb

update_location_smb(
    location_arn: LocationArn,
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
    subdirectory: Optional[SmbSubdirectory] = None,
    server_hostname: Optional[ServerHostname] = None,
    user: Optional[SmbUser] = None,
    domain: Optional[SmbDomain] = None,
    password: Optional[SmbPassword] = None,
    cmk_secret_config: Optional[CmkSecretConfig] = None,
    custom_secret_config: Optional[CustomSecretConfig] = None,
    agent_arns: Optional[AgentArnList] = None,
    mount_options: Optional[SmbMountOptions] = None,
    authentication_type: Optional[SmbAuthenticationType] = None,
    dns_ip_addresses: Optional[DnsIpList] = None,
    kerberos_principal: Optional[KerberosPrincipal] = None,
    kerberos_keytab: Optional[KerberosKeytabFile] = None,
    kerberos_krb5_conf: Optional[KerberosKrb5ConfFile] = None,
) -> UpdateLocationSmbResponse

Modifies the following configuration parameters of the Server Message Block (SMB) transfer location that you're using with DataSync.

For more information, see Configuring DataSync transfers with an SMB file server.

Parameters:

  • location_arn (LocationArn) –

    Specifies the ARN of the SMB location that you want to update.

  • subdirectory (Optional[SmbSubdirectory], default: None ) –

    Specifies the name of the share exported by your SMB file server where DataSync will read or write data. You can include a subdirectory in the share path (for example, /path/to/subdirectory). Make sure that other SMB clients in your network can also mount this path.

    To copy all data in the specified subdirectory, DataSync must be able to mount the SMB share and access all of its data. For more information, see Providing DataSync access to SMB file servers.

  • server_hostname (Optional[ServerHostname], default: None ) –

    Specifies the domain name or IP address (IPv4 or IPv6) of the SMB file server that your DataSync agent connects to.

    If you're using Kerberos authentication, you must specify a domain name.

  • user (Optional[SmbUser], default: None ) –

    Specifies the user name that can mount your SMB file server and has permission to access the files and folders involved in your transfer. This parameter applies only if AuthenticationType is set to NTLM.

    For information about choosing a user with the right level of access for your transfer, see Providing DataSync access to SMB file servers.

  • domain (Optional[SmbDomain], default: None ) –

    Specifies the Windows domain name that your SMB file server belongs to. This parameter applies only if AuthenticationType is set to NTLM.

    If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right file server.

  • password (Optional[SmbPassword], default: None ) –

    Specifies the password of the user who can mount your SMB file server and has permission to access the files and folders involved in your transfer. This parameter applies only if AuthenticationType is set to NTLM.

  • cmk_secret_config (Optional[CmkSecretConfig], default: None ) –

    Specifies configuration information for a DataSync-managed secret, such as a Password or KerberosKeytab or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.

  • custom_secret_config (Optional[CustomSecretConfig], default: None ) –

    Specifies configuration information for a customer-managed secret, such as a Password or KerberosKeytab or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed Identity and Access Management (IAM) role that provides access to the secret.

  • agent_arns (Optional[AgentArnList], default: None ) –

    Specifies the DataSync agent (or agents) that can connect to your SMB file server. You specify an agent by using its Amazon Resource Name (ARN).

  • authentication_type (Optional[SmbAuthenticationType], default: None ) –

    Specifies the authentication protocol that DataSync uses to connect to your SMB file server. DataSync supports NTLM (default) and KERBEROS authentication.

    For more information, see Providing DataSync access to SMB file servers.

  • dns_ip_addresses (Optional[DnsIpList], default: None ) –

    Specifies the IP addresses (IPv4 or IPv6) for the DNS servers that your SMB file server belongs to. This parameter applies only if AuthenticationType is set to KERBEROS.

    If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right SMB file server.

  • kerberos_principal (Optional[KerberosPrincipal], default: None ) –

    Specifies a Kerberos prinicpal, which is an identity in your Kerberos realm that has permission to access the files, folders, and file metadata in your SMB file server.

    A Kerberos principal might look like HOST/[email protected].

    Principal names are case sensitive. Your DataSync task execution will fail if the principal that you specify for this parameter doesn’t exactly match the principal that you use to create the keytab file.

  • kerberos_keytab (Optional[KerberosKeytabFile], default: None ) –

    Specifies your Kerberos key table (keytab) file, which includes mappings between your Kerberos principal and encryption keys.

    To avoid task execution errors, make sure that the Kerberos principal that you use to create the keytab file matches exactly what you specify for KerberosPrincipal.

  • kerberos_krb5_conf (Optional[KerberosKrb5ConfFile], default: None ) –

    Specifies a Kerberos configuration file (krb5.conf) that defines your Kerberos realm configuration.

    The file must be base64 encoded. If you're using the CLI, the encoding is done for you.

Raises:

Source code in docs_src/capo_datasync/_services/data_sync.py
def update_location_smb(
    self,
    location_arn: "capo_datasync.types.location_arn.LocationArn",
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
    subdirectory: Optional[
        "capo_datasync.types.smb_subdirectory.SmbSubdirectory"
    ] = None,
    server_hostname: Optional[
        "capo_datasync.types.server_hostname.ServerHostname"
    ] = None,
    user: Optional["capo_datasync.types.smb_user.SmbUser"] = None,
    domain: Optional["capo_datasync.types.smb_domain.SmbDomain"] = None,
    password: Optional["capo_datasync.types.smb_password.SmbPassword"] = None,
    cmk_secret_config: Optional[
        "capo_datasync.types.cmk_secret_config.CmkSecretConfig"
    ] = None,
    custom_secret_config: Optional[
        "capo_datasync.types.custom_secret_config.CustomSecretConfig"
    ] = None,
    agent_arns: Optional["capo_datasync.types.agent_arn_list.AgentArnList"] = None,
    mount_options: Optional[
        "capo_datasync.types.smb_mount_options.SmbMountOptions"
    ] = None,
    authentication_type: Optional[
        "capo_datasync.types.smb_authentication_type.SmbAuthenticationType"
    ] = None,
    dns_ip_addresses: Optional["capo_datasync.types.dns_ip_list.DnsIpList"] = None,
    kerberos_principal: Optional[
        "capo_datasync.types.kerberos_principal.KerberosPrincipal"
    ] = None,
    kerberos_keytab: Optional[
        "capo_datasync.types.kerberos_keytab_file.KerberosKeytabFile"
    ] = None,
    kerberos_krb5_conf: Optional[
        "capo_datasync.types.kerberos_krb5_conf_file.KerberosKrb5ConfFile"
    ] = None,
) -> "capo_datasync.types.update_location_smb_response.UpdateLocationSmbResponse":
    """<p>Modifies the following configuration parameters of the Server Message Block (SMB) transfer location that you're using with DataSync.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html">Configuring DataSync transfers with an SMB file server</a>.</p>

    Args:
        location_arn: <p>Specifies the ARN of the SMB location that you want to update.</p>
        subdirectory: <p>Specifies the name of the share exported by your SMB file server where DataSync will read or write data. You can include a subdirectory in the share path (for example, <code>/path/to/subdirectory</code>). Make sure that other SMB clients in your network can also mount this path.</p> <p>To copy all data in the specified subdirectory, DataSync must be able to mount the SMB share and access all of its data. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing DataSync access to SMB file servers</a>.</p>
        server_hostname: <p>Specifies the domain name or IP address (IPv4 or IPv6) of the SMB file server that your DataSync agent connects to.</p> <note> <p>If you're using Kerberos authentication, you must specify a domain name.</p> </note>
        user: <p>Specifies the user name that can mount your SMB file server and has permission to access the files and folders involved in your transfer. This parameter applies only if <code>AuthenticationType</code> is set to <code>NTLM</code>.</p> <p>For information about choosing a user with the right level of access for your transfer, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing DataSync access to SMB file servers</a>.</p>
        domain: <p>Specifies the Windows domain name that your SMB file server belongs to. This parameter applies only if <code>AuthenticationType</code> is set to <code>NTLM</code>.</p> <p>If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right file server.</p>
        password: <p>Specifies the password of the user who can mount your SMB file server and has permission to access the files and folders involved in your transfer. This parameter applies only if <code>AuthenticationType</code> is set to <code>NTLM</code>.</p>
        cmk_secret_config: <p>Specifies configuration information for a DataSync-managed secret, such as a <code>Password</code> or <code>KerberosKeytab</code> or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.</p>
        custom_secret_config: <p>Specifies configuration information for a customer-managed secret, such as a <code>Password</code> or <code>KerberosKeytab</code> or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed Identity and Access Management (IAM) role that provides access to the secret.</p>
        agent_arns: <p>Specifies the DataSync agent (or agents) that can connect to your SMB file server. You specify an agent by using its Amazon Resource Name (ARN).</p>
        authentication_type: <p>Specifies the authentication protocol that DataSync uses to connect to your SMB file server. DataSync supports <code>NTLM</code> (default) and <code>KERBEROS</code> authentication.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing DataSync access to SMB file servers</a>.</p>
        dns_ip_addresses: <p>Specifies the IP addresses (IPv4 or IPv6) for the DNS servers that your SMB file server belongs to. This parameter applies only if <code>AuthenticationType</code> is set to <code>KERBEROS</code>.</p> <p>If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right SMB file server. </p>
        kerberos_principal: <p>Specifies a Kerberos prinicpal, which is an identity in your Kerberos realm that has permission to access the files, folders, and file metadata in your SMB file server.</p> <p>A Kerberos principal might look like <code>HOST/[email protected]</code>.</p> <p>Principal names are case sensitive. Your DataSync task execution will fail if the principal that you specify for this parameter doesn’t exactly match the principal that you use to create the keytab file.</p>
        kerberos_keytab: <p>Specifies your Kerberos key table (keytab) file, which includes mappings between your Kerberos principal and encryption keys.</p> <p>To avoid task execution errors, make sure that the Kerberos principal that you use to create the keytab file matches exactly what you specify for <code>KerberosPrincipal</code>.</p>
        kerberos_krb5_conf: <p>Specifies a Kerberos configuration file (<code>krb5.conf</code>) that defines your Kerberos realm configuration.</p> <p>The file must be base64 encoded. If you're using the CLI, the encoding is done for you.</p>

    Raises:
        capo_datasync.errors.internal_exception.InternalException: <p>This exception is thrown when an error occurs in the DataSync service.</p>
        capo_datasync.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
        capo_datasync.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datasync.types.update_location_smb_request.UpdateLocationSmbRequest]",
    ) -> OperationResponse[
        "capo_datasync.types.update_location_smb_response.UpdateLocationSmbResponse"
    ]:
        import capo_datasync._operations.fmrs_service.update_location_smb

        output, http_response = (
            capo_datasync._operations.fmrs_service.update_location_smb.update_location_smb(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_datasync.types.update_location_smb_request.UpdateLocationSmbRequest",
    ) -> dict[str, Any]:
        import capo_datasync.types.update_location_smb_request

        return capo_datasync.types.update_location_smb_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateLocationSmb", redact_input=_redact_input),
    )
    input_: capo_datasync.types.update_location_smb_request.UpdateLocationSmbRequest = {
        "location_arn": location_arn
    }
    if subdirectory is not None:
        input_["subdirectory"] = subdirectory
    if server_hostname is not None:
        input_["server_hostname"] = server_hostname
    if user is not None:
        input_["user"] = user
    if domain is not None:
        input_["domain"] = domain
    if password is not None:
        input_["password"] = password
    if cmk_secret_config is not None:
        input_["cmk_secret_config"] = cmk_secret_config
    if custom_secret_config is not None:
        input_["custom_secret_config"] = custom_secret_config
    if agent_arns is not None:
        input_["agent_arns"] = agent_arns
    if mount_options is not None:
        input_["mount_options"] = mount_options
    if authentication_type is not None:
        input_["authentication_type"] = authentication_type
    if dns_ip_addresses is not None:
        input_["dns_ip_addresses"] = dns_ip_addresses
    if kerberos_principal is not None:
        input_["kerberos_principal"] = kerberos_principal
    if kerberos_keytab is not None:
        input_["kerberos_keytab"] = kerberos_keytab
    if kerberos_krb5_conf is not None:
        input_["kerberos_krb5_conf"] = kerberos_krb5_conf

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output