Class: AWSCDK::S3Deployment::BucketDeploymentProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3Deployment::BucketDeploymentProps
- Defined in:
- s3_deployment/bucket_deployment_props.rb
Overview
Properties for BucketDeployment.
Instance Attribute Summary collapse
-
#access_control ⇒ AWSCDK::S3::BucketAccessControl?
readonly
System-defined x-amz-acl metadata to be set on all objects in the deployment.
-
#cache_control ⇒ Array<AWSCDK::S3Deployment::CacheControl>?
readonly
System-defined cache-control metadata to be set on all objects in the deployment.
-
#content_disposition ⇒ String?
readonly
System-defined cache-disposition metadata to be set on all objects in the deployment.
-
#content_encoding ⇒ String?
readonly
System-defined content-encoding metadata to be set on all objects in the deployment.
-
#content_language ⇒ String?
readonly
System-defined content-language metadata to be set on all objects in the deployment.
-
#content_type ⇒ String?
readonly
System-defined content-type metadata to be set on all objects in the deployment.
-
#destination_bucket ⇒ AWSCDK::S3::IBucket
readonly
The S3 bucket to sync the contents of the zip file to.
-
#destination_key_prefix ⇒ String?
readonly
Key prefix in the destination bucket.
-
#distribution ⇒ AWSCDK::Interfaces::AWSCloudfront::IDistributionRef?
readonly
The CloudFront distribution using the destination bucket as an origin.
-
#distribution_paths ⇒ Array<String>?
readonly
The file paths to invalidate in the CloudFront distribution.
-
#ephemeral_storage_size ⇒ AWSCDK::Size?
readonly
The size of the AWS Lambda function’s /tmp directory in MiB.
-
#exclude ⇒ Array<String>?
readonly
If this is set, matching files or objects will be excluded from the deployment's sync command.
-
#expires ⇒ AWSCDK::Expiration?
readonly
System-defined expires metadata to be set on all objects in the deployment.
-
#extract ⇒ Boolean?
readonly
If this is set, the zip file will be synced to the destination S3 bucket and extracted.
-
#include ⇒ Array<String>?
readonly
If this is set, matching files or objects will be included with the deployment's sync command.
-
#log_group ⇒ AWSCDK::Interfaces::AWSLogs::ILogGroupRef?
readonly
The Log Group used for logging of events emitted by the custom resource's lambda function.
-
#log_retention ⇒ AWSCDK::Logs::RetentionDays?
readonly
The number of days that the lambda function's log events are kept in CloudWatch Logs.
-
#memory_limit ⇒ Numeric?
readonly
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.
-
#metadata ⇒ Hash{String => String}?
readonly
User-defined object metadata to be set on all objects in the deployment.
-
#output_object_keys ⇒ Boolean?
readonly
If set to false, the custom resource will not send back the SourceObjectKeys.
-
#prune ⇒ Boolean?
readonly
By default, files in the destination bucket that don't exist in the source will be deleted when the BucketDeployment resource is created or updated.
-
#retain_on_delete ⇒ Boolean?
readonly
If this is set to "false", the destination files will be deleted when the resource is deleted or the destination is updated.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
Execution role associated with this function.
-
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>?
readonly
The list of security groups to associate with the lambda handlers network interfaces.
-
#server_side_encryption ⇒ AWSCDK::S3Deployment::ServerSideEncryption?
readonly
System-defined x-amz-server-side-encryption metadata to be set on all objects in the deployment.
-
#server_side_encryption_aws_kms_key_id ⇒ String?
readonly
System-defined x-amz-server-side-encryption-aws-kms-key-id metadata to be set on all objects in the deployment.
-
#server_side_encryption_customer_algorithm ⇒ String?
readonly
System-defined x-amz-server-side-encryption-customer-algorithm metadata to be set on all objects in the deployment.
-
#sign_content ⇒ Boolean?
readonly
If set to true, uploads will precompute the value of
x-amz-content-sha256and include it in the signed S3 request headers. -
#sources ⇒ Array<AWSCDK::S3Deployment::ISource>
readonly
The sources from which to deploy the contents of this bucket.
-
#storage_class ⇒ AWSCDK::S3Deployment::StorageClass?
readonly
System-defined x-amz-storage-class metadata to be set on all objects in the deployment.
-
#use_efs ⇒ Boolean?
readonly
Mount an EFS file system.
-
#vpc ⇒ AWSCDK::EC2::IVPC?
readonly
The VPC network to place the deployment lambda handler in.
-
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Where in the VPC to place the deployment lambda handler.
-
#wait_for_distribution_invalidation ⇒ Boolean?
readonly
In case of using a cloudfront distribution, if this property is set to false then the custom resource will not wait and verify for Cloudfront invalidation to complete.
-
#website_redirect_location ⇒ String?
readonly
System-defined x-amz-website-redirect-location metadata to be set on all objects in the deployment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(destination_bucket:, sources:, access_control: nil, cache_control: nil, content_disposition: nil, content_encoding: nil, content_language: nil, content_type: nil, destination_key_prefix: nil, distribution: nil, distribution_paths: nil, ephemeral_storage_size: nil, exclude: nil, expires: nil, extract: nil, include: nil, log_group: nil, log_retention: nil, memory_limit: nil, metadata: nil, output_object_keys: nil, prune: nil, retain_on_delete: nil, role: nil, security_groups: nil, server_side_encryption: nil, server_side_encryption_aws_kms_key_id: nil, server_side_encryption_customer_algorithm: nil, sign_content: nil, storage_class: nil, use_efs: nil, vpc: nil, vpc_subnets: nil, wait_for_distribution_invalidation: nil, website_redirect_location: nil) ⇒ BucketDeploymentProps
constructor
A new instance of BucketDeploymentProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(destination_bucket:, sources:, access_control: nil, cache_control: nil, content_disposition: nil, content_encoding: nil, content_language: nil, content_type: nil, destination_key_prefix: nil, distribution: nil, distribution_paths: nil, ephemeral_storage_size: nil, exclude: nil, expires: nil, extract: nil, include: nil, log_group: nil, log_retention: nil, memory_limit: nil, metadata: nil, output_object_keys: nil, prune: nil, retain_on_delete: nil, role: nil, security_groups: nil, server_side_encryption: nil, server_side_encryption_aws_kms_key_id: nil, server_side_encryption_customer_algorithm: nil, sign_content: nil, storage_class: nil, use_efs: nil, vpc: nil, vpc_subnets: nil, wait_for_distribution_invalidation: nil, website_redirect_location: nil) ⇒ BucketDeploymentProps
Returns a new instance of BucketDeploymentProps.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 's3_deployment/bucket_deployment_props.rb', line 42 def initialize(destination_bucket:, sources:, access_control: nil, cache_control: nil, content_disposition: nil, content_encoding: nil, content_language: nil, content_type: nil, destination_key_prefix: nil, distribution: nil, distribution_paths: nil, ephemeral_storage_size: nil, exclude: nil, expires: nil, extract: nil, include: nil, log_group: nil, log_retention: nil, memory_limit: nil, metadata: nil, output_object_keys: nil, prune: nil, retain_on_delete: nil, role: nil, security_groups: nil, server_side_encryption: nil, server_side_encryption_aws_kms_key_id: nil, server_side_encryption_customer_algorithm: nil, sign_content: nil, storage_class: nil, use_efs: nil, vpc: nil, vpc_subnets: nil, wait_for_distribution_invalidation: nil, website_redirect_location: nil) @destination_bucket = destination_bucket Jsii::Type.check_type(@destination_bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "destinationBucket") @sources = sources Jsii::Type.check_type(@sources, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zM19kZXBsb3ltZW50LklTb3VyY2UifSwia2luZCI6ImFycmF5In19")), "sources") @access_control = access_control Jsii::Type.check_type(@access_control, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuQnVja2V0QWNjZXNzQ29udHJvbCJ9")), "accessControl") unless @access_control.nil? @cache_control = cache_control Jsii::Type.check_type(@cache_control, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zM19kZXBsb3ltZW50LkNhY2hlQ29udHJvbCJ9LCJraW5kIjoiYXJyYXkifX0=")), "cacheControl") unless @cache_control.nil? @content_disposition = content_disposition Jsii::Type.check_type(@content_disposition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentDisposition") unless @content_disposition.nil? @content_encoding = content_encoding Jsii::Type.check_type(@content_encoding, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentEncoding") unless @content_encoding.nil? @content_language = content_language Jsii::Type.check_type(@content_language, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentLanguage") unless @content_language.nil? @content_type = content_type Jsii::Type.check_type(@content_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentType") unless @content_type.nil? @destination_key_prefix = destination_key_prefix Jsii::Type.check_type(@destination_key_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationKeyPrefix") unless @destination_key_prefix.nil? @distribution = distribution Jsii::Type.check_type(@distribution, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jbG91ZGZyb250LklEaXN0cmlidXRpb25SZWYifQ==")), "distribution") unless @distribution.nil? @distribution_paths = distribution_paths Jsii::Type.check_type(@distribution_paths, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "distributionPaths") unless @distribution_paths.nil? @ephemeral_storage_size = ephemeral_storage_size Jsii::Type.check_type(@ephemeral_storage_size, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "ephemeralStorageSize") unless @ephemeral_storage_size.nil? @exclude = exclude Jsii::Type.check_type(@exclude, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "exclude") unless @exclude.nil? @expires = expires Jsii::Type.check_type(@expires, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5FeHBpcmF0aW9uIn0=")), "expires") unless @expires.nil? @extract = extract Jsii::Type.check_type(@extract, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "extract") unless @extract.nil? @include = include Jsii::Type.check_type(@include, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "include") unless @include.nil? @log_group = log_group Jsii::Type.check_type(@log_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sb2dzLklMb2dHcm91cFJlZiJ9")), "logGroup") unless @log_group.nil? @log_retention = log_retention Jsii::Type.check_type(@log_retention, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5SZXRlbnRpb25EYXlzIn0=")), "logRetention") unless @log_retention.nil? @memory_limit = memory_limit Jsii::Type.check_type(@memory_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memoryLimit") unless @memory_limit.nil? @metadata = Jsii::Type.check_type(@metadata, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "metadata") unless @metadata.nil? @output_object_keys = output_object_keys Jsii::Type.check_type(@output_object_keys, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "outputObjectKeys") unless @output_object_keys.nil? @prune = prune Jsii::Type.check_type(@prune, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "prune") unless @prune.nil? @retain_on_delete = retain_on_delete Jsii::Type.check_type(@retain_on_delete, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "retainOnDelete") unless @retain_on_delete.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil? @server_side_encryption = server_side_encryption Jsii::Type.check_type(@server_side_encryption, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczNfZGVwbG95bWVudC5TZXJ2ZXJTaWRlRW5jcnlwdGlvbiJ9")), "serverSideEncryption") unless @server_side_encryption.nil? @server_side_encryption_aws_kms_key_id = server_side_encryption_aws_kms_key_id Jsii::Type.check_type(@server_side_encryption_aws_kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serverSideEncryptionAwsKmsKeyId") unless @server_side_encryption_aws_kms_key_id.nil? @server_side_encryption_customer_algorithm = server_side_encryption_customer_algorithm Jsii::Type.check_type(@server_side_encryption_customer_algorithm, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serverSideEncryptionCustomerAlgorithm") unless @server_side_encryption_customer_algorithm.nil? @sign_content = sign_content Jsii::Type.check_type(@sign_content, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "signContent") unless @sign_content.nil? @storage_class = storage_class Jsii::Type.check_type(@storage_class, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczNfZGVwbG95bWVudC5TdG9yYWdlQ2xhc3MifQ==")), "storageClass") unless @storage_class.nil? @use_efs = use_efs Jsii::Type.check_type(@use_efs, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "useEfs") unless @use_efs.nil? @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil? @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil? @wait_for_distribution_invalidation = wait_for_distribution_invalidation Jsii::Type.check_type(@wait_for_distribution_invalidation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "waitForDistributionInvalidation") unless @wait_for_distribution_invalidation.nil? @website_redirect_location = website_redirect_location Jsii::Type.check_type(@website_redirect_location, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "websiteRedirectLocation") unless @website_redirect_location.nil? end |
Instance Attribute Details
#access_control ⇒ AWSCDK::S3::BucketAccessControl? (readonly)
Default: - Not set.
System-defined x-amz-acl metadata to be set on all objects in the deployment.
128 129 130 |
# File 's3_deployment/bucket_deployment_props.rb', line 128 def access_control @access_control end |
#cache_control ⇒ Array<AWSCDK::S3Deployment::CacheControl>? (readonly)
Default: - Not set.
System-defined cache-control metadata to be set on all objects in the deployment.
134 135 136 |
# File 's3_deployment/bucket_deployment_props.rb', line 134 def cache_control @cache_control end |
#content_disposition ⇒ String? (readonly)
Default: - Not set.
System-defined cache-disposition metadata to be set on all objects in the deployment.
140 141 142 |
# File 's3_deployment/bucket_deployment_props.rb', line 140 def content_disposition @content_disposition end |
#content_encoding ⇒ String? (readonly)
Default: - Not set.
System-defined content-encoding metadata to be set on all objects in the deployment.
146 147 148 |
# File 's3_deployment/bucket_deployment_props.rb', line 146 def content_encoding @content_encoding end |
#content_language ⇒ String? (readonly)
Default: - Not set.
System-defined content-language metadata to be set on all objects in the deployment.
152 153 154 |
# File 's3_deployment/bucket_deployment_props.rb', line 152 def content_language @content_language end |
#content_type ⇒ String? (readonly)
Default: - Not set.
System-defined content-type metadata to be set on all objects in the deployment.
158 159 160 |
# File 's3_deployment/bucket_deployment_props.rb', line 158 def content_type @content_type end |
#destination_bucket ⇒ AWSCDK::S3::IBucket (readonly)
The S3 bucket to sync the contents of the zip file to.
118 119 120 |
# File 's3_deployment/bucket_deployment_props.rb', line 118 def destination_bucket @destination_bucket end |
#destination_key_prefix ⇒ String? (readonly)
Default: "/" (unzip to root of the destination bucket)
Key prefix in the destination bucket. Must be <=104 characters.
If it's set with prune: true, it will only prune files with the prefix.
We recommend to always configure the destination_key_prefix property. This will prevent the deployment
from accidentally deleting data that wasn't uploaded by it.
168 169 170 |
# File 's3_deployment/bucket_deployment_props.rb', line 168 def destination_key_prefix @destination_key_prefix end |
#distribution ⇒ AWSCDK::Interfaces::AWSCloudfront::IDistributionRef? (readonly)
Default: - No invalidation occurs
The CloudFront distribution using the destination bucket as an origin.
Files in the distribution's edge caches will be invalidated after files are uploaded to the destination bucket.
176 177 178 |
# File 's3_deployment/bucket_deployment_props.rb', line 176 def distribution @distribution end |
#distribution_paths ⇒ Array<String>? (readonly)
Default: - All files under the destination bucket key prefix will be invalidated.
The file paths to invalidate in the CloudFront distribution.
181 182 183 |
# File 's3_deployment/bucket_deployment_props.rb', line 181 def distribution_paths @distribution_paths end |
#ephemeral_storage_size ⇒ AWSCDK::Size? (readonly)
Default: 512 MiB
The size of the AWS Lambda function’s /tmp directory in MiB.
186 187 188 |
# File 's3_deployment/bucket_deployment_props.rb', line 186 def ephemeral_storage_size @ephemeral_storage_size end |
#exclude ⇒ Array<String>? (readonly)
Default: - No exclude filters are used
If this is set, matching files or objects will be excluded from the deployment's sync command.
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.
198 199 200 |
# File 's3_deployment/bucket_deployment_props.rb', line 198 def exclude @exclude end |
#expires ⇒ AWSCDK::Expiration? (readonly)
Default: - The objects in the distribution will not expire.
System-defined expires metadata to be set on all objects in the deployment.
204 205 206 |
# File 's3_deployment/bucket_deployment_props.rb', line 204 def expires @expires end |
#extract ⇒ Boolean? (readonly)
Default: true
If this is set, the zip file will be synced to the destination S3 bucket and extracted.
If false, the file will remain zipped in the destination bucket.
211 212 213 |
# File 's3_deployment/bucket_deployment_props.rb', line 211 def extract @extract end |
#include ⇒ Array<String>? (readonly)
Default: - No include filters are used and all files are included with the sync command
If this is set, matching files or objects will be included with the deployment's sync command.
Since all files from the deployment package are included by default, this property
is usually leveraged alongside an exclude filter.
220 221 222 |
# File 's3_deployment/bucket_deployment_props.rb', line 220 def include @include end |
#log_group ⇒ AWSCDK::Interfaces::AWSLogs::ILogGroupRef? (readonly)
Default: - a default log group created by AWS Lambda
The Log Group used for logging of events emitted by the custom resource's lambda function.
Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first.
228 229 230 |
# File 's3_deployment/bucket_deployment_props.rb', line 228 def log_group @log_group end |
#log_retention ⇒ AWSCDK::Logs::RetentionDays? (readonly)
Default: logs.RetentionDays.INFINITE
The number of days that the lambda function's log events are kept in CloudWatch Logs.
This is a legacy API and we strongly recommend you migrate to log_group if you can.
log_group allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.
236 237 238 |
# File 's3_deployment/bucket_deployment_props.rb', line 236 def log_retention @log_retention end |
#memory_limit ⇒ Numeric? (readonly)
Default: 128
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.
If you are deploying large files, you will need to increase this number accordingly.
244 245 246 |
# File 's3_deployment/bucket_deployment_props.rb', line 244 def memory_limit @memory_limit end |
#metadata ⇒ Hash{String => String}? (readonly)
Default: - No user metadata is set
User-defined object metadata to be set on all objects in the deployment.
250 251 252 |
# File 's3_deployment/bucket_deployment_props.rb', line 250 def @metadata end |
#output_object_keys ⇒ Boolean? (readonly)
Default: true
If set to false, the custom resource will not send back the SourceObjectKeys.
This is useful when you are facing the error Response object is too long
259 260 261 |
# File 's3_deployment/bucket_deployment_props.rb', line 259 def output_object_keys @output_object_keys end |
#prune ⇒ Boolean? (readonly)
Default: true
By default, files in the destination bucket that don't exist in the source will be deleted when the BucketDeployment resource is created or updated.
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).
268 269 270 |
# File 's3_deployment/bucket_deployment_props.rb', line 268 def prune @prune end |
#retain_on_delete ⇒ Boolean? (readonly)
Default: true - when resource is deleted/updated, files are retained
If this is set to "false", the destination files will be deleted when the resource is deleted or the destination is updated.
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.
277 278 279 |
# File 's3_deployment/bucket_deployment_props.rb', line 277 def retain_on_delete @retain_on_delete end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - A role is automatically created
Execution role associated with this function.
282 283 284 |
# File 's3_deployment/bucket_deployment_props.rb', line 282 def role @role end |
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>? (readonly)
Default: undefined - If the function is placed within a VPC and a security group is not specified a dedicated security group will be created for this function.
The list of security groups to associate with the lambda handlers network interfaces.
Only used if 'vpc' is supplied.
289 290 291 |
# File 's3_deployment/bucket_deployment_props.rb', line 289 def security_groups @security_groups end |
#server_side_encryption ⇒ AWSCDK::S3Deployment::ServerSideEncryption? (readonly)
Default: - Server side encryption is not used.
System-defined x-amz-server-side-encryption metadata to be set on all objects in the deployment.
295 296 297 |
# File 's3_deployment/bucket_deployment_props.rb', line 295 def server_side_encryption @server_side_encryption end |
#server_side_encryption_aws_kms_key_id ⇒ String? (readonly)
Default: - Not set.
System-defined x-amz-server-side-encryption-aws-kms-key-id metadata to be set on all objects in the deployment.
301 302 303 |
# File 's3_deployment/bucket_deployment_props.rb', line 301 def server_side_encryption_aws_kms_key_id @server_side_encryption_aws_kms_key_id end |
#server_side_encryption_customer_algorithm ⇒ String? (readonly)
Default: - Not set.
System-defined x-amz-server-side-encryption-customer-algorithm metadata to be set on all objects in the deployment.
Warning: This is not a useful parameter until this bug is fixed: https://github.com/aws/aws-cdk/issues/6080
309 310 311 |
# File 's3_deployment/bucket_deployment_props.rb', line 309 def server_side_encryption_customer_algorithm @server_side_encryption_customer_algorithm end |
#sign_content ⇒ Boolean? (readonly)
Default: - x-amz-content-sha256 will not be computed
If set to true, uploads will precompute the value of x-amz-content-sha256 and include it in the signed S3 request headers.
314 315 316 |
# File 's3_deployment/bucket_deployment_props.rb', line 314 def sign_content @sign_content end |
#sources ⇒ Array<AWSCDK::S3Deployment::ISource> (readonly)
The sources from which to deploy the contents of this bucket.
122 123 124 |
# File 's3_deployment/bucket_deployment_props.rb', line 122 def sources @sources end |
#storage_class ⇒ AWSCDK::S3Deployment::StorageClass? (readonly)
Default: - Default storage-class for the bucket is used.
System-defined x-amz-storage-class metadata to be set on all objects in the deployment.
320 321 322 |
# File 's3_deployment/bucket_deployment_props.rb', line 320 def storage_class @storage_class end |
#use_efs ⇒ Boolean? (readonly)
Default: - No EFS. Lambda has access only to 512MB of disk space.
Mount an EFS file system.
Enable this if your assets are large and you encounter disk space errors. Enabling this option will require a VPC to be specified.
328 329 330 |
# File 's3_deployment/bucket_deployment_props.rb', line 328 def use_efs @use_efs end |
#vpc ⇒ AWSCDK::EC2::IVPC? (readonly)
Default: None
The VPC network to place the deployment lambda handler in.
This is required if use_efs is set.
335 336 337 |
# File 's3_deployment/bucket_deployment_props.rb', line 335 def vpc @vpc end |
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - the Vpc default strategy if not specified
Where in the VPC to place the deployment lambda handler.
Only used if 'vpc' is supplied.
342 343 344 |
# File 's3_deployment/bucket_deployment_props.rb', line 342 def vpc_subnets @vpc_subnets end |
#wait_for_distribution_invalidation ⇒ Boolean? (readonly)
Default: true
In case of using a cloudfront distribution, if this property is set to false then the custom resource will not wait and verify for Cloudfront invalidation to complete.
This may speed up deployment and avoid intermittent Cloudfront issues. However, this is risky and not recommended as cache invalidation can silently fail.
352 353 354 |
# File 's3_deployment/bucket_deployment_props.rb', line 352 def wait_for_distribution_invalidation @wait_for_distribution_invalidation end |
#website_redirect_location ⇒ String? (readonly)
Default: - No website redirection.
System-defined x-amz-website-redirect-location metadata to be set on all objects in the deployment.
358 359 360 |
# File 's3_deployment/bucket_deployment_props.rb', line 358 def website_redirect_location @website_redirect_location end |
Class Method Details
.jsii_properties ⇒ Object
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 's3_deployment/bucket_deployment_props.rb', line 360 def self.jsii_properties { :destination_bucket => "destinationBucket", :sources => "sources", :access_control => "accessControl", :cache_control => "cacheControl", :content_disposition => "contentDisposition", :content_encoding => "contentEncoding", :content_language => "contentLanguage", :content_type => "contentType", :destination_key_prefix => "destinationKeyPrefix", :distribution => "distribution", :distribution_paths => "distributionPaths", :ephemeral_storage_size => "ephemeralStorageSize", :exclude => "exclude", :expires => "expires", :extract => "extract", :include => "include", :log_group => "logGroup", :log_retention => "logRetention", :memory_limit => "memoryLimit", :metadata => "metadata", :output_object_keys => "outputObjectKeys", :prune => "prune", :retain_on_delete => "retainOnDelete", :role => "role", :security_groups => "securityGroups", :server_side_encryption => "serverSideEncryption", :server_side_encryption_aws_kms_key_id => "serverSideEncryptionAwsKmsKeyId", :server_side_encryption_customer_algorithm => "serverSideEncryptionCustomerAlgorithm", :sign_content => "signContent", :storage_class => "storageClass", :use_efs => "useEfs", :vpc => "vpc", :vpc_subnets => "vpcSubnets", :wait_for_distribution_invalidation => "waitForDistributionInvalidation", :website_redirect_location => "websiteRedirectLocation", } end |
Instance Method Details
#to_jsii ⇒ Object
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 's3_deployment/bucket_deployment_props.rb', line 400 def to_jsii result = {} result.merge!({ "destinationBucket" => @destination_bucket, "sources" => @sources, "accessControl" => @access_control, "cacheControl" => @cache_control, "contentDisposition" => @content_disposition, "contentEncoding" => @content_encoding, "contentLanguage" => @content_language, "contentType" => @content_type, "destinationKeyPrefix" => @destination_key_prefix, "distribution" => @distribution, "distributionPaths" => @distribution_paths, "ephemeralStorageSize" => @ephemeral_storage_size, "exclude" => @exclude, "expires" => @expires, "extract" => @extract, "include" => @include, "logGroup" => @log_group, "logRetention" => @log_retention, "memoryLimit" => @memory_limit, "metadata" => @metadata, "outputObjectKeys" => @output_object_keys, "prune" => @prune, "retainOnDelete" => @retain_on_delete, "role" => @role, "securityGroups" => @security_groups, "serverSideEncryption" => @server_side_encryption, "serverSideEncryptionAwsKmsKeyId" => @server_side_encryption_aws_kms_key_id, "serverSideEncryptionCustomerAlgorithm" => @server_side_encryption_customer_algorithm, "signContent" => @sign_content, "storageClass" => @storage_class, "useEfs" => @use_efs, "vpc" => @vpc, "vpcSubnets" => @vpc_subnets, "waitForDistributionInvalidation" => @wait_for_distribution_invalidation, "websiteRedirectLocation" => @website_redirect_location, }) result.compact end |