CfnLocationS3Props Struct
Properties for defining a CfnLocationS3.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_datasync as datasync } from 'aws-cdk-lib';
const cfnLocationS3Props: datasync.CfnLocationS3Props = {
s3Config: {
bucketAccessRoleArn: 'bucketAccessRoleArn',
},
// the properties below are optional
s3BucketArn: 's3BucketArn',
s3StorageClass: 's3StorageClass',
subdirectory: 'subdirectory',
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_datasync as datasync
cfn_location_s3_props = datasync.CfnLocationS3Props(
s3_config=datasync.CfnLocationS3.S3ConfigProperty(
bucket_access_role_arn="bucketAccessRoleArn"
),
# the properties below are optional
s3_bucket_arn="s3BucketArn",
s3_storage_class="s3StorageClass",
subdirectory="subdirectory",
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.datasync.*;
CfnLocationS3Props cfnLocationS3Props = CfnLocationS3Props.builder()
.s3Config(S3ConfigProperty.builder()
.bucketAccessRoleArn("bucketAccessRoleArn")
.build())
// the properties below are optional
.s3BucketArn("s3BucketArn")
.s3StorageClass("s3StorageClass")
.subdirectory("subdirectory")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DataSync;
var cfnLocationS3Props = new CfnLocationS3Props {
S3Config = new S3ConfigProperty {
BucketAccessRoleArn = "bucketAccessRoleArn"
},
// the properties below are optional
S3BucketArn = "s3BucketArn",
S3StorageClass = "s3StorageClass",
Subdirectory = "subdirectory",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnLocationS3Props := &CfnLocationS3Props{
S3Config: &S3ConfigProperty{
BucketAccessRoleArn: jsii.String("bucketAccessRoleArn"),
},
// the properties below are optional
S3BucketArn: jsii.String("s3BucketArn"),
S3StorageClass: jsii.String("s3StorageClass"),
Subdirectory: jsii.String("subdirectory"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
s3BucketArnoptionalstring | IBucketRefs3_bucket_arnoptionaltyping.Union[str, IBucketRef]s3BucketArnoptionalStringS3BucketArnoptionalstringS3BucketArnoptionalinterface{} #The ARN of the Amazon S3 bucket.
s3ConfigIResolvable | CfnLocationS3.S3ConfigPropertys3_configtyping.Union[IResolvable, S3ConfigProperty]s3ConfigIResolvableS3ConfigIResolvableS3Configinterface{} required #The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that is used to access an Amazon S3 bucket.
For detailed information about using such a role, see Creating a Location for Amazon S3 in the AWS DataSync User Guide .
s3StorageClassoptionalstrings3_storage_classoptionalstrs3StorageClassoptionalStringS3StorageClassoptionalstringS3StorageClassoptional*string = "STANDARD" #The Amazon S3 storage class that you want to store your files in when this location is used as a task destination.
notes
For buckets in AWS Regions , the storage class defaults to S3 Standard.
For more information about S3 storage classes, see Amazon S3 Storage Classes . Some storage classes have behaviors that can affect your S3 storage costs. For detailed information, see Considerations When Working with Amazon S3 Storage Classes in DataSync .
subdirectoryoptionalstringsubdirectoryoptionalstrsubdirectoryoptionalStringSubdirectoryoptionalstringSubdirectoryoptional*string #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:
/photosphotos//2006/Januaryphotos/./2006/Februaryphotos/../2006/March