Documentation
¶
Index ¶
- func BucketDeployment_IsConstruct(x interface{}) *bool
- func NewBucketDeployment_Override(b BucketDeployment, scope constructs.Construct, id *string, ...)
- type BucketDeployment
- type BucketDeploymentProps
- type CacheControl
- func CacheControl_FromString(s *string) CacheControl
- func CacheControl_MaxAge(t awscdk.Duration) CacheControl
- func CacheControl_MustRevalidate() CacheControl
- func CacheControl_NoCache() CacheControl
- func CacheControl_NoTransform() CacheControl
- func CacheControl_ProxyRevalidate() CacheControl
- func CacheControl_SMaxAge(t awscdk.Duration) CacheControl
- func CacheControl_SetPrivate() CacheControl
- func CacheControl_SetPublic() CacheControl
- type DeploymentSourceContext
- type Expiresdeprecated
- type ISource
- type ServerSideEncryption
- type Source
- type SourceConfig
- type StorageClass
- type UserDefinedObjectMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BucketDeployment_IsConstruct ¶
func BucketDeployment_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func NewBucketDeployment_Override ¶
func NewBucketDeployment_Override(b BucketDeployment, scope constructs.Construct, id *string, props *BucketDeploymentProps)
Experimental.
Types ¶
type BucketDeployment ¶
type BucketDeployment interface {
awscdk.Construct
Node() awscdk.ConstructNode
OnPrepare()
OnSynthesize(session constructs.ISynthesisSession)
OnValidate() *[]*string
Prepare()
Synthesize(session awscdk.ISynthesisSession)
ToString() *string
Validate() *[]*string
}
Experimental.
func NewBucketDeployment ¶
func NewBucketDeployment(scope constructs.Construct, id *string, props *BucketDeploymentProps) BucketDeployment
Experimental.
type BucketDeploymentProps ¶
type BucketDeploymentProps struct {
// The S3 bucket to sync the contents of the zip file to.
// Experimental.
DestinationBucket awss3.IBucket `json:"destinationBucket"`
// The sources from which to deploy the contents of this bucket.
// Experimental.
Sources *[]ISource `json:"sources"`
// System-defined cache-control metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
//
// Experimental.
CacheControl *[]CacheControl `json:"cacheControl"`
// System-defined cache-disposition metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
//
// Experimental.
ContentDisposition *string `json:"contentDisposition"`
// System-defined content-encoding metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
//
// Experimental.
ContentEncoding *string `json:"contentEncoding"`
// System-defined content-language metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
//
// Experimental.
ContentLanguage *string `json:"contentLanguage"`
// System-defined content-type metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
//
// Experimental.
ContentType *string `json:"contentType"`
// Key prefix in the destination bucket.
// Experimental.
DestinationKeyPrefix *string `json:"destinationKeyPrefix"`
// 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.
// Experimental.
Distribution awscloudfront.IDistribution `json:"distribution"`
// The file paths to invalidate in the CloudFront distribution.
// Experimental.
DistributionPaths *[]*string `json:"distributionPaths"`
// System-defined expires metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
//
// Experimental.
Expires awscdk.Expiration `json:"expires"`
// 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.
// Experimental.
MemoryLimit *float64 `json:"memoryLimit"`
// User-defined object metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#UserMetadata
//
// Experimental.
Metadata *UserDefinedObjectMetadata `json:"metadata"`
// 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).
// See: https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html
//
// Experimental.
Prune *bool `json:"prune"`
// If this is set to "false", the destination files will be deleted when the resource is deleted or the destination is updated.
//
// NOTICE: if this is set to "false" and destination bucket/prefix is updated,
// all files in the previous destination will first be deleted and then
// uploaded to the new destination location. This could have availablity
// implications on your users.
// Experimental.
RetainOnDelete *bool `json:"retainOnDelete"`
// Execution role associated with this function.
// Experimental.
Role awsiam.IRole `json:"role"`
// System-defined x-amz-server-side-encryption metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
//
// Experimental.
ServerSideEncryption ServerSideEncryption `json:"serverSideEncryption"`
// System-defined x-amz-server-side-encryption-aws-kms-key-id metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
//
// Experimental.
ServerSideEncryptionAwsKmsKeyId *string `json:"serverSideEncryptionAwsKmsKeyId"`
// 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
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html#sse-c-how-to-programmatically-intro
//
// Experimental.
ServerSideEncryptionCustomerAlgorithm *string `json:"serverSideEncryptionCustomerAlgorithm"`
// System-defined x-amz-storage-class metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
//
// Experimental.
StorageClass StorageClass `json:"storageClass"`
// The VPC network to place the deployment lambda handler in.
// Experimental.
Vpc awsec2.IVpc `json:"vpc"`
// Where in the VPC to place the deployment lambda handler.
//
// Only used if 'vpc' is supplied.
// Experimental.
VpcSubnets *awsec2.SubnetSelection `json:"vpcSubnets"`
// System-defined x-amz-website-redirect-location metadata to be set on all objects in the deployment.
// See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
//
// Experimental.
WebsiteRedirectLocation *string `json:"websiteRedirectLocation"`
}
Experimental.
type CacheControl ¶
type CacheControl interface {
Value() interface{}
}
Used for HTTP cache-control header, which influences downstream caches. See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
Experimental.
type DeploymentSourceContext ¶
type DeploymentSourceContext struct {
// The role for the handler.
// Experimental.
HandlerRole awsiam.IRole `json:"handlerRole"`
}
Bind context for ISources. Experimental.
type Expires
deprecated
type Expires interface {
Value() interface{}
}
Used for HTTP expires header, which influences downstream caches.
Does NOT influence deletion of the object. See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
Deprecated: use core.Expiration
func Expires_After ¶
Expire once the specified duration has passed since deployment time. Deprecated: use core.Expiration
func Expires_AtDate ¶
Expire at the specified date. Deprecated: use core.Expiration
func Expires_AtTimestamp ¶
Expire at the specified timestamp. Deprecated: use core.Expiration
func Expires_FromString
deprecated
type ISource ¶
type ISource interface {
// Binds the source to a bucket deployment.
// Experimental.
Bind(scope awscdk.Construct, context *DeploymentSourceContext) *SourceConfig
}
Represents a source for bucket deployments. Experimental.
func Source_Asset ¶
func Source_Asset(path *string, options *awss3assets.AssetOptions) ISource
Uses a local asset as the deployment source. Experimental.
type ServerSideEncryption ¶
type ServerSideEncryption string
Indicates whether server-side encryption is enabled for the object, and whether that encryption is from the AWS Key Management Service (AWS KMS) or from Amazon S3 managed encryption (SSE-S3). See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
Experimental.
const ( ServerSideEncryption_AES_256 ServerSideEncryption = "AES_256" ServerSideEncryption_AWS_KMS ServerSideEncryption = "AWS_KMS" )
type Source ¶
type Source interface {
}
Specifies bucket deployment source.
Usage:
Source.bucket(bucket, key)
Source.asset('/local/path/to/directory')
Source.asset('/local/path/to/a/file.zip')
Experimental.
type SourceConfig ¶
type SourceConfig struct {
// The source bucket to deploy from.
// Experimental.
Bucket awss3.IBucket `json:"bucket"`
// An S3 object key in the source bucket that points to a zip file.
// Experimental.
ZipObjectKey *string `json:"zipObjectKey"`
}
Experimental.
type StorageClass ¶
type StorageClass string
Storage class used for storing the object. See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
Experimental.
const ( StorageClass_STANDARD StorageClass = "STANDARD" StorageClass_REDUCED_REDUNDANCY StorageClass = "REDUCED_REDUNDANCY" StorageClass_STANDARD_IA StorageClass = "STANDARD_IA" StorageClass_ONEZONE_IA StorageClass = "ONEZONE_IA" StorageClass_INTELLIGENT_TIERING StorageClass = "INTELLIGENT_TIERING" StorageClass_GLACIER StorageClass = "GLACIER" StorageClass_DEEP_ARCHIVE StorageClass = "DEEP_ARCHIVE" )