UpdateLocationSmb - AWS DataSync

On December 7, 2023, we discontinued version 1 DataSync agents. Check the Agents page on the DataSync console to see if you have affected agents. If you do, replace those agents or delete them if they aren't in use. If you need more help, contact AWS Support.

UpdateLocationSmb

Updates some of the parameters of a Server Message Block (SMB) file server location that you can use for AWS DataSync transfers.

Request Syntax

{ "AgentArns": [ "string" ], "Domain": "string", "LocationArn": "string", "MountOptions": { "Version": "string" }, "Password": "string", "Subdirectory": "string", "User": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

AgentArns

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

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 4 items.

Length Constraints: Maximum length of 128.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$

Required: No

Domain

Specifies the Windows domain name that your SMB file server belongs to.

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

For more information, see required permissions for SMB locations.

Type: String

Length Constraints: Maximum length of 253.

Pattern: ^[A-Za-z0-9]((\.|-+)?[A-Za-z0-9]){0,252}$

Required: No

LocationArn

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

Type: String

Length Constraints: Maximum length of 128.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$

Required: Yes

MountOptions

Specifies the version of the Server Message Block (SMB) protocol that AWS DataSync uses to access an SMB file server.

Type: SmbMountOptions object

Required: No

Password

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.

For more information, see required permissions for SMB locations.

Type: String

Length Constraints: Maximum length of 104.

Pattern: ^.{0,104}$

Required: No

Subdirectory

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 required permissions for SMB locations.

Type: String

Length Constraints: Maximum length of 4096.

Pattern: ^[a-zA-Z0-9_\-\+\./\(\)\$\p{Zs}]+$

Required: No

User

Specifies the user name that can mount your SMB file server and has permission to access the files and folders involved in your transfer.

For information about choosing a user with the right level of access for your transfer, see required permissions for SMB locations.

Type: String

Length Constraints: Maximum length of 104.

Pattern: ^[^\x5B\x5D\\/:;|=,+*?]{1,104}$

Required: No

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalException

This exception is thrown when an error occurs in the AWS DataSync service.

HTTP Status Code: 500

InvalidRequestException

This exception is thrown when the client submits a malformed request.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: