@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:48.150Z")
public interface BucketDeploymentProps
Example:
Bucket websiteBucket; BucketDeployment deployment = BucketDeployment.Builder.create(this, "DeployWebsite") .sources(List.of(Source.asset(join(__dirname, "my-website")))) .destinationBucket(websiteBucket) .build(); new ConstructThatReadsFromTheBucket(this, "Consumer", Map.of( // Use 'deployment.deployedBucket' instead of 'websiteBucket' here "bucket", deployment.getDeployedBucket()));
Modifier and Type | Interface and Description |
---|---|
static class |
BucketDeploymentProps.Builder
A builder for
BucketDeploymentProps |
static class |
BucketDeploymentProps.Jsii$Proxy
An implementation for
BucketDeploymentProps |
Modifier and Type | Method and Description |
---|---|
static BucketDeploymentProps.Builder |
builder() |
default BucketAccessControl |
getAccessControl()
System-defined x-amz-acl metadata to be set on all objects in the deployment.
|
default java.util.List<CacheControl> |
getCacheControl()
System-defined cache-control metadata to be set on all objects in the deployment.
|
default java.lang.String |
getContentDisposition()
System-defined cache-disposition metadata to be set on all objects in the deployment.
|
default java.lang.String |
getContentEncoding()
System-defined content-encoding metadata to be set on all objects in the deployment.
|
default java.lang.String |
getContentLanguage()
System-defined content-language metadata to be set on all objects in the deployment.
|
default java.lang.String |
getContentType()
System-defined content-type metadata to be set on all objects in the deployment.
|
IBucket |
getDestinationBucket()
The S3 bucket to sync the contents of the zip file to.
|
default java.lang.String |
getDestinationKeyPrefix()
Key prefix in the destination bucket.
|
default IDistribution |
getDistribution()
The CloudFront distribution using the destination bucket as an origin.
|
default java.util.List<java.lang.String> |
getDistributionPaths()
The file paths to invalidate in the CloudFront distribution.
|
default Size |
getEphemeralStorageSize()
The size of the AWS Lambda function’s /tmp directory in MiB.
|
default java.util.List<java.lang.String> |
getExclude()
If this is set, matching files or objects will be excluded from the deployment's sync command.
|
default Expiration |
getExpires()
System-defined expires metadata to be set on all objects in the deployment.
|
default java.util.List<java.lang.String> |
getInclude()
If this is set, matching files or objects will be included with the deployment's sync command.
|
default RetentionDays |
getLogRetention()
The number of days that the lambda function's log events are kept in CloudWatch Logs.
|
default java.lang.Number |
getMemoryLimit()
The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket.
|
default UserDefinedObjectMetadata |
getMetadata()
User-defined object metadata to be set on all objects in the deployment.
|
default java.lang.Boolean |
getPrune()
If this is set to false, files in the destination bucket that do not exist in the asset, will NOT be deleted during deployment (create/update).
|
default java.lang.Boolean |
getRetainOnDelete()
If this is set to "false", the destination files will be deleted when the resource is deleted or the destination is updated.
|
default IRole |
getRole()
Execution role associated with this function.
|
default ServerSideEncryption |
getServerSideEncryption()
System-defined x-amz-server-side-encryption metadata to be set on all objects in the deployment.
|
default java.lang.String |
getServerSideEncryptionAwsKmsKeyId()
System-defined x-amz-server-side-encryption-aws-kms-key-id metadata to be set on all objects in the deployment.
|
default java.lang.String |
getServerSideEncryptionCustomerAlgorithm()
System-defined x-amz-server-side-encryption-customer-algorithm metadata to be set on all objects in the deployment.
|
java.util.List<ISource> |
getSources()
The sources from which to deploy the contents of this bucket.
|
default StorageClass |
getStorageClass()
System-defined x-amz-storage-class metadata to be set on all objects in the deployment.
|
default java.lang.Boolean |
getUseEfs()
Mount an EFS file system.
|
default IVpc |
getVpc()
The VPC network to place the deployment lambda handler in.
|
default SubnetSelection |
getVpcSubnets()
Where in the VPC to place the deployment lambda handler.
|
default java.lang.String |
getWebsiteRedirectLocation()
System-defined x-amz-website-redirect-location metadata to be set on all objects in the deployment.
|
IBucket getDestinationBucket()
java.util.List<ISource> getSources()
default BucketAccessControl getAccessControl()
Default: - Not set.
default java.util.List<CacheControl> getCacheControl()
Default: - Not set.
default java.lang.String getContentDisposition()
Default: - Not set.
default java.lang.String getContentEncoding()
Default: - Not set.
default java.lang.String getContentLanguage()
Default: - Not set.
default java.lang.String getContentType()
Default: - Not set.
default java.lang.String getDestinationKeyPrefix()
Must be <=104 characters
Default: "/" (unzip to root of the destination bucket)
default IDistribution getDistribution()
Files in the distribution's edge caches will be invalidated after files are uploaded to the destination bucket.
Default: - No invalidation occurs
default java.util.List<java.lang.String> getDistributionPaths()
Default: - All files under the destination bucket key prefix will be invalidated.
default Size getEphemeralStorageSize()
Default: 512 MiB
default java.util.List<java.lang.String> getExclude()
This can be used to exclude a file from being pruned in the destination bucket.
If you want to just exclude files from the deployment package (which excludes these files
evaluated when invalidating the asset), you should leverage the exclude
property of
AssetOptions
when defining your source.
Default: - No exclude filters are used
default Expiration getExpires()
Default: - The objects in the distribution will not expire.
default java.util.List<java.lang.String> getInclude()
Since all files from the deployment package are included by default, this property
is usually leveraged alongside an exclude
filter.
Default: - No include filters are used and all files are included with the sync command
default RetentionDays getLogRetention()
Default: logs.RetentionDays.INFINITE
default java.lang.Number getMemoryLimit()
If you are deploying large files, you will need to increase this number accordingly.
Default: 128
default UserDefinedObjectMetadata getMetadata()
Default: - No user metadata is set
default java.lang.Boolean getPrune()
Default: true
default java.lang.Boolean getRetainOnDelete()
NOTICE: Configuring this to "false" might have operational implications. Please visit to the package documentation referred below to make sure you fully understand those implications.
Default: true - when resource is deleted/updated, files are retained
default IRole getRole()
Default: - A role is automatically created
default ServerSideEncryption getServerSideEncryption()
Default: - Server side encryption is not used.
default java.lang.String getServerSideEncryptionAwsKmsKeyId()
Default: - Not set.
default java.lang.String getServerSideEncryptionCustomerAlgorithm()
Warning: This is not a useful parameter until this bug is fixed: https://github.com/aws/aws-cdk/issues/6080
Default: - Not set.
default StorageClass getStorageClass()
Default: - Default storage-class for the bucket is used.
default java.lang.Boolean getUseEfs()
Enable this if your assets are large and you encounter disk space errors. Enabling this option will require a VPC to be specified.
Default: - No EFS. Lambda has access only to 512MB of disk space.
default IVpc getVpc()
This is required if useEfs
is set.
Default: None
default SubnetSelection getVpcSubnets()
Only used if 'vpc' is supplied.
Default: - the Vpc default strategy if not specified
default java.lang.String getWebsiteRedirectLocation()
Default: - No website redirection.
static BucketDeploymentProps.Builder builder()
BucketDeploymentProps.Builder
of BucketDeploymentProps