create_location_s3
async
¶
create_location_s3(
s3_bucket_arn: S3BucketArn,
s3_config: S3Config,
*,
config_overrides: Optional[AsyncDataSyncClientConfig] = None,
subdirectory: Optional[S3Subdirectory] = None,
s3_storage_class: Optional[S3StorageClass] = None,
agent_arns: Optional[AgentArnList] = None,
tags: Optional[InputTagList] = None,
) -> CreateLocationS3Response
Creates a transfer location for an Amazon S3 bucket. DataSync can use this location as a source or destination for transferring data.
Before you begin, make sure that you read the following topics:
For more information, see Configuring transfers with Amazon S3.
Parameters:
-
subdirectory(Optional[S3Subdirectory], default:None) –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 (
/) or includes//,/./, or/../patterns. For example:-
/photos -
photos//2006/January -
photos/./2006/February -
photos/../2006/March
-
-
s3_bucket_arn(S3BucketArn) –Specifies the ARN of the S3 bucket that you want to use as a location. (When creating your DataSync task later, you specify whether this location is a transfer source or destination.)
If your S3 bucket is located on an Outposts resource, you must specify an Amazon S3 access point. For more information, see Managing data access with Amazon S3 access points in the Amazon S3 User Guide.
-
s3_storage_class(Optional[S3StorageClass], default:None) –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
STANDARD. For buckets on Outposts, the storage class defaults toOUTPOSTS.For more information, see Storage class considerations with Amazon S3 transfers.
-
agent_arns(Optional[AgentArnList], default:None) –(Amazon S3 on Outposts only) Specifies the Amazon Resource Name (ARN) of the DataSync agent on your Outpost.
For more information, see Deploy your DataSync agent on Outposts.
-
tags(Optional[InputTagList], default:None) –Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your transfer location.
Raises:
-
InternalException–This exception is thrown when an error occurs in the DataSync service.
-
InvalidRequestException–This exception is thrown when the client submits a malformed request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_datasync/_services/async_data_sync.py
1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 | |