- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateLocationS3Command
Modifies the following configuration parameters of the Amazon S3 transfer location that you're using with DataSync.
Before you begin, make sure that you read the following topics:
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataSyncClient, UpdateLocationS3Command } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, UpdateLocationS3Command } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // UpdateLocationS3Request
LocationArn: "STRING_VALUE", // required
Subdirectory: "STRING_VALUE",
S3StorageClass: "STANDARD" || "STANDARD_IA" || "ONEZONE_IA" || "INTELLIGENT_TIERING" || "GLACIER" || "DEEP_ARCHIVE" || "OUTPOSTS" || "GLACIER_INSTANT_RETRIEVAL",
S3Config: { // S3Config
BucketAccessRoleArn: "STRING_VALUE", // required
},
};
const command = new UpdateLocationS3Command(input);
const response = await client.send(command);
// {};
UpdateLocationS3Command Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
LocationArn Required | string | undefined | Specifies the Amazon Resource Name (ARN) of the Amazon S3 transfer location that you're updating. |
S3Config | S3Config | undefined | Specifies the Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that DataSync uses to access your S3 bucket. For more information, see Providing DataSync access to S3 buckets . |
S3StorageClass | S3StorageClass | undefined | Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination. For buckets in Amazon Web Services Regions, the storage class defaults to For more information, see Storage class considerations with Amazon S3 transfers . |
Subdirectory | string | undefined | Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location). DataSync can't transfer objects with a prefix that begins with a slash (
|
UpdateLocationS3Command Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalException | server | This exception is thrown when an error occurs in the DataSync service. |
InvalidRequestException | client | This exception is thrown when the client submits a malformed request. |
DataSyncServiceException | Base exception class for all service exceptions from DataSync service. |