Created
April 30, 2020 16:43
-
-
Save skinny85/49fa7220ebb3ae8f427f687dba4d63e5 to your computer and use it in GitHub Desktop.
Generated code from https://github.com/aws/aws-cdk/pull/7304
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2012-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
// Generated from the AWS CloudFormation Resource Specification | |
// See: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html | |
// @cfn2ts:meta@ {"generated":"2020-04-30T16:02:41.215Z","fingerprint":"UmjJ3N7Ly7T7bUZLvWb3sQAmVR+O5ACcaEvENQT36Ys="} | |
// tslint:disable:max-line-length | This is generated code - line lengths are difficult to control | |
import * as cdk from '@aws-cdk/core'; | |
/** | |
* Properties for defining a `AWS::S3::AccessPoint` | |
* | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html | |
*/ | |
export interface CfnAccessPointProps { | |
/** | |
* `AWS::S3::AccessPoint.Bucket` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-bucket | |
*/ | |
readonly bucket: string; | |
/** | |
* `AWS::S3::AccessPoint.CreationDate` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-creationdate | |
*/ | |
readonly creationDate?: string; | |
/** | |
* `AWS::S3::AccessPoint.Name` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-name | |
*/ | |
readonly name?: string; | |
/** | |
* `AWS::S3::AccessPoint.NetworkOrigin` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-networkorigin | |
*/ | |
readonly networkOrigin?: string; | |
/** | |
* `AWS::S3::AccessPoint.Policy` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-policy | |
*/ | |
readonly policy?: any | cdk.IResolvable; | |
/** | |
* `AWS::S3::AccessPoint.PolicyStatus` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-policystatus | |
*/ | |
readonly policyStatus?: any | cdk.IResolvable; | |
/** | |
* `AWS::S3::AccessPoint.PublicAccessBlockConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-publicaccessblockconfiguration | |
*/ | |
readonly publicAccessBlockConfiguration?: CfnAccessPoint.PublicAccessBlockConfigurationProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::AccessPoint.VpcConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-vpcconfiguration | |
*/ | |
readonly vpcConfiguration?: CfnAccessPoint.VpcConfigurationProperty | cdk.IResolvable; | |
} | |
/** | |
* Determine whether the given properties match those of a `CfnAccessPointProps` | |
* | |
* @param properties - the TypeScript properties of a `CfnAccessPointProps` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnAccessPointPropsValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('bucket', cdk.requiredValidator)(properties.bucket)); | |
errors.collect(cdk.propertyValidator('bucket', cdk.validateString)(properties.bucket)); | |
errors.collect(cdk.propertyValidator('creationDate', cdk.validateString)(properties.creationDate)); | |
errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name)); | |
errors.collect(cdk.propertyValidator('networkOrigin', cdk.validateString)(properties.networkOrigin)); | |
errors.collect(cdk.propertyValidator('policy', cdk.validateObject)(properties.policy)); | |
errors.collect(cdk.propertyValidator('policyStatus', cdk.validateObject)(properties.policyStatus)); | |
errors.collect(cdk.propertyValidator('publicAccessBlockConfiguration', CfnAccessPoint_PublicAccessBlockConfigurationPropertyValidator)(properties.publicAccessBlockConfiguration)); | |
errors.collect(cdk.propertyValidator('vpcConfiguration', CfnAccessPoint_VpcConfigurationPropertyValidator)(properties.vpcConfiguration)); | |
return errors.wrap('supplied properties not correct for "CfnAccessPointProps"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::AccessPoint` resource | |
* | |
* @param properties - the TypeScript properties of a `CfnAccessPointProps` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::AccessPoint` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnAccessPointPropsToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnAccessPointPropsValidator(properties).assertSuccess(); | |
return { | |
Bucket: cdk.stringToCloudFormation(properties.bucket), | |
CreationDate: cdk.stringToCloudFormation(properties.creationDate), | |
Name: cdk.stringToCloudFormation(properties.name), | |
NetworkOrigin: cdk.stringToCloudFormation(properties.networkOrigin), | |
Policy: cdk.objectToCloudFormation(properties.policy), | |
PolicyStatus: cdk.objectToCloudFormation(properties.policyStatus), | |
PublicAccessBlockConfiguration: cfnAccessPointPublicAccessBlockConfigurationPropertyToCloudFormation(properties.publicAccessBlockConfiguration), | |
VpcConfiguration: cfnAccessPointVpcConfigurationPropertyToCloudFormation(properties.vpcConfiguration), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnAccessPointPropsFromCloudFormation(properties: any): CfnAccessPointProps { | |
properties = properties || {}; | |
const ret: CfnAccessPointProps = { | |
bucket: cdk.stringFromCloudFormation(properties.Bucket), | |
creationDate: properties.CreationDate == null ? undefined : cdk.stringFromCloudFormation(properties.CreationDate), | |
name: properties.Name == null ? undefined : cdk.stringFromCloudFormation(properties.Name), | |
networkOrigin: properties.NetworkOrigin == null ? undefined : cdk.stringFromCloudFormation(properties.NetworkOrigin), | |
policy: properties.Policy == null ? undefined : cdk.anyFromCloudFormation(properties.Policy), | |
policyStatus: properties.PolicyStatus == null ? undefined : cdk.anyFromCloudFormation(properties.PolicyStatus), | |
publicAccessBlockConfiguration: properties.PublicAccessBlockConfiguration == null ? undefined : CfnAccessPointPublicAccessBlockConfigurationPropertyFromCloudFormation(properties.PublicAccessBlockConfiguration), | |
vpcConfiguration: properties.VpcConfiguration == null ? undefined : CfnAccessPointVpcConfigurationPropertyFromCloudFormation(properties.VpcConfiguration), | |
}; | |
CfnAccessPointPropsValidator(ret).assertSuccess(); | |
return ret; | |
} | |
/** | |
* A CloudFormation `AWS::S3::AccessPoint` | |
* | |
* @cloudformationResource AWS::S3::AccessPoint | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html | |
*/ | |
export class CfnAccessPoint extends cdk.CfnResource implements cdk.IInspectable { | |
/** | |
* The CloudFormation resource type name for this resource class. | |
*/ | |
public static readonly CFN_RESOURCE_TYPE_NAME = "AWS::S3::AccessPoint"; | |
/** | |
* A factory method that creates a new instance of this class from an object | |
* containing the CloudFormation properties of this resource. | |
* Used in the @aws-cdk/cloudformation-include module. | |
* | |
* @experimental | |
*/ | |
public static fromCloudFormation(scope: cdk.Construct, id: string, resourceAttributes: any): CfnAccessPoint { | |
resourceAttributes = resourceAttributes || {}; | |
const resourceProperties = cdk.cfnValueToCdkValue(resourceAttributes.Properties); | |
const props = CfnAccessPointPropsFromCloudFormation(resourceProperties); | |
const ret = new CfnAccessPoint(scope, id, props); | |
const cfnOptions = ret.cfnOptions; | |
cfnOptions.deletionPolicy = cdk.stringToDeletionPolicy(resourceAttributes.DeletionPolicy); | |
cfnOptions.updateReplacePolicy = cdk.stringToDeletionPolicy(resourceAttributes.UpdateReplacePolicy); | |
cfnOptions.metadata = cdk.cfnValueToCdkValue(resourceAttributes.Metadata); | |
return ret; | |
} | |
/** | |
* `AWS::S3::AccessPoint.Bucket` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-bucket | |
*/ | |
public bucket: string; | |
/** | |
* `AWS::S3::AccessPoint.CreationDate` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-creationdate | |
*/ | |
public creationDate: string | undefined; | |
/** | |
* `AWS::S3::AccessPoint.Name` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-name | |
*/ | |
public name: string | undefined; | |
/** | |
* `AWS::S3::AccessPoint.NetworkOrigin` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-networkorigin | |
*/ | |
public networkOrigin: string | undefined; | |
/** | |
* `AWS::S3::AccessPoint.Policy` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-policy | |
*/ | |
public policy: any | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::AccessPoint.PolicyStatus` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-policystatus | |
*/ | |
public policyStatus: any | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::AccessPoint.PublicAccessBlockConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-publicaccessblockconfiguration | |
*/ | |
public publicAccessBlockConfiguration: CfnAccessPoint.PublicAccessBlockConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::AccessPoint.VpcConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accesspoint.html#cfn-s3-accesspoint-vpcconfiguration | |
*/ | |
public vpcConfiguration: CfnAccessPoint.VpcConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* Create a new `AWS::S3::AccessPoint`. | |
* | |
* @param scope - scope in which this resource is defined | |
* @param id - scoped id of the resource | |
* @param props - resource properties | |
*/ | |
constructor(scope: cdk.Construct, id: string, props: CfnAccessPointProps) { | |
super(scope, id, { type: CfnAccessPoint.CFN_RESOURCE_TYPE_NAME, properties: props }); | |
cdk.requireProperty(props, 'bucket', this); | |
this.bucket = props.bucket; | |
this.creationDate = props.creationDate; | |
this.name = props.name; | |
this.networkOrigin = props.networkOrigin; | |
this.policy = props.policy; | |
this.policyStatus = props.policyStatus; | |
this.publicAccessBlockConfiguration = props.publicAccessBlockConfiguration; | |
this.vpcConfiguration = props.vpcConfiguration; | |
} | |
/** | |
* Examines the CloudFormation resource and discloses attributes. | |
* | |
* @param inspector - tree inspector to collect and process attributes | |
* | |
* @stability experimental | |
*/ | |
public inspect(inspector: cdk.TreeInspector) { | |
inspector.addAttribute("aws:cdk:cloudformation:type", CfnAccessPoint.CFN_RESOURCE_TYPE_NAME); | |
inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties); | |
} | |
protected get cfnProperties(): { [key: string]: any } { | |
return { | |
bucket: this.bucket, | |
creationDate: this.creationDate, | |
name: this.name, | |
networkOrigin: this.networkOrigin, | |
policy: this.policy, | |
policyStatus: this.policyStatus, | |
publicAccessBlockConfiguration: this.publicAccessBlockConfiguration, | |
vpcConfiguration: this.vpcConfiguration, | |
}; | |
} | |
protected renderProperties(props: {[key: string]: any}): { [key: string]: any } { | |
return cfnAccessPointPropsToCloudFormation(props); | |
} | |
} | |
export namespace CfnAccessPoint { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-accesspoint-publicaccessblockconfiguration.html | |
*/ | |
export interface PublicAccessBlockConfigurationProperty { | |
/** | |
* `CfnAccessPoint.PublicAccessBlockConfigurationProperty.BlockPublicAcls` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-accesspoint-publicaccessblockconfiguration.html#cfn-s3-accesspoint-publicaccessblockconfiguration-blockpublicacls | |
*/ | |
readonly blockPublicAcls?: boolean | cdk.IResolvable; | |
/** | |
* `CfnAccessPoint.PublicAccessBlockConfigurationProperty.BlockPublicPolicy` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-accesspoint-publicaccessblockconfiguration.html#cfn-s3-accesspoint-publicaccessblockconfiguration-blockpublicpolicy | |
*/ | |
readonly blockPublicPolicy?: boolean | cdk.IResolvable; | |
/** | |
* `CfnAccessPoint.PublicAccessBlockConfigurationProperty.IgnorePublicAcls` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-accesspoint-publicaccessblockconfiguration.html#cfn-s3-accesspoint-publicaccessblockconfiguration-ignorepublicacls | |
*/ | |
readonly ignorePublicAcls?: boolean | cdk.IResolvable; | |
/** | |
* `CfnAccessPoint.PublicAccessBlockConfigurationProperty.RestrictPublicBuckets` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-accesspoint-publicaccessblockconfiguration.html#cfn-s3-accesspoint-publicaccessblockconfiguration-restrictpublicbuckets | |
*/ | |
readonly restrictPublicBuckets?: boolean | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `PublicAccessBlockConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `PublicAccessBlockConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnAccessPoint_PublicAccessBlockConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('blockPublicAcls', cdk.validateBoolean)(properties.blockPublicAcls)); | |
errors.collect(cdk.propertyValidator('blockPublicPolicy', cdk.validateBoolean)(properties.blockPublicPolicy)); | |
errors.collect(cdk.propertyValidator('ignorePublicAcls', cdk.validateBoolean)(properties.ignorePublicAcls)); | |
errors.collect(cdk.propertyValidator('restrictPublicBuckets', cdk.validateBoolean)(properties.restrictPublicBuckets)); | |
return errors.wrap('supplied properties not correct for "PublicAccessBlockConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::AccessPoint.PublicAccessBlockConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `PublicAccessBlockConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::AccessPoint.PublicAccessBlockConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnAccessPointPublicAccessBlockConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnAccessPoint_PublicAccessBlockConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
BlockPublicAcls: cdk.booleanToCloudFormation(properties.blockPublicAcls), | |
BlockPublicPolicy: cdk.booleanToCloudFormation(properties.blockPublicPolicy), | |
IgnorePublicAcls: cdk.booleanToCloudFormation(properties.ignorePublicAcls), | |
RestrictPublicBuckets: cdk.booleanToCloudFormation(properties.restrictPublicBuckets), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnAccessPointPublicAccessBlockConfigurationPropertyFromCloudFormation(properties: any): CfnAccessPoint.PublicAccessBlockConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnAccessPoint.PublicAccessBlockConfigurationProperty = { | |
blockPublicAcls: properties.BlockPublicAcls == null ? undefined : cdk.booleanFromCloudFormation(properties.BlockPublicAcls), | |
blockPublicPolicy: properties.BlockPublicPolicy == null ? undefined : cdk.booleanFromCloudFormation(properties.BlockPublicPolicy), | |
ignorePublicAcls: properties.IgnorePublicAcls == null ? undefined : cdk.booleanFromCloudFormation(properties.IgnorePublicAcls), | |
restrictPublicBuckets: properties.RestrictPublicBuckets == null ? undefined : cdk.booleanFromCloudFormation(properties.RestrictPublicBuckets), | |
}; | |
CfnAccessPoint_PublicAccessBlockConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnAccessPoint { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-accesspoint-vpcconfiguration.html | |
*/ | |
export interface VpcConfigurationProperty { | |
/** | |
* `CfnAccessPoint.VpcConfigurationProperty.VpcId` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-accesspoint-vpcconfiguration.html#cfn-s3-accesspoint-vpcconfiguration-vpcid | |
*/ | |
readonly vpcId?: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `VpcConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `VpcConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnAccessPoint_VpcConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('vpcId', cdk.validateString)(properties.vpcId)); | |
return errors.wrap('supplied properties not correct for "VpcConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::AccessPoint.VpcConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `VpcConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::AccessPoint.VpcConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnAccessPointVpcConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnAccessPoint_VpcConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
VpcId: cdk.stringToCloudFormation(properties.vpcId), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnAccessPointVpcConfigurationPropertyFromCloudFormation(properties: any): CfnAccessPoint.VpcConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnAccessPoint.VpcConfigurationProperty = { | |
vpcId: properties.VpcId == null ? undefined : cdk.stringFromCloudFormation(properties.VpcId), | |
}; | |
CfnAccessPoint_VpcConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
/** | |
* Properties for defining a `AWS::S3::Bucket` | |
* | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html | |
*/ | |
export interface CfnBucketProps { | |
/** | |
* `AWS::S3::Bucket.AccelerateConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-accelerateconfiguration | |
*/ | |
readonly accelerateConfiguration?: CfnBucket.AccelerateConfigurationProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.AccessControl` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-accesscontrol | |
*/ | |
readonly accessControl?: string; | |
/** | |
* `AWS::S3::Bucket.AnalyticsConfigurations` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-analyticsconfigurations | |
*/ | |
readonly analyticsConfigurations?: Array<CfnBucket.AnalyticsConfigurationProperty | cdk.IResolvable> | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.BucketEncryption` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-bucketencryption | |
*/ | |
readonly bucketEncryption?: CfnBucket.BucketEncryptionProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.BucketName` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-name | |
*/ | |
readonly bucketName?: string; | |
/** | |
* `AWS::S3::Bucket.CorsConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-crossoriginconfig | |
*/ | |
readonly corsConfiguration?: CfnBucket.CorsConfigurationProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.InventoryConfigurations` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-inventoryconfigurations | |
*/ | |
readonly inventoryConfigurations?: Array<CfnBucket.InventoryConfigurationProperty | cdk.IResolvable> | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.LifecycleConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-lifecycleconfig | |
*/ | |
readonly lifecycleConfiguration?: CfnBucket.LifecycleConfigurationProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.LoggingConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-loggingconfig | |
*/ | |
readonly loggingConfiguration?: CfnBucket.LoggingConfigurationProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.MetricsConfigurations` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-metricsconfigurations | |
*/ | |
readonly metricsConfigurations?: Array<CfnBucket.MetricsConfigurationProperty | cdk.IResolvable> | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.NotificationConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-notification | |
*/ | |
readonly notificationConfiguration?: CfnBucket.NotificationConfigurationProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.ObjectLockConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-objectlockconfiguration | |
*/ | |
readonly objectLockConfiguration?: CfnBucket.ObjectLockConfigurationProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.ObjectLockEnabled` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-objectlockenabled | |
*/ | |
readonly objectLockEnabled?: boolean | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.PublicAccessBlockConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-publicaccessblockconfiguration | |
*/ | |
readonly publicAccessBlockConfiguration?: CfnBucket.PublicAccessBlockConfigurationProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.ReplicationConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-replicationconfiguration | |
*/ | |
readonly replicationConfiguration?: CfnBucket.ReplicationConfigurationProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.Tags` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-tags | |
*/ | |
readonly tags?: cdk.CfnTag[]; | |
/** | |
* `AWS::S3::Bucket.VersioningConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-versioning | |
*/ | |
readonly versioningConfiguration?: CfnBucket.VersioningConfigurationProperty | cdk.IResolvable; | |
/** | |
* `AWS::S3::Bucket.WebsiteConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-websiteconfiguration | |
*/ | |
readonly websiteConfiguration?: CfnBucket.WebsiteConfigurationProperty | cdk.IResolvable; | |
} | |
/** | |
* Determine whether the given properties match those of a `CfnBucketProps` | |
* | |
* @param properties - the TypeScript properties of a `CfnBucketProps` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucketPropsValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('accelerateConfiguration', CfnBucket_AccelerateConfigurationPropertyValidator)(properties.accelerateConfiguration)); | |
errors.collect(cdk.propertyValidator('accessControl', cdk.validateString)(properties.accessControl)); | |
errors.collect(cdk.propertyValidator('analyticsConfigurations', cdk.listValidator(CfnBucket_AnalyticsConfigurationPropertyValidator))(properties.analyticsConfigurations)); | |
errors.collect(cdk.propertyValidator('bucketEncryption', CfnBucket_BucketEncryptionPropertyValidator)(properties.bucketEncryption)); | |
errors.collect(cdk.propertyValidator('bucketName', cdk.validateString)(properties.bucketName)); | |
errors.collect(cdk.propertyValidator('corsConfiguration', CfnBucket_CorsConfigurationPropertyValidator)(properties.corsConfiguration)); | |
errors.collect(cdk.propertyValidator('inventoryConfigurations', cdk.listValidator(CfnBucket_InventoryConfigurationPropertyValidator))(properties.inventoryConfigurations)); | |
errors.collect(cdk.propertyValidator('lifecycleConfiguration', CfnBucket_LifecycleConfigurationPropertyValidator)(properties.lifecycleConfiguration)); | |
errors.collect(cdk.propertyValidator('loggingConfiguration', CfnBucket_LoggingConfigurationPropertyValidator)(properties.loggingConfiguration)); | |
errors.collect(cdk.propertyValidator('metricsConfigurations', cdk.listValidator(CfnBucket_MetricsConfigurationPropertyValidator))(properties.metricsConfigurations)); | |
errors.collect(cdk.propertyValidator('notificationConfiguration', CfnBucket_NotificationConfigurationPropertyValidator)(properties.notificationConfiguration)); | |
errors.collect(cdk.propertyValidator('objectLockConfiguration', CfnBucket_ObjectLockConfigurationPropertyValidator)(properties.objectLockConfiguration)); | |
errors.collect(cdk.propertyValidator('objectLockEnabled', cdk.validateBoolean)(properties.objectLockEnabled)); | |
errors.collect(cdk.propertyValidator('publicAccessBlockConfiguration', CfnBucket_PublicAccessBlockConfigurationPropertyValidator)(properties.publicAccessBlockConfiguration)); | |
errors.collect(cdk.propertyValidator('replicationConfiguration', CfnBucket_ReplicationConfigurationPropertyValidator)(properties.replicationConfiguration)); | |
errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags)); | |
errors.collect(cdk.propertyValidator('versioningConfiguration', CfnBucket_VersioningConfigurationPropertyValidator)(properties.versioningConfiguration)); | |
errors.collect(cdk.propertyValidator('websiteConfiguration', CfnBucket_WebsiteConfigurationPropertyValidator)(properties.websiteConfiguration)); | |
return errors.wrap('supplied properties not correct for "CfnBucketProps"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket` resource | |
* | |
* @param properties - the TypeScript properties of a `CfnBucketProps` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketPropsToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucketPropsValidator(properties).assertSuccess(); | |
return { | |
AccelerateConfiguration: cfnBucketAccelerateConfigurationPropertyToCloudFormation(properties.accelerateConfiguration), | |
AccessControl: cdk.stringToCloudFormation(properties.accessControl), | |
AnalyticsConfigurations: cdk.listMapper(cfnBucketAnalyticsConfigurationPropertyToCloudFormation)(properties.analyticsConfigurations), | |
BucketEncryption: cfnBucketBucketEncryptionPropertyToCloudFormation(properties.bucketEncryption), | |
BucketName: cdk.stringToCloudFormation(properties.bucketName), | |
CorsConfiguration: cfnBucketCorsConfigurationPropertyToCloudFormation(properties.corsConfiguration), | |
InventoryConfigurations: cdk.listMapper(cfnBucketInventoryConfigurationPropertyToCloudFormation)(properties.inventoryConfigurations), | |
LifecycleConfiguration: cfnBucketLifecycleConfigurationPropertyToCloudFormation(properties.lifecycleConfiguration), | |
LoggingConfiguration: cfnBucketLoggingConfigurationPropertyToCloudFormation(properties.loggingConfiguration), | |
MetricsConfigurations: cdk.listMapper(cfnBucketMetricsConfigurationPropertyToCloudFormation)(properties.metricsConfigurations), | |
NotificationConfiguration: cfnBucketNotificationConfigurationPropertyToCloudFormation(properties.notificationConfiguration), | |
ObjectLockConfiguration: cfnBucketObjectLockConfigurationPropertyToCloudFormation(properties.objectLockConfiguration), | |
ObjectLockEnabled: cdk.booleanToCloudFormation(properties.objectLockEnabled), | |
PublicAccessBlockConfiguration: cfnBucketPublicAccessBlockConfigurationPropertyToCloudFormation(properties.publicAccessBlockConfiguration), | |
ReplicationConfiguration: cfnBucketReplicationConfigurationPropertyToCloudFormation(properties.replicationConfiguration), | |
Tags: cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags), | |
VersioningConfiguration: cfnBucketVersioningConfigurationPropertyToCloudFormation(properties.versioningConfiguration), | |
WebsiteConfiguration: cfnBucketWebsiteConfigurationPropertyToCloudFormation(properties.websiteConfiguration), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketPropsFromCloudFormation(properties: any): CfnBucketProps { | |
properties = properties || {}; | |
const ret: CfnBucketProps = { | |
accelerateConfiguration: properties.AccelerateConfiguration == null ? undefined : CfnBucketAccelerateConfigurationPropertyFromCloudFormation(properties.AccelerateConfiguration), | |
accessControl: properties.AccessControl == null ? undefined : cdk.stringFromCloudFormation(properties.AccessControl), | |
analyticsConfigurations: cdk.cloudFormationArrayToCdkArray(properties.AnalyticsConfigurations, (prop1: any) => CfnBucketAnalyticsConfigurationPropertyFromCloudFormation(prop1)), | |
bucketEncryption: properties.BucketEncryption == null ? undefined : CfnBucketBucketEncryptionPropertyFromCloudFormation(properties.BucketEncryption), | |
bucketName: properties.BucketName == null ? undefined : cdk.stringFromCloudFormation(properties.BucketName), | |
corsConfiguration: properties.CorsConfiguration == null ? undefined : CfnBucketCorsConfigurationPropertyFromCloudFormation(properties.CorsConfiguration), | |
inventoryConfigurations: cdk.cloudFormationArrayToCdkArray(properties.InventoryConfigurations, (prop1: any) => CfnBucketInventoryConfigurationPropertyFromCloudFormation(prop1)), | |
lifecycleConfiguration: properties.LifecycleConfiguration == null ? undefined : CfnBucketLifecycleConfigurationPropertyFromCloudFormation(properties.LifecycleConfiguration), | |
loggingConfiguration: properties.LoggingConfiguration == null ? undefined : CfnBucketLoggingConfigurationPropertyFromCloudFormation(properties.LoggingConfiguration), | |
metricsConfigurations: cdk.cloudFormationArrayToCdkArray(properties.MetricsConfigurations, (prop1: any) => CfnBucketMetricsConfigurationPropertyFromCloudFormation(prop1)), | |
notificationConfiguration: properties.NotificationConfiguration == null ? undefined : CfnBucketNotificationConfigurationPropertyFromCloudFormation(properties.NotificationConfiguration), | |
objectLockConfiguration: properties.ObjectLockConfiguration == null ? undefined : CfnBucketObjectLockConfigurationPropertyFromCloudFormation(properties.ObjectLockConfiguration), | |
objectLockEnabled: properties.ObjectLockEnabled == null ? undefined : cdk.booleanFromCloudFormation(properties.ObjectLockEnabled), | |
publicAccessBlockConfiguration: properties.PublicAccessBlockConfiguration == null ? undefined : CfnBucketPublicAccessBlockConfigurationPropertyFromCloudFormation(properties.PublicAccessBlockConfiguration), | |
replicationConfiguration: properties.ReplicationConfiguration == null ? undefined : CfnBucketReplicationConfigurationPropertyFromCloudFormation(properties.ReplicationConfiguration), | |
tags: cdk.cloudFormationArrayToCdkArray(properties.Tags, (prop1: any) => cdk.cloudFormationTagToCdkTag(prop1) as any), | |
versioningConfiguration: properties.VersioningConfiguration == null ? undefined : CfnBucketVersioningConfigurationPropertyFromCloudFormation(properties.VersioningConfiguration), | |
websiteConfiguration: properties.WebsiteConfiguration == null ? undefined : CfnBucketWebsiteConfigurationPropertyFromCloudFormation(properties.WebsiteConfiguration), | |
}; | |
CfnBucketPropsValidator(ret).assertSuccess(); | |
return ret; | |
} | |
/** | |
* A CloudFormation `AWS::S3::Bucket` | |
* | |
* @cloudformationResource AWS::S3::Bucket | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html | |
*/ | |
export class CfnBucket extends cdk.CfnResource implements cdk.IInspectable { | |
/** | |
* The CloudFormation resource type name for this resource class. | |
*/ | |
public static readonly CFN_RESOURCE_TYPE_NAME = "AWS::S3::Bucket"; | |
/** | |
* A factory method that creates a new instance of this class from an object | |
* containing the CloudFormation properties of this resource. | |
* Used in the @aws-cdk/cloudformation-include module. | |
* | |
* @experimental | |
*/ | |
public static fromCloudFormation(scope: cdk.Construct, id: string, resourceAttributes: any): CfnBucket { | |
resourceAttributes = resourceAttributes || {}; | |
const resourceProperties = cdk.cfnValueToCdkValue(resourceAttributes.Properties); | |
const props = CfnBucketPropsFromCloudFormation(resourceProperties); | |
const ret = new CfnBucket(scope, id, props); | |
const cfnOptions = ret.cfnOptions; | |
cfnOptions.deletionPolicy = cdk.stringToDeletionPolicy(resourceAttributes.DeletionPolicy); | |
cfnOptions.updateReplacePolicy = cdk.stringToDeletionPolicy(resourceAttributes.UpdateReplacePolicy); | |
cfnOptions.metadata = cdk.cfnValueToCdkValue(resourceAttributes.Metadata); | |
return ret; | |
} | |
/** | |
* @cloudformationAttribute Arn | |
*/ | |
public readonly attrArn: string; | |
/** | |
* @cloudformationAttribute DomainName | |
*/ | |
public readonly attrDomainName: string; | |
/** | |
* @cloudformationAttribute DualStackDomainName | |
*/ | |
public readonly attrDualStackDomainName: string; | |
/** | |
* @cloudformationAttribute RegionalDomainName | |
*/ | |
public readonly attrRegionalDomainName: string; | |
/** | |
* @cloudformationAttribute WebsiteURL | |
*/ | |
public readonly attrWebsiteUrl: string; | |
/** | |
* `AWS::S3::Bucket.AccelerateConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-accelerateconfiguration | |
*/ | |
public accelerateConfiguration: CfnBucket.AccelerateConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.AccessControl` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-accesscontrol | |
*/ | |
public accessControl: string | undefined; | |
/** | |
* `AWS::S3::Bucket.AnalyticsConfigurations` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-analyticsconfigurations | |
*/ | |
public analyticsConfigurations: Array<CfnBucket.AnalyticsConfigurationProperty | cdk.IResolvable> | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.BucketEncryption` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-bucketencryption | |
*/ | |
public bucketEncryption: CfnBucket.BucketEncryptionProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.BucketName` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-name | |
*/ | |
public bucketName: string | undefined; | |
/** | |
* `AWS::S3::Bucket.CorsConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-crossoriginconfig | |
*/ | |
public corsConfiguration: CfnBucket.CorsConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.InventoryConfigurations` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-inventoryconfigurations | |
*/ | |
public inventoryConfigurations: Array<CfnBucket.InventoryConfigurationProperty | cdk.IResolvable> | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.LifecycleConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-lifecycleconfig | |
*/ | |
public lifecycleConfiguration: CfnBucket.LifecycleConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.LoggingConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-loggingconfig | |
*/ | |
public loggingConfiguration: CfnBucket.LoggingConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.MetricsConfigurations` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-metricsconfigurations | |
*/ | |
public metricsConfigurations: Array<CfnBucket.MetricsConfigurationProperty | cdk.IResolvable> | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.NotificationConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-notification | |
*/ | |
public notificationConfiguration: CfnBucket.NotificationConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.ObjectLockConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-objectlockconfiguration | |
*/ | |
public objectLockConfiguration: CfnBucket.ObjectLockConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.ObjectLockEnabled` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-objectlockenabled | |
*/ | |
public objectLockEnabled: boolean | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.PublicAccessBlockConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-publicaccessblockconfiguration | |
*/ | |
public publicAccessBlockConfiguration: CfnBucket.PublicAccessBlockConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.ReplicationConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-replicationconfiguration | |
*/ | |
public replicationConfiguration: CfnBucket.ReplicationConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.Tags` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-tags | |
*/ | |
public readonly tags: cdk.TagManager; | |
/** | |
* `AWS::S3::Bucket.VersioningConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-versioning | |
*/ | |
public versioningConfiguration: CfnBucket.VersioningConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* `AWS::S3::Bucket.WebsiteConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-websiteconfiguration | |
*/ | |
public websiteConfiguration: CfnBucket.WebsiteConfigurationProperty | cdk.IResolvable | undefined; | |
/** | |
* Create a new `AWS::S3::Bucket`. | |
* | |
* @param scope - scope in which this resource is defined | |
* @param id - scoped id of the resource | |
* @param props - resource properties | |
*/ | |
constructor(scope: cdk.Construct, id: string, props: CfnBucketProps = {}) { | |
super(scope, id, { type: CfnBucket.CFN_RESOURCE_TYPE_NAME, properties: props }); | |
this.attrArn = cdk.Token.asString(this.getAtt('Arn')); | |
this.attrDomainName = cdk.Token.asString(this.getAtt('DomainName')); | |
this.attrDualStackDomainName = cdk.Token.asString(this.getAtt('DualStackDomainName')); | |
this.attrRegionalDomainName = cdk.Token.asString(this.getAtt('RegionalDomainName')); | |
this.attrWebsiteUrl = cdk.Token.asString(this.getAtt('WebsiteURL')); | |
this.accelerateConfiguration = props.accelerateConfiguration; | |
this.accessControl = props.accessControl; | |
this.analyticsConfigurations = props.analyticsConfigurations; | |
this.bucketEncryption = props.bucketEncryption; | |
this.bucketName = props.bucketName; | |
this.corsConfiguration = props.corsConfiguration; | |
this.inventoryConfigurations = props.inventoryConfigurations; | |
this.lifecycleConfiguration = props.lifecycleConfiguration; | |
this.loggingConfiguration = props.loggingConfiguration; | |
this.metricsConfigurations = props.metricsConfigurations; | |
this.notificationConfiguration = props.notificationConfiguration; | |
this.objectLockConfiguration = props.objectLockConfiguration; | |
this.objectLockEnabled = props.objectLockEnabled; | |
this.publicAccessBlockConfiguration = props.publicAccessBlockConfiguration; | |
this.replicationConfiguration = props.replicationConfiguration; | |
this.tags = new cdk.TagManager(cdk.TagType.STANDARD, "AWS::S3::Bucket", props.tags, { tagPropertyName: 'tags' }); | |
this.versioningConfiguration = props.versioningConfiguration; | |
this.websiteConfiguration = props.websiteConfiguration; | |
} | |
/** | |
* Examines the CloudFormation resource and discloses attributes. | |
* | |
* @param inspector - tree inspector to collect and process attributes | |
* | |
* @stability experimental | |
*/ | |
public inspect(inspector: cdk.TreeInspector) { | |
inspector.addAttribute("aws:cdk:cloudformation:type", CfnBucket.CFN_RESOURCE_TYPE_NAME); | |
inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties); | |
} | |
protected get cfnProperties(): { [key: string]: any } { | |
return { | |
accelerateConfiguration: this.accelerateConfiguration, | |
accessControl: this.accessControl, | |
analyticsConfigurations: this.analyticsConfigurations, | |
bucketEncryption: this.bucketEncryption, | |
bucketName: this.bucketName, | |
corsConfiguration: this.corsConfiguration, | |
inventoryConfigurations: this.inventoryConfigurations, | |
lifecycleConfiguration: this.lifecycleConfiguration, | |
loggingConfiguration: this.loggingConfiguration, | |
metricsConfigurations: this.metricsConfigurations, | |
notificationConfiguration: this.notificationConfiguration, | |
objectLockConfiguration: this.objectLockConfiguration, | |
objectLockEnabled: this.objectLockEnabled, | |
publicAccessBlockConfiguration: this.publicAccessBlockConfiguration, | |
replicationConfiguration: this.replicationConfiguration, | |
tags: this.tags.renderTags(), | |
versioningConfiguration: this.versioningConfiguration, | |
websiteConfiguration: this.websiteConfiguration, | |
}; | |
} | |
protected renderProperties(props: {[key: string]: any}): { [key: string]: any } { | |
return cfnBucketPropsToCloudFormation(props); | |
} | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-abortincompletemultipartupload.html | |
*/ | |
export interface AbortIncompleteMultipartUploadProperty { | |
/** | |
* `CfnBucket.AbortIncompleteMultipartUploadProperty.DaysAfterInitiation` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-abortincompletemultipartupload.html#cfn-s3-bucket-abortincompletemultipartupload-daysafterinitiation | |
*/ | |
readonly daysAfterInitiation: number; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `AbortIncompleteMultipartUploadProperty` | |
* | |
* @param properties - the TypeScript properties of a `AbortIncompleteMultipartUploadProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_AbortIncompleteMultipartUploadPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('daysAfterInitiation', cdk.requiredValidator)(properties.daysAfterInitiation)); | |
errors.collect(cdk.propertyValidator('daysAfterInitiation', cdk.validateNumber)(properties.daysAfterInitiation)); | |
return errors.wrap('supplied properties not correct for "AbortIncompleteMultipartUploadProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.AbortIncompleteMultipartUpload` resource | |
* | |
* @param properties - the TypeScript properties of a `AbortIncompleteMultipartUploadProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.AbortIncompleteMultipartUpload` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketAbortIncompleteMultipartUploadPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_AbortIncompleteMultipartUploadPropertyValidator(properties).assertSuccess(); | |
return { | |
DaysAfterInitiation: cdk.numberToCloudFormation(properties.daysAfterInitiation), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketAbortIncompleteMultipartUploadPropertyFromCloudFormation(properties: any): CfnBucket.AbortIncompleteMultipartUploadProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.AbortIncompleteMultipartUploadProperty = { | |
daysAfterInitiation: cdk.numberFromCloudFormation(properties.DaysAfterInitiation), | |
}; | |
CfnBucket_AbortIncompleteMultipartUploadPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accelerateconfiguration.html | |
*/ | |
export interface AccelerateConfigurationProperty { | |
/** | |
* `CfnBucket.AccelerateConfigurationProperty.AccelerationStatus` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accelerateconfiguration.html#cfn-s3-bucket-accelerateconfiguration-accelerationstatus | |
*/ | |
readonly accelerationStatus: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `AccelerateConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `AccelerateConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_AccelerateConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('accelerationStatus', cdk.requiredValidator)(properties.accelerationStatus)); | |
errors.collect(cdk.propertyValidator('accelerationStatus', cdk.validateString)(properties.accelerationStatus)); | |
return errors.wrap('supplied properties not correct for "AccelerateConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.AccelerateConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `AccelerateConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.AccelerateConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketAccelerateConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_AccelerateConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
AccelerationStatus: cdk.stringToCloudFormation(properties.accelerationStatus), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketAccelerateConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.AccelerateConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.AccelerateConfigurationProperty = { | |
accelerationStatus: cdk.stringFromCloudFormation(properties.AccelerationStatus), | |
}; | |
CfnBucket_AccelerateConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accesscontroltranslation.html | |
*/ | |
export interface AccessControlTranslationProperty { | |
/** | |
* `CfnBucket.AccessControlTranslationProperty.Owner` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accesscontroltranslation.html#cfn-s3-bucket-accesscontroltranslation-owner | |
*/ | |
readonly owner: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `AccessControlTranslationProperty` | |
* | |
* @param properties - the TypeScript properties of a `AccessControlTranslationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_AccessControlTranslationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('owner', cdk.requiredValidator)(properties.owner)); | |
errors.collect(cdk.propertyValidator('owner', cdk.validateString)(properties.owner)); | |
return errors.wrap('supplied properties not correct for "AccessControlTranslationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.AccessControlTranslation` resource | |
* | |
* @param properties - the TypeScript properties of a `AccessControlTranslationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.AccessControlTranslation` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketAccessControlTranslationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_AccessControlTranslationPropertyValidator(properties).assertSuccess(); | |
return { | |
Owner: cdk.stringToCloudFormation(properties.owner), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketAccessControlTranslationPropertyFromCloudFormation(properties: any): CfnBucket.AccessControlTranslationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.AccessControlTranslationProperty = { | |
owner: cdk.stringFromCloudFormation(properties.Owner), | |
}; | |
CfnBucket_AccessControlTranslationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html | |
*/ | |
export interface AnalyticsConfigurationProperty { | |
/** | |
* `CfnBucket.AnalyticsConfigurationProperty.Id` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-id | |
*/ | |
readonly id: string; | |
/** | |
* `CfnBucket.AnalyticsConfigurationProperty.Prefix` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-prefix | |
*/ | |
readonly prefix?: string; | |
/** | |
* `CfnBucket.AnalyticsConfigurationProperty.StorageClassAnalysis` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-storageclassanalysis | |
*/ | |
readonly storageClassAnalysis: CfnBucket.StorageClassAnalysisProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.AnalyticsConfigurationProperty.TagFilters` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-tagfilters | |
*/ | |
readonly tagFilters?: Array<CfnBucket.TagFilterProperty | cdk.IResolvable> | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `AnalyticsConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `AnalyticsConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_AnalyticsConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('id', cdk.requiredValidator)(properties.id)); | |
errors.collect(cdk.propertyValidator('id', cdk.validateString)(properties.id)); | |
errors.collect(cdk.propertyValidator('prefix', cdk.validateString)(properties.prefix)); | |
errors.collect(cdk.propertyValidator('storageClassAnalysis', cdk.requiredValidator)(properties.storageClassAnalysis)); | |
errors.collect(cdk.propertyValidator('storageClassAnalysis', CfnBucket_StorageClassAnalysisPropertyValidator)(properties.storageClassAnalysis)); | |
errors.collect(cdk.propertyValidator('tagFilters', cdk.listValidator(CfnBucket_TagFilterPropertyValidator))(properties.tagFilters)); | |
return errors.wrap('supplied properties not correct for "AnalyticsConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.AnalyticsConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `AnalyticsConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.AnalyticsConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketAnalyticsConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_AnalyticsConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
Id: cdk.stringToCloudFormation(properties.id), | |
Prefix: cdk.stringToCloudFormation(properties.prefix), | |
StorageClassAnalysis: cfnBucketStorageClassAnalysisPropertyToCloudFormation(properties.storageClassAnalysis), | |
TagFilters: cdk.listMapper(cfnBucketTagFilterPropertyToCloudFormation)(properties.tagFilters), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketAnalyticsConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.AnalyticsConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.AnalyticsConfigurationProperty = { | |
id: cdk.stringFromCloudFormation(properties.Id), | |
prefix: properties.Prefix == null ? undefined : cdk.stringFromCloudFormation(properties.Prefix), | |
storageClassAnalysis: CfnBucketStorageClassAnalysisPropertyFromCloudFormation(properties.StorageClassAnalysis), | |
tagFilters: cdk.cloudFormationArrayToCdkArray(properties.TagFilters, (prop1: any) => CfnBucketTagFilterPropertyFromCloudFormation(prop1)), | |
}; | |
CfnBucket_AnalyticsConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-bucketencryption.html | |
*/ | |
export interface BucketEncryptionProperty { | |
/** | |
* `CfnBucket.BucketEncryptionProperty.ServerSideEncryptionConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-bucketencryption.html#cfn-s3-bucket-bucketencryption-serversideencryptionconfiguration | |
*/ | |
readonly serverSideEncryptionConfiguration: Array<CfnBucket.ServerSideEncryptionRuleProperty | cdk.IResolvable> | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `BucketEncryptionProperty` | |
* | |
* @param properties - the TypeScript properties of a `BucketEncryptionProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_BucketEncryptionPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('serverSideEncryptionConfiguration', cdk.requiredValidator)(properties.serverSideEncryptionConfiguration)); | |
errors.collect(cdk.propertyValidator('serverSideEncryptionConfiguration', cdk.listValidator(CfnBucket_ServerSideEncryptionRulePropertyValidator))(properties.serverSideEncryptionConfiguration)); | |
return errors.wrap('supplied properties not correct for "BucketEncryptionProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.BucketEncryption` resource | |
* | |
* @param properties - the TypeScript properties of a `BucketEncryptionProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.BucketEncryption` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketBucketEncryptionPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_BucketEncryptionPropertyValidator(properties).assertSuccess(); | |
return { | |
ServerSideEncryptionConfiguration: cdk.listMapper(cfnBucketServerSideEncryptionRulePropertyToCloudFormation)(properties.serverSideEncryptionConfiguration), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketBucketEncryptionPropertyFromCloudFormation(properties: any): CfnBucket.BucketEncryptionProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.BucketEncryptionProperty = { | |
serverSideEncryptionConfiguration: cdk.cloudFormationArrayToCdkArray(properties.ServerSideEncryptionConfiguration, (prop1: any) => CfnBucketServerSideEncryptionRulePropertyFromCloudFormation(prop1)), | |
}; | |
CfnBucket_BucketEncryptionPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors.html | |
*/ | |
export interface CorsConfigurationProperty { | |
/** | |
* `CfnBucket.CorsConfigurationProperty.CorsRules` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors.html#cfn-s3-bucket-cors-corsrule | |
*/ | |
readonly corsRules: Array<CfnBucket.CorsRuleProperty | cdk.IResolvable> | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `CorsConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `CorsConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_CorsConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('corsRules', cdk.requiredValidator)(properties.corsRules)); | |
errors.collect(cdk.propertyValidator('corsRules', cdk.listValidator(CfnBucket_CorsRulePropertyValidator))(properties.corsRules)); | |
return errors.wrap('supplied properties not correct for "CorsConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.CorsConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `CorsConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.CorsConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketCorsConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_CorsConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
CorsRules: cdk.listMapper(cfnBucketCorsRulePropertyToCloudFormation)(properties.corsRules), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketCorsConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.CorsConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.CorsConfigurationProperty = { | |
corsRules: cdk.cloudFormationArrayToCdkArray(properties.CorsRules, (prop1: any) => CfnBucketCorsRulePropertyFromCloudFormation(prop1)), | |
}; | |
CfnBucket_CorsConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html | |
*/ | |
export interface CorsRuleProperty { | |
/** | |
* `CfnBucket.CorsRuleProperty.AllowedHeaders` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-allowedheaders | |
*/ | |
readonly allowedHeaders?: string[]; | |
/** | |
* `CfnBucket.CorsRuleProperty.AllowedMethods` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-allowedmethods | |
*/ | |
readonly allowedMethods: string[]; | |
/** | |
* `CfnBucket.CorsRuleProperty.AllowedOrigins` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-allowedorigins | |
*/ | |
readonly allowedOrigins: string[]; | |
/** | |
* `CfnBucket.CorsRuleProperty.ExposedHeaders` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-exposedheaders | |
*/ | |
readonly exposedHeaders?: string[]; | |
/** | |
* `CfnBucket.CorsRuleProperty.Id` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-id | |
*/ | |
readonly id?: string; | |
/** | |
* `CfnBucket.CorsRuleProperty.MaxAge` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-maxage | |
*/ | |
readonly maxAge?: number; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `CorsRuleProperty` | |
* | |
* @param properties - the TypeScript properties of a `CorsRuleProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_CorsRulePropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('allowedHeaders', cdk.listValidator(cdk.validateString))(properties.allowedHeaders)); | |
errors.collect(cdk.propertyValidator('allowedMethods', cdk.requiredValidator)(properties.allowedMethods)); | |
errors.collect(cdk.propertyValidator('allowedMethods', cdk.listValidator(cdk.validateString))(properties.allowedMethods)); | |
errors.collect(cdk.propertyValidator('allowedOrigins', cdk.requiredValidator)(properties.allowedOrigins)); | |
errors.collect(cdk.propertyValidator('allowedOrigins', cdk.listValidator(cdk.validateString))(properties.allowedOrigins)); | |
errors.collect(cdk.propertyValidator('exposedHeaders', cdk.listValidator(cdk.validateString))(properties.exposedHeaders)); | |
errors.collect(cdk.propertyValidator('id', cdk.validateString)(properties.id)); | |
errors.collect(cdk.propertyValidator('maxAge', cdk.validateNumber)(properties.maxAge)); | |
return errors.wrap('supplied properties not correct for "CorsRuleProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.CorsRule` resource | |
* | |
* @param properties - the TypeScript properties of a `CorsRuleProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.CorsRule` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketCorsRulePropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_CorsRulePropertyValidator(properties).assertSuccess(); | |
return { | |
AllowedHeaders: cdk.listMapper(cdk.stringToCloudFormation)(properties.allowedHeaders), | |
AllowedMethods: cdk.listMapper(cdk.stringToCloudFormation)(properties.allowedMethods), | |
AllowedOrigins: cdk.listMapper(cdk.stringToCloudFormation)(properties.allowedOrigins), | |
ExposedHeaders: cdk.listMapper(cdk.stringToCloudFormation)(properties.exposedHeaders), | |
Id: cdk.stringToCloudFormation(properties.id), | |
MaxAge: cdk.numberToCloudFormation(properties.maxAge), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketCorsRulePropertyFromCloudFormation(properties: any): CfnBucket.CorsRuleProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.CorsRuleProperty = { | |
allowedHeaders: cdk.stringArrayFromCloudFormation(properties.AllowedHeaders), | |
allowedMethods: cdk.stringArrayFromCloudFormation(properties.AllowedMethods), | |
allowedOrigins: cdk.stringArrayFromCloudFormation(properties.AllowedOrigins), | |
exposedHeaders: cdk.stringArrayFromCloudFormation(properties.ExposedHeaders), | |
id: properties.Id == null ? undefined : cdk.stringFromCloudFormation(properties.Id), | |
maxAge: properties.MaxAge == null ? undefined : cdk.numberFromCloudFormation(properties.MaxAge), | |
}; | |
CfnBucket_CorsRulePropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-dataexport.html | |
*/ | |
export interface DataExportProperty { | |
/** | |
* `CfnBucket.DataExportProperty.Destination` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-dataexport.html#cfn-s3-bucket-dataexport-destination | |
*/ | |
readonly destination: CfnBucket.DestinationProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.DataExportProperty.OutputSchemaVersion` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-dataexport.html#cfn-s3-bucket-dataexport-outputschemaversion | |
*/ | |
readonly outputSchemaVersion: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `DataExportProperty` | |
* | |
* @param properties - the TypeScript properties of a `DataExportProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_DataExportPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('destination', cdk.requiredValidator)(properties.destination)); | |
errors.collect(cdk.propertyValidator('destination', CfnBucket_DestinationPropertyValidator)(properties.destination)); | |
errors.collect(cdk.propertyValidator('outputSchemaVersion', cdk.requiredValidator)(properties.outputSchemaVersion)); | |
errors.collect(cdk.propertyValidator('outputSchemaVersion', cdk.validateString)(properties.outputSchemaVersion)); | |
return errors.wrap('supplied properties not correct for "DataExportProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.DataExport` resource | |
* | |
* @param properties - the TypeScript properties of a `DataExportProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.DataExport` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketDataExportPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_DataExportPropertyValidator(properties).assertSuccess(); | |
return { | |
Destination: cfnBucketDestinationPropertyToCloudFormation(properties.destination), | |
OutputSchemaVersion: cdk.stringToCloudFormation(properties.outputSchemaVersion), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketDataExportPropertyFromCloudFormation(properties: any): CfnBucket.DataExportProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.DataExportProperty = { | |
destination: CfnBucketDestinationPropertyFromCloudFormation(properties.Destination), | |
outputSchemaVersion: cdk.stringFromCloudFormation(properties.OutputSchemaVersion), | |
}; | |
CfnBucket_DataExportPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-defaultretention.html | |
*/ | |
export interface DefaultRetentionProperty { | |
/** | |
* `CfnBucket.DefaultRetentionProperty.Days` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-defaultretention.html#cfn-s3-bucket-defaultretention-days | |
*/ | |
readonly days?: number; | |
/** | |
* `CfnBucket.DefaultRetentionProperty.Mode` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-defaultretention.html#cfn-s3-bucket-defaultretention-mode | |
*/ | |
readonly mode?: string; | |
/** | |
* `CfnBucket.DefaultRetentionProperty.Years` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-defaultretention.html#cfn-s3-bucket-defaultretention-years | |
*/ | |
readonly years?: number; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `DefaultRetentionProperty` | |
* | |
* @param properties - the TypeScript properties of a `DefaultRetentionProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_DefaultRetentionPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('days', cdk.validateNumber)(properties.days)); | |
errors.collect(cdk.propertyValidator('mode', cdk.validateString)(properties.mode)); | |
errors.collect(cdk.propertyValidator('years', cdk.validateNumber)(properties.years)); | |
return errors.wrap('supplied properties not correct for "DefaultRetentionProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.DefaultRetention` resource | |
* | |
* @param properties - the TypeScript properties of a `DefaultRetentionProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.DefaultRetention` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketDefaultRetentionPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_DefaultRetentionPropertyValidator(properties).assertSuccess(); | |
return { | |
Days: cdk.numberToCloudFormation(properties.days), | |
Mode: cdk.stringToCloudFormation(properties.mode), | |
Years: cdk.numberToCloudFormation(properties.years), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketDefaultRetentionPropertyFromCloudFormation(properties: any): CfnBucket.DefaultRetentionProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.DefaultRetentionProperty = { | |
days: properties.Days == null ? undefined : cdk.numberFromCloudFormation(properties.Days), | |
mode: properties.Mode == null ? undefined : cdk.stringFromCloudFormation(properties.Mode), | |
years: properties.Years == null ? undefined : cdk.numberFromCloudFormation(properties.Years), | |
}; | |
CfnBucket_DefaultRetentionPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html | |
*/ | |
export interface DestinationProperty { | |
/** | |
* `CfnBucket.DestinationProperty.BucketAccountId` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-bucketaccountid | |
*/ | |
readonly bucketAccountId?: string; | |
/** | |
* `CfnBucket.DestinationProperty.BucketArn` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-bucketarn | |
*/ | |
readonly bucketArn: string; | |
/** | |
* `CfnBucket.DestinationProperty.Format` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-format | |
*/ | |
readonly format: string; | |
/** | |
* `CfnBucket.DestinationProperty.Prefix` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-prefix | |
*/ | |
readonly prefix?: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `DestinationProperty` | |
* | |
* @param properties - the TypeScript properties of a `DestinationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_DestinationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('bucketAccountId', cdk.validateString)(properties.bucketAccountId)); | |
errors.collect(cdk.propertyValidator('bucketArn', cdk.requiredValidator)(properties.bucketArn)); | |
errors.collect(cdk.propertyValidator('bucketArn', cdk.validateString)(properties.bucketArn)); | |
errors.collect(cdk.propertyValidator('format', cdk.requiredValidator)(properties.format)); | |
errors.collect(cdk.propertyValidator('format', cdk.validateString)(properties.format)); | |
errors.collect(cdk.propertyValidator('prefix', cdk.validateString)(properties.prefix)); | |
return errors.wrap('supplied properties not correct for "DestinationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.Destination` resource | |
* | |
* @param properties - the TypeScript properties of a `DestinationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.Destination` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketDestinationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_DestinationPropertyValidator(properties).assertSuccess(); | |
return { | |
BucketAccountId: cdk.stringToCloudFormation(properties.bucketAccountId), | |
BucketArn: cdk.stringToCloudFormation(properties.bucketArn), | |
Format: cdk.stringToCloudFormation(properties.format), | |
Prefix: cdk.stringToCloudFormation(properties.prefix), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketDestinationPropertyFromCloudFormation(properties: any): CfnBucket.DestinationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.DestinationProperty = { | |
bucketAccountId: properties.BucketAccountId == null ? undefined : cdk.stringFromCloudFormation(properties.BucketAccountId), | |
bucketArn: cdk.stringFromCloudFormation(properties.BucketArn), | |
format: cdk.stringFromCloudFormation(properties.Format), | |
prefix: properties.Prefix == null ? undefined : cdk.stringFromCloudFormation(properties.Prefix), | |
}; | |
CfnBucket_DestinationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-encryptionconfiguration.html | |
*/ | |
export interface EncryptionConfigurationProperty { | |
/** | |
* `CfnBucket.EncryptionConfigurationProperty.ReplicaKmsKeyID` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-encryptionconfiguration.html#cfn-s3-bucket-encryptionconfiguration-replicakmskeyid | |
*/ | |
readonly replicaKmsKeyId: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `EncryptionConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `EncryptionConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_EncryptionConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('replicaKmsKeyId', cdk.requiredValidator)(properties.replicaKmsKeyId)); | |
errors.collect(cdk.propertyValidator('replicaKmsKeyId', cdk.validateString)(properties.replicaKmsKeyId)); | |
return errors.wrap('supplied properties not correct for "EncryptionConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.EncryptionConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `EncryptionConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.EncryptionConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketEncryptionConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_EncryptionConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
ReplicaKmsKeyID: cdk.stringToCloudFormation(properties.replicaKmsKeyId), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketEncryptionConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.EncryptionConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.EncryptionConfigurationProperty = { | |
replicaKmsKeyId: cdk.stringFromCloudFormation(properties.ReplicaKmsKeyID), | |
}; | |
CfnBucket_EncryptionConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key-rules.html | |
*/ | |
export interface FilterRuleProperty { | |
/** | |
* `CfnBucket.FilterRuleProperty.Name` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key-rules.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key-rules-name | |
*/ | |
readonly name: string; | |
/** | |
* `CfnBucket.FilterRuleProperty.Value` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key-rules.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key-rules-value | |
*/ | |
readonly value: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `FilterRuleProperty` | |
* | |
* @param properties - the TypeScript properties of a `FilterRuleProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_FilterRulePropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name)); | |
errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name)); | |
errors.collect(cdk.propertyValidator('value', cdk.requiredValidator)(properties.value)); | |
errors.collect(cdk.propertyValidator('value', cdk.validateString)(properties.value)); | |
return errors.wrap('supplied properties not correct for "FilterRuleProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.FilterRule` resource | |
* | |
* @param properties - the TypeScript properties of a `FilterRuleProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.FilterRule` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketFilterRulePropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_FilterRulePropertyValidator(properties).assertSuccess(); | |
return { | |
Name: cdk.stringToCloudFormation(properties.name), | |
Value: cdk.stringToCloudFormation(properties.value), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketFilterRulePropertyFromCloudFormation(properties: any): CfnBucket.FilterRuleProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.FilterRuleProperty = { | |
name: cdk.stringFromCloudFormation(properties.Name), | |
value: cdk.stringFromCloudFormation(properties.Value), | |
}; | |
CfnBucket_FilterRulePropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html | |
*/ | |
export interface InventoryConfigurationProperty { | |
/** | |
* `CfnBucket.InventoryConfigurationProperty.Destination` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-destination | |
*/ | |
readonly destination: CfnBucket.DestinationProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.InventoryConfigurationProperty.Enabled` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-enabled | |
*/ | |
readonly enabled: boolean | cdk.IResolvable; | |
/** | |
* `CfnBucket.InventoryConfigurationProperty.Id` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-id | |
*/ | |
readonly id: string; | |
/** | |
* `CfnBucket.InventoryConfigurationProperty.IncludedObjectVersions` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-includedobjectversions | |
*/ | |
readonly includedObjectVersions: string; | |
/** | |
* `CfnBucket.InventoryConfigurationProperty.OptionalFields` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-optionalfields | |
*/ | |
readonly optionalFields?: string[]; | |
/** | |
* `CfnBucket.InventoryConfigurationProperty.Prefix` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-prefix | |
*/ | |
readonly prefix?: string; | |
/** | |
* `CfnBucket.InventoryConfigurationProperty.ScheduleFrequency` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-schedulefrequency | |
*/ | |
readonly scheduleFrequency: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `InventoryConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `InventoryConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_InventoryConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('destination', cdk.requiredValidator)(properties.destination)); | |
errors.collect(cdk.propertyValidator('destination', CfnBucket_DestinationPropertyValidator)(properties.destination)); | |
errors.collect(cdk.propertyValidator('enabled', cdk.requiredValidator)(properties.enabled)); | |
errors.collect(cdk.propertyValidator('enabled', cdk.validateBoolean)(properties.enabled)); | |
errors.collect(cdk.propertyValidator('id', cdk.requiredValidator)(properties.id)); | |
errors.collect(cdk.propertyValidator('id', cdk.validateString)(properties.id)); | |
errors.collect(cdk.propertyValidator('includedObjectVersions', cdk.requiredValidator)(properties.includedObjectVersions)); | |
errors.collect(cdk.propertyValidator('includedObjectVersions', cdk.validateString)(properties.includedObjectVersions)); | |
errors.collect(cdk.propertyValidator('optionalFields', cdk.listValidator(cdk.validateString))(properties.optionalFields)); | |
errors.collect(cdk.propertyValidator('prefix', cdk.validateString)(properties.prefix)); | |
errors.collect(cdk.propertyValidator('scheduleFrequency', cdk.requiredValidator)(properties.scheduleFrequency)); | |
errors.collect(cdk.propertyValidator('scheduleFrequency', cdk.validateString)(properties.scheduleFrequency)); | |
return errors.wrap('supplied properties not correct for "InventoryConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.InventoryConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `InventoryConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.InventoryConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketInventoryConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_InventoryConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
Destination: cfnBucketDestinationPropertyToCloudFormation(properties.destination), | |
Enabled: cdk.booleanToCloudFormation(properties.enabled), | |
Id: cdk.stringToCloudFormation(properties.id), | |
IncludedObjectVersions: cdk.stringToCloudFormation(properties.includedObjectVersions), | |
OptionalFields: cdk.listMapper(cdk.stringToCloudFormation)(properties.optionalFields), | |
Prefix: cdk.stringToCloudFormation(properties.prefix), | |
ScheduleFrequency: cdk.stringToCloudFormation(properties.scheduleFrequency), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketInventoryConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.InventoryConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.InventoryConfigurationProperty = { | |
destination: CfnBucketDestinationPropertyFromCloudFormation(properties.Destination), | |
enabled: cdk.booleanFromCloudFormation(properties.Enabled), | |
id: cdk.stringFromCloudFormation(properties.Id), | |
includedObjectVersions: cdk.stringFromCloudFormation(properties.IncludedObjectVersions), | |
optionalFields: cdk.stringArrayFromCloudFormation(properties.OptionalFields), | |
prefix: properties.Prefix == null ? undefined : cdk.stringFromCloudFormation(properties.Prefix), | |
scheduleFrequency: cdk.stringFromCloudFormation(properties.ScheduleFrequency), | |
}; | |
CfnBucket_InventoryConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html | |
*/ | |
export interface LambdaConfigurationProperty { | |
/** | |
* `CfnBucket.LambdaConfigurationProperty.Event` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig-event | |
*/ | |
readonly event: string; | |
/** | |
* `CfnBucket.LambdaConfigurationProperty.Filter` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig-filter | |
*/ | |
readonly filter?: CfnBucket.NotificationFilterProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.LambdaConfigurationProperty.Function` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig-function | |
*/ | |
readonly function: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `LambdaConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `LambdaConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_LambdaConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('event', cdk.requiredValidator)(properties.event)); | |
errors.collect(cdk.propertyValidator('event', cdk.validateString)(properties.event)); | |
errors.collect(cdk.propertyValidator('filter', CfnBucket_NotificationFilterPropertyValidator)(properties.filter)); | |
errors.collect(cdk.propertyValidator('function', cdk.requiredValidator)(properties.function)); | |
errors.collect(cdk.propertyValidator('function', cdk.validateString)(properties.function)); | |
return errors.wrap('supplied properties not correct for "LambdaConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.LambdaConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `LambdaConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.LambdaConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketLambdaConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_LambdaConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
Event: cdk.stringToCloudFormation(properties.event), | |
Filter: cfnBucketNotificationFilterPropertyToCloudFormation(properties.filter), | |
Function: cdk.stringToCloudFormation(properties.function), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketLambdaConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.LambdaConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.LambdaConfigurationProperty = { | |
event: cdk.stringFromCloudFormation(properties.Event), | |
filter: properties.Filter == null ? undefined : CfnBucketNotificationFilterPropertyFromCloudFormation(properties.Filter), | |
function: cdk.stringFromCloudFormation(properties.Function), | |
}; | |
CfnBucket_LambdaConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig.html | |
*/ | |
export interface LifecycleConfigurationProperty { | |
/** | |
* `CfnBucket.LifecycleConfigurationProperty.Rules` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig.html#cfn-s3-bucket-lifecycleconfig-rules | |
*/ | |
readonly rules: Array<CfnBucket.RuleProperty | cdk.IResolvable> | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `LifecycleConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `LifecycleConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_LifecycleConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('rules', cdk.requiredValidator)(properties.rules)); | |
errors.collect(cdk.propertyValidator('rules', cdk.listValidator(CfnBucket_RulePropertyValidator))(properties.rules)); | |
return errors.wrap('supplied properties not correct for "LifecycleConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.LifecycleConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `LifecycleConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.LifecycleConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketLifecycleConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_LifecycleConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
Rules: cdk.listMapper(cfnBucketRulePropertyToCloudFormation)(properties.rules), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketLifecycleConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.LifecycleConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.LifecycleConfigurationProperty = { | |
rules: cdk.cloudFormationArrayToCdkArray(properties.Rules, (prop1: any) => CfnBucketRulePropertyFromCloudFormation(prop1)), | |
}; | |
CfnBucket_LifecycleConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfig.html | |
*/ | |
export interface LoggingConfigurationProperty { | |
/** | |
* `CfnBucket.LoggingConfigurationProperty.DestinationBucketName` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfig.html#cfn-s3-bucket-loggingconfig-destinationbucketname | |
*/ | |
readonly destinationBucketName?: string; | |
/** | |
* `CfnBucket.LoggingConfigurationProperty.LogFilePrefix` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfig.html#cfn-s3-bucket-loggingconfig-logfileprefix | |
*/ | |
readonly logFilePrefix?: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `LoggingConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `LoggingConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_LoggingConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('destinationBucketName', cdk.validateString)(properties.destinationBucketName)); | |
errors.collect(cdk.propertyValidator('logFilePrefix', cdk.validateString)(properties.logFilePrefix)); | |
return errors.wrap('supplied properties not correct for "LoggingConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.LoggingConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `LoggingConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.LoggingConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketLoggingConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_LoggingConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
DestinationBucketName: cdk.stringToCloudFormation(properties.destinationBucketName), | |
LogFilePrefix: cdk.stringToCloudFormation(properties.logFilePrefix), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketLoggingConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.LoggingConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.LoggingConfigurationProperty = { | |
destinationBucketName: properties.DestinationBucketName == null ? undefined : cdk.stringFromCloudFormation(properties.DestinationBucketName), | |
logFilePrefix: properties.LogFilePrefix == null ? undefined : cdk.stringFromCloudFormation(properties.LogFilePrefix), | |
}; | |
CfnBucket_LoggingConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html | |
*/ | |
export interface MetricsConfigurationProperty { | |
/** | |
* `CfnBucket.MetricsConfigurationProperty.Id` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-id | |
*/ | |
readonly id: string; | |
/** | |
* `CfnBucket.MetricsConfigurationProperty.Prefix` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-prefix | |
*/ | |
readonly prefix?: string; | |
/** | |
* `CfnBucket.MetricsConfigurationProperty.TagFilters` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-tagfilters | |
*/ | |
readonly tagFilters?: Array<CfnBucket.TagFilterProperty | cdk.IResolvable> | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `MetricsConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `MetricsConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_MetricsConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('id', cdk.requiredValidator)(properties.id)); | |
errors.collect(cdk.propertyValidator('id', cdk.validateString)(properties.id)); | |
errors.collect(cdk.propertyValidator('prefix', cdk.validateString)(properties.prefix)); | |
errors.collect(cdk.propertyValidator('tagFilters', cdk.listValidator(CfnBucket_TagFilterPropertyValidator))(properties.tagFilters)); | |
return errors.wrap('supplied properties not correct for "MetricsConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.MetricsConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `MetricsConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.MetricsConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketMetricsConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_MetricsConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
Id: cdk.stringToCloudFormation(properties.id), | |
Prefix: cdk.stringToCloudFormation(properties.prefix), | |
TagFilters: cdk.listMapper(cfnBucketTagFilterPropertyToCloudFormation)(properties.tagFilters), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketMetricsConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.MetricsConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.MetricsConfigurationProperty = { | |
id: cdk.stringFromCloudFormation(properties.Id), | |
prefix: properties.Prefix == null ? undefined : cdk.stringFromCloudFormation(properties.Prefix), | |
tagFilters: cdk.cloudFormationArrayToCdkArray(properties.TagFilters, (prop1: any) => CfnBucketTagFilterPropertyFromCloudFormation(prop1)), | |
}; | |
CfnBucket_MetricsConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition.html | |
*/ | |
export interface NoncurrentVersionTransitionProperty { | |
/** | |
* `CfnBucket.NoncurrentVersionTransitionProperty.StorageClass` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition-storageclass | |
*/ | |
readonly storageClass: string; | |
/** | |
* `CfnBucket.NoncurrentVersionTransitionProperty.TransitionInDays` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition-transitionindays | |
*/ | |
readonly transitionInDays: number; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `NoncurrentVersionTransitionProperty` | |
* | |
* @param properties - the TypeScript properties of a `NoncurrentVersionTransitionProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_NoncurrentVersionTransitionPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('storageClass', cdk.requiredValidator)(properties.storageClass)); | |
errors.collect(cdk.propertyValidator('storageClass', cdk.validateString)(properties.storageClass)); | |
errors.collect(cdk.propertyValidator('transitionInDays', cdk.requiredValidator)(properties.transitionInDays)); | |
errors.collect(cdk.propertyValidator('transitionInDays', cdk.validateNumber)(properties.transitionInDays)); | |
return errors.wrap('supplied properties not correct for "NoncurrentVersionTransitionProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.NoncurrentVersionTransition` resource | |
* | |
* @param properties - the TypeScript properties of a `NoncurrentVersionTransitionProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.NoncurrentVersionTransition` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketNoncurrentVersionTransitionPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_NoncurrentVersionTransitionPropertyValidator(properties).assertSuccess(); | |
return { | |
StorageClass: cdk.stringToCloudFormation(properties.storageClass), | |
TransitionInDays: cdk.numberToCloudFormation(properties.transitionInDays), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketNoncurrentVersionTransitionPropertyFromCloudFormation(properties: any): CfnBucket.NoncurrentVersionTransitionProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.NoncurrentVersionTransitionProperty = { | |
storageClass: cdk.stringFromCloudFormation(properties.StorageClass), | |
transitionInDays: cdk.numberFromCloudFormation(properties.TransitionInDays), | |
}; | |
CfnBucket_NoncurrentVersionTransitionPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig.html | |
*/ | |
export interface NotificationConfigurationProperty { | |
/** | |
* `CfnBucket.NotificationConfigurationProperty.LambdaConfigurations` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig | |
*/ | |
readonly lambdaConfigurations?: Array<CfnBucket.LambdaConfigurationProperty | cdk.IResolvable> | cdk.IResolvable; | |
/** | |
* `CfnBucket.NotificationConfigurationProperty.QueueConfigurations` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig.html#cfn-s3-bucket-notificationconfig-queueconfig | |
*/ | |
readonly queueConfigurations?: Array<CfnBucket.QueueConfigurationProperty | cdk.IResolvable> | cdk.IResolvable; | |
/** | |
* `CfnBucket.NotificationConfigurationProperty.TopicConfigurations` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig.html#cfn-s3-bucket-notificationconfig-topicconfig | |
*/ | |
readonly topicConfigurations?: Array<CfnBucket.TopicConfigurationProperty | cdk.IResolvable> | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `NotificationConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `NotificationConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_NotificationConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('lambdaConfigurations', cdk.listValidator(CfnBucket_LambdaConfigurationPropertyValidator))(properties.lambdaConfigurations)); | |
errors.collect(cdk.propertyValidator('queueConfigurations', cdk.listValidator(CfnBucket_QueueConfigurationPropertyValidator))(properties.queueConfigurations)); | |
errors.collect(cdk.propertyValidator('topicConfigurations', cdk.listValidator(CfnBucket_TopicConfigurationPropertyValidator))(properties.topicConfigurations)); | |
return errors.wrap('supplied properties not correct for "NotificationConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.NotificationConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `NotificationConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.NotificationConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketNotificationConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_NotificationConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
LambdaConfigurations: cdk.listMapper(cfnBucketLambdaConfigurationPropertyToCloudFormation)(properties.lambdaConfigurations), | |
QueueConfigurations: cdk.listMapper(cfnBucketQueueConfigurationPropertyToCloudFormation)(properties.queueConfigurations), | |
TopicConfigurations: cdk.listMapper(cfnBucketTopicConfigurationPropertyToCloudFormation)(properties.topicConfigurations), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketNotificationConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.NotificationConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.NotificationConfigurationProperty = { | |
lambdaConfigurations: cdk.cloudFormationArrayToCdkArray(properties.LambdaConfigurations, (prop1: any) => CfnBucketLambdaConfigurationPropertyFromCloudFormation(prop1)), | |
queueConfigurations: cdk.cloudFormationArrayToCdkArray(properties.QueueConfigurations, (prop1: any) => CfnBucketQueueConfigurationPropertyFromCloudFormation(prop1)), | |
topicConfigurations: cdk.cloudFormationArrayToCdkArray(properties.TopicConfigurations, (prop1: any) => CfnBucketTopicConfigurationPropertyFromCloudFormation(prop1)), | |
}; | |
CfnBucket_NotificationConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter.html | |
*/ | |
export interface NotificationFilterProperty { | |
/** | |
* `CfnBucket.NotificationFilterProperty.S3Key` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key | |
*/ | |
readonly s3Key: CfnBucket.S3KeyFilterProperty | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `NotificationFilterProperty` | |
* | |
* @param properties - the TypeScript properties of a `NotificationFilterProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_NotificationFilterPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('s3Key', cdk.requiredValidator)(properties.s3Key)); | |
errors.collect(cdk.propertyValidator('s3Key', CfnBucket_S3KeyFilterPropertyValidator)(properties.s3Key)); | |
return errors.wrap('supplied properties not correct for "NotificationFilterProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.NotificationFilter` resource | |
* | |
* @param properties - the TypeScript properties of a `NotificationFilterProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.NotificationFilter` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketNotificationFilterPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_NotificationFilterPropertyValidator(properties).assertSuccess(); | |
return { | |
S3Key: cfnBucketS3KeyFilterPropertyToCloudFormation(properties.s3Key), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketNotificationFilterPropertyFromCloudFormation(properties: any): CfnBucket.NotificationFilterProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.NotificationFilterProperty = { | |
s3Key: CfnBucketS3KeyFilterPropertyFromCloudFormation(properties.S3Key), | |
}; | |
CfnBucket_NotificationFilterPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-objectlockconfiguration.html | |
*/ | |
export interface ObjectLockConfigurationProperty { | |
/** | |
* `CfnBucket.ObjectLockConfigurationProperty.ObjectLockEnabled` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-objectlockconfiguration.html#cfn-s3-bucket-objectlockconfiguration-objectlockenabled | |
*/ | |
readonly objectLockEnabled?: string; | |
/** | |
* `CfnBucket.ObjectLockConfigurationProperty.Rule` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-objectlockconfiguration.html#cfn-s3-bucket-objectlockconfiguration-rule | |
*/ | |
readonly rule?: CfnBucket.ObjectLockRuleProperty | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `ObjectLockConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `ObjectLockConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_ObjectLockConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('objectLockEnabled', cdk.validateString)(properties.objectLockEnabled)); | |
errors.collect(cdk.propertyValidator('rule', CfnBucket_ObjectLockRulePropertyValidator)(properties.rule)); | |
return errors.wrap('supplied properties not correct for "ObjectLockConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.ObjectLockConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `ObjectLockConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.ObjectLockConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketObjectLockConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_ObjectLockConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
ObjectLockEnabled: cdk.stringToCloudFormation(properties.objectLockEnabled), | |
Rule: cfnBucketObjectLockRulePropertyToCloudFormation(properties.rule), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketObjectLockConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.ObjectLockConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.ObjectLockConfigurationProperty = { | |
objectLockEnabled: properties.ObjectLockEnabled == null ? undefined : cdk.stringFromCloudFormation(properties.ObjectLockEnabled), | |
rule: properties.Rule == null ? undefined : CfnBucketObjectLockRulePropertyFromCloudFormation(properties.Rule), | |
}; | |
CfnBucket_ObjectLockConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-objectlockrule.html | |
*/ | |
export interface ObjectLockRuleProperty { | |
/** | |
* `CfnBucket.ObjectLockRuleProperty.DefaultRetention` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-objectlockrule.html#cfn-s3-bucket-objectlockrule-defaultretention | |
*/ | |
readonly defaultRetention?: CfnBucket.DefaultRetentionProperty | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `ObjectLockRuleProperty` | |
* | |
* @param properties - the TypeScript properties of a `ObjectLockRuleProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_ObjectLockRulePropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('defaultRetention', CfnBucket_DefaultRetentionPropertyValidator)(properties.defaultRetention)); | |
return errors.wrap('supplied properties not correct for "ObjectLockRuleProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.ObjectLockRule` resource | |
* | |
* @param properties - the TypeScript properties of a `ObjectLockRuleProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.ObjectLockRule` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketObjectLockRulePropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_ObjectLockRulePropertyValidator(properties).assertSuccess(); | |
return { | |
DefaultRetention: cfnBucketDefaultRetentionPropertyToCloudFormation(properties.defaultRetention), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketObjectLockRulePropertyFromCloudFormation(properties: any): CfnBucket.ObjectLockRuleProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.ObjectLockRuleProperty = { | |
defaultRetention: properties.DefaultRetention == null ? undefined : CfnBucketDefaultRetentionPropertyFromCloudFormation(properties.DefaultRetention), | |
}; | |
CfnBucket_ObjectLockRulePropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html | |
*/ | |
export interface PublicAccessBlockConfigurationProperty { | |
/** | |
* `CfnBucket.PublicAccessBlockConfigurationProperty.BlockPublicAcls` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-blockpublicacls | |
*/ | |
readonly blockPublicAcls?: boolean | cdk.IResolvable; | |
/** | |
* `CfnBucket.PublicAccessBlockConfigurationProperty.BlockPublicPolicy` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-blockpublicpolicy | |
*/ | |
readonly blockPublicPolicy?: boolean | cdk.IResolvable; | |
/** | |
* `CfnBucket.PublicAccessBlockConfigurationProperty.IgnorePublicAcls` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-ignorepublicacls | |
*/ | |
readonly ignorePublicAcls?: boolean | cdk.IResolvable; | |
/** | |
* `CfnBucket.PublicAccessBlockConfigurationProperty.RestrictPublicBuckets` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-restrictpublicbuckets | |
*/ | |
readonly restrictPublicBuckets?: boolean | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `PublicAccessBlockConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `PublicAccessBlockConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_PublicAccessBlockConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('blockPublicAcls', cdk.validateBoolean)(properties.blockPublicAcls)); | |
errors.collect(cdk.propertyValidator('blockPublicPolicy', cdk.validateBoolean)(properties.blockPublicPolicy)); | |
errors.collect(cdk.propertyValidator('ignorePublicAcls', cdk.validateBoolean)(properties.ignorePublicAcls)); | |
errors.collect(cdk.propertyValidator('restrictPublicBuckets', cdk.validateBoolean)(properties.restrictPublicBuckets)); | |
return errors.wrap('supplied properties not correct for "PublicAccessBlockConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.PublicAccessBlockConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `PublicAccessBlockConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.PublicAccessBlockConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketPublicAccessBlockConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_PublicAccessBlockConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
BlockPublicAcls: cdk.booleanToCloudFormation(properties.blockPublicAcls), | |
BlockPublicPolicy: cdk.booleanToCloudFormation(properties.blockPublicPolicy), | |
IgnorePublicAcls: cdk.booleanToCloudFormation(properties.ignorePublicAcls), | |
RestrictPublicBuckets: cdk.booleanToCloudFormation(properties.restrictPublicBuckets), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketPublicAccessBlockConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.PublicAccessBlockConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.PublicAccessBlockConfigurationProperty = { | |
blockPublicAcls: properties.BlockPublicAcls == null ? undefined : cdk.booleanFromCloudFormation(properties.BlockPublicAcls), | |
blockPublicPolicy: properties.BlockPublicPolicy == null ? undefined : cdk.booleanFromCloudFormation(properties.BlockPublicPolicy), | |
ignorePublicAcls: properties.IgnorePublicAcls == null ? undefined : cdk.booleanFromCloudFormation(properties.IgnorePublicAcls), | |
restrictPublicBuckets: properties.RestrictPublicBuckets == null ? undefined : cdk.booleanFromCloudFormation(properties.RestrictPublicBuckets), | |
}; | |
CfnBucket_PublicAccessBlockConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-queueconfig.html | |
*/ | |
export interface QueueConfigurationProperty { | |
/** | |
* `CfnBucket.QueueConfigurationProperty.Event` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-queueconfig.html#cfn-s3-bucket-notificationconfig-queueconfig-event | |
*/ | |
readonly event: string; | |
/** | |
* `CfnBucket.QueueConfigurationProperty.Filter` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-queueconfig.html#cfn-s3-bucket-notificationconfig-queueconfig-filter | |
*/ | |
readonly filter?: CfnBucket.NotificationFilterProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.QueueConfigurationProperty.Queue` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-queueconfig.html#cfn-s3-bucket-notificationconfig-queueconfig-queue | |
*/ | |
readonly queue: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `QueueConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `QueueConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_QueueConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('event', cdk.requiredValidator)(properties.event)); | |
errors.collect(cdk.propertyValidator('event', cdk.validateString)(properties.event)); | |
errors.collect(cdk.propertyValidator('filter', CfnBucket_NotificationFilterPropertyValidator)(properties.filter)); | |
errors.collect(cdk.propertyValidator('queue', cdk.requiredValidator)(properties.queue)); | |
errors.collect(cdk.propertyValidator('queue', cdk.validateString)(properties.queue)); | |
return errors.wrap('supplied properties not correct for "QueueConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.QueueConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `QueueConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.QueueConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketQueueConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_QueueConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
Event: cdk.stringToCloudFormation(properties.event), | |
Filter: cfnBucketNotificationFilterPropertyToCloudFormation(properties.filter), | |
Queue: cdk.stringToCloudFormation(properties.queue), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketQueueConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.QueueConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.QueueConfigurationProperty = { | |
event: cdk.stringFromCloudFormation(properties.Event), | |
filter: properties.Filter == null ? undefined : CfnBucketNotificationFilterPropertyFromCloudFormation(properties.Filter), | |
queue: cdk.stringFromCloudFormation(properties.Queue), | |
}; | |
CfnBucket_QueueConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-redirectallrequeststo.html | |
*/ | |
export interface RedirectAllRequestsToProperty { | |
/** | |
* `CfnBucket.RedirectAllRequestsToProperty.HostName` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-redirectallrequeststo.html#cfn-s3-websiteconfiguration-redirectallrequeststo-hostname | |
*/ | |
readonly hostName: string; | |
/** | |
* `CfnBucket.RedirectAllRequestsToProperty.Protocol` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-redirectallrequeststo.html#cfn-s3-websiteconfiguration-redirectallrequeststo-protocol | |
*/ | |
readonly protocol?: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `RedirectAllRequestsToProperty` | |
* | |
* @param properties - the TypeScript properties of a `RedirectAllRequestsToProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_RedirectAllRequestsToPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('hostName', cdk.requiredValidator)(properties.hostName)); | |
errors.collect(cdk.propertyValidator('hostName', cdk.validateString)(properties.hostName)); | |
errors.collect(cdk.propertyValidator('protocol', cdk.validateString)(properties.protocol)); | |
return errors.wrap('supplied properties not correct for "RedirectAllRequestsToProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.RedirectAllRequestsTo` resource | |
* | |
* @param properties - the TypeScript properties of a `RedirectAllRequestsToProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.RedirectAllRequestsTo` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketRedirectAllRequestsToPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_RedirectAllRequestsToPropertyValidator(properties).assertSuccess(); | |
return { | |
HostName: cdk.stringToCloudFormation(properties.hostName), | |
Protocol: cdk.stringToCloudFormation(properties.protocol), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketRedirectAllRequestsToPropertyFromCloudFormation(properties: any): CfnBucket.RedirectAllRequestsToProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.RedirectAllRequestsToProperty = { | |
hostName: cdk.stringFromCloudFormation(properties.HostName), | |
protocol: properties.Protocol == null ? undefined : cdk.stringFromCloudFormation(properties.Protocol), | |
}; | |
CfnBucket_RedirectAllRequestsToPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html | |
*/ | |
export interface RedirectRuleProperty { | |
/** | |
* `CfnBucket.RedirectRuleProperty.HostName` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-redirectrule-hostname | |
*/ | |
readonly hostName?: string; | |
/** | |
* `CfnBucket.RedirectRuleProperty.HttpRedirectCode` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-redirectrule-httpredirectcode | |
*/ | |
readonly httpRedirectCode?: string; | |
/** | |
* `CfnBucket.RedirectRuleProperty.Protocol` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-redirectrule-protocol | |
*/ | |
readonly protocol?: string; | |
/** | |
* `CfnBucket.RedirectRuleProperty.ReplaceKeyPrefixWith` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-redirectrule-replacekeyprefixwith | |
*/ | |
readonly replaceKeyPrefixWith?: string; | |
/** | |
* `CfnBucket.RedirectRuleProperty.ReplaceKeyWith` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-redirectrule-replacekeywith | |
*/ | |
readonly replaceKeyWith?: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `RedirectRuleProperty` | |
* | |
* @param properties - the TypeScript properties of a `RedirectRuleProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_RedirectRulePropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('hostName', cdk.validateString)(properties.hostName)); | |
errors.collect(cdk.propertyValidator('httpRedirectCode', cdk.validateString)(properties.httpRedirectCode)); | |
errors.collect(cdk.propertyValidator('protocol', cdk.validateString)(properties.protocol)); | |
errors.collect(cdk.propertyValidator('replaceKeyPrefixWith', cdk.validateString)(properties.replaceKeyPrefixWith)); | |
errors.collect(cdk.propertyValidator('replaceKeyWith', cdk.validateString)(properties.replaceKeyWith)); | |
return errors.wrap('supplied properties not correct for "RedirectRuleProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.RedirectRule` resource | |
* | |
* @param properties - the TypeScript properties of a `RedirectRuleProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.RedirectRule` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketRedirectRulePropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_RedirectRulePropertyValidator(properties).assertSuccess(); | |
return { | |
HostName: cdk.stringToCloudFormation(properties.hostName), | |
HttpRedirectCode: cdk.stringToCloudFormation(properties.httpRedirectCode), | |
Protocol: cdk.stringToCloudFormation(properties.protocol), | |
ReplaceKeyPrefixWith: cdk.stringToCloudFormation(properties.replaceKeyPrefixWith), | |
ReplaceKeyWith: cdk.stringToCloudFormation(properties.replaceKeyWith), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketRedirectRulePropertyFromCloudFormation(properties: any): CfnBucket.RedirectRuleProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.RedirectRuleProperty = { | |
hostName: properties.HostName == null ? undefined : cdk.stringFromCloudFormation(properties.HostName), | |
httpRedirectCode: properties.HttpRedirectCode == null ? undefined : cdk.stringFromCloudFormation(properties.HttpRedirectCode), | |
protocol: properties.Protocol == null ? undefined : cdk.stringFromCloudFormation(properties.Protocol), | |
replaceKeyPrefixWith: properties.ReplaceKeyPrefixWith == null ? undefined : cdk.stringFromCloudFormation(properties.ReplaceKeyPrefixWith), | |
replaceKeyWith: properties.ReplaceKeyWith == null ? undefined : cdk.stringFromCloudFormation(properties.ReplaceKeyWith), | |
}; | |
CfnBucket_RedirectRulePropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.html | |
*/ | |
export interface ReplicationConfigurationProperty { | |
/** | |
* `CfnBucket.ReplicationConfigurationProperty.Role` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.html#cfn-s3-bucket-replicationconfiguration-role | |
*/ | |
readonly role: string; | |
/** | |
* `CfnBucket.ReplicationConfigurationProperty.Rules` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.html#cfn-s3-bucket-replicationconfiguration-rules | |
*/ | |
readonly rules: Array<CfnBucket.ReplicationRuleProperty | cdk.IResolvable> | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `ReplicationConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `ReplicationConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_ReplicationConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('role', cdk.requiredValidator)(properties.role)); | |
errors.collect(cdk.propertyValidator('role', cdk.validateString)(properties.role)); | |
errors.collect(cdk.propertyValidator('rules', cdk.requiredValidator)(properties.rules)); | |
errors.collect(cdk.propertyValidator('rules', cdk.listValidator(CfnBucket_ReplicationRulePropertyValidator))(properties.rules)); | |
return errors.wrap('supplied properties not correct for "ReplicationConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.ReplicationConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `ReplicationConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.ReplicationConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketReplicationConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_ReplicationConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
Role: cdk.stringToCloudFormation(properties.role), | |
Rules: cdk.listMapper(cfnBucketReplicationRulePropertyToCloudFormation)(properties.rules), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketReplicationConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.ReplicationConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.ReplicationConfigurationProperty = { | |
role: cdk.stringFromCloudFormation(properties.Role), | |
rules: cdk.cloudFormationArrayToCdkArray(properties.Rules, (prop1: any) => CfnBucketReplicationRulePropertyFromCloudFormation(prop1)), | |
}; | |
CfnBucket_ReplicationConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html | |
*/ | |
export interface ReplicationDestinationProperty { | |
/** | |
* `CfnBucket.ReplicationDestinationProperty.AccessControlTranslation` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html#cfn-s3-bucket-replicationdestination-accesscontroltranslation | |
*/ | |
readonly accessControlTranslation?: CfnBucket.AccessControlTranslationProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.ReplicationDestinationProperty.Account` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html#cfn-s3-bucket-replicationdestination-account | |
*/ | |
readonly account?: string; | |
/** | |
* `CfnBucket.ReplicationDestinationProperty.Bucket` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html#cfn-s3-bucket-replicationconfiguration-rules-destination-bucket | |
*/ | |
readonly bucket: string; | |
/** | |
* `CfnBucket.ReplicationDestinationProperty.EncryptionConfiguration` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html#cfn-s3-bucket-replicationdestination-encryptionconfiguration | |
*/ | |
readonly encryptionConfiguration?: CfnBucket.EncryptionConfigurationProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.ReplicationDestinationProperty.StorageClass` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html#cfn-s3-bucket-replicationconfiguration-rules-destination-storageclass | |
*/ | |
readonly storageClass?: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `ReplicationDestinationProperty` | |
* | |
* @param properties - the TypeScript properties of a `ReplicationDestinationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_ReplicationDestinationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('accessControlTranslation', CfnBucket_AccessControlTranslationPropertyValidator)(properties.accessControlTranslation)); | |
errors.collect(cdk.propertyValidator('account', cdk.validateString)(properties.account)); | |
errors.collect(cdk.propertyValidator('bucket', cdk.requiredValidator)(properties.bucket)); | |
errors.collect(cdk.propertyValidator('bucket', cdk.validateString)(properties.bucket)); | |
errors.collect(cdk.propertyValidator('encryptionConfiguration', CfnBucket_EncryptionConfigurationPropertyValidator)(properties.encryptionConfiguration)); | |
errors.collect(cdk.propertyValidator('storageClass', cdk.validateString)(properties.storageClass)); | |
return errors.wrap('supplied properties not correct for "ReplicationDestinationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.ReplicationDestination` resource | |
* | |
* @param properties - the TypeScript properties of a `ReplicationDestinationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.ReplicationDestination` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketReplicationDestinationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_ReplicationDestinationPropertyValidator(properties).assertSuccess(); | |
return { | |
AccessControlTranslation: cfnBucketAccessControlTranslationPropertyToCloudFormation(properties.accessControlTranslation), | |
Account: cdk.stringToCloudFormation(properties.account), | |
Bucket: cdk.stringToCloudFormation(properties.bucket), | |
EncryptionConfiguration: cfnBucketEncryptionConfigurationPropertyToCloudFormation(properties.encryptionConfiguration), | |
StorageClass: cdk.stringToCloudFormation(properties.storageClass), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketReplicationDestinationPropertyFromCloudFormation(properties: any): CfnBucket.ReplicationDestinationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.ReplicationDestinationProperty = { | |
accessControlTranslation: properties.AccessControlTranslation == null ? undefined : CfnBucketAccessControlTranslationPropertyFromCloudFormation(properties.AccessControlTranslation), | |
account: properties.Account == null ? undefined : cdk.stringFromCloudFormation(properties.Account), | |
bucket: cdk.stringFromCloudFormation(properties.Bucket), | |
encryptionConfiguration: properties.EncryptionConfiguration == null ? undefined : CfnBucketEncryptionConfigurationPropertyFromCloudFormation(properties.EncryptionConfiguration), | |
storageClass: properties.StorageClass == null ? undefined : cdk.stringFromCloudFormation(properties.StorageClass), | |
}; | |
CfnBucket_ReplicationDestinationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html | |
*/ | |
export interface ReplicationRuleProperty { | |
/** | |
* `CfnBucket.ReplicationRuleProperty.Destination` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-destination | |
*/ | |
readonly destination: CfnBucket.ReplicationDestinationProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.ReplicationRuleProperty.Id` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-id | |
*/ | |
readonly id?: string; | |
/** | |
* `CfnBucket.ReplicationRuleProperty.Prefix` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-prefix | |
*/ | |
readonly prefix: string; | |
/** | |
* `CfnBucket.ReplicationRuleProperty.SourceSelectionCriteria` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationrule-sourceselectioncriteria | |
*/ | |
readonly sourceSelectionCriteria?: CfnBucket.SourceSelectionCriteriaProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.ReplicationRuleProperty.Status` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-status | |
*/ | |
readonly status: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `ReplicationRuleProperty` | |
* | |
* @param properties - the TypeScript properties of a `ReplicationRuleProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_ReplicationRulePropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('destination', cdk.requiredValidator)(properties.destination)); | |
errors.collect(cdk.propertyValidator('destination', CfnBucket_ReplicationDestinationPropertyValidator)(properties.destination)); | |
errors.collect(cdk.propertyValidator('id', cdk.validateString)(properties.id)); | |
errors.collect(cdk.propertyValidator('prefix', cdk.requiredValidator)(properties.prefix)); | |
errors.collect(cdk.propertyValidator('prefix', cdk.validateString)(properties.prefix)); | |
errors.collect(cdk.propertyValidator('sourceSelectionCriteria', CfnBucket_SourceSelectionCriteriaPropertyValidator)(properties.sourceSelectionCriteria)); | |
errors.collect(cdk.propertyValidator('status', cdk.requiredValidator)(properties.status)); | |
errors.collect(cdk.propertyValidator('status', cdk.validateString)(properties.status)); | |
return errors.wrap('supplied properties not correct for "ReplicationRuleProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.ReplicationRule` resource | |
* | |
* @param properties - the TypeScript properties of a `ReplicationRuleProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.ReplicationRule` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketReplicationRulePropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_ReplicationRulePropertyValidator(properties).assertSuccess(); | |
return { | |
Destination: cfnBucketReplicationDestinationPropertyToCloudFormation(properties.destination), | |
Id: cdk.stringToCloudFormation(properties.id), | |
Prefix: cdk.stringToCloudFormation(properties.prefix), | |
SourceSelectionCriteria: cfnBucketSourceSelectionCriteriaPropertyToCloudFormation(properties.sourceSelectionCriteria), | |
Status: cdk.stringToCloudFormation(properties.status), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketReplicationRulePropertyFromCloudFormation(properties: any): CfnBucket.ReplicationRuleProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.ReplicationRuleProperty = { | |
destination: CfnBucketReplicationDestinationPropertyFromCloudFormation(properties.Destination), | |
id: properties.Id == null ? undefined : cdk.stringFromCloudFormation(properties.Id), | |
prefix: cdk.stringFromCloudFormation(properties.Prefix), | |
sourceSelectionCriteria: properties.SourceSelectionCriteria == null ? undefined : CfnBucketSourceSelectionCriteriaPropertyFromCloudFormation(properties.SourceSelectionCriteria), | |
status: cdk.stringFromCloudFormation(properties.Status), | |
}; | |
CfnBucket_ReplicationRulePropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html | |
*/ | |
export interface RoutingRuleProperty { | |
/** | |
* `CfnBucket.RoutingRuleProperty.RedirectRule` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html#cfn-s3-websiteconfiguration-routingrules-redirectrule | |
*/ | |
readonly redirectRule: CfnBucket.RedirectRuleProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.RoutingRuleProperty.RoutingRuleCondition` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html#cfn-s3-websiteconfiguration-routingrules-routingrulecondition | |
*/ | |
readonly routingRuleCondition?: CfnBucket.RoutingRuleConditionProperty | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `RoutingRuleProperty` | |
* | |
* @param properties - the TypeScript properties of a `RoutingRuleProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_RoutingRulePropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('redirectRule', cdk.requiredValidator)(properties.redirectRule)); | |
errors.collect(cdk.propertyValidator('redirectRule', CfnBucket_RedirectRulePropertyValidator)(properties.redirectRule)); | |
errors.collect(cdk.propertyValidator('routingRuleCondition', CfnBucket_RoutingRuleConditionPropertyValidator)(properties.routingRuleCondition)); | |
return errors.wrap('supplied properties not correct for "RoutingRuleProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.RoutingRule` resource | |
* | |
* @param properties - the TypeScript properties of a `RoutingRuleProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.RoutingRule` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketRoutingRulePropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_RoutingRulePropertyValidator(properties).assertSuccess(); | |
return { | |
RedirectRule: cfnBucketRedirectRulePropertyToCloudFormation(properties.redirectRule), | |
RoutingRuleCondition: cfnBucketRoutingRuleConditionPropertyToCloudFormation(properties.routingRuleCondition), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketRoutingRulePropertyFromCloudFormation(properties: any): CfnBucket.RoutingRuleProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.RoutingRuleProperty = { | |
redirectRule: CfnBucketRedirectRulePropertyFromCloudFormation(properties.RedirectRule), | |
routingRuleCondition: properties.RoutingRuleCondition == null ? undefined : CfnBucketRoutingRuleConditionPropertyFromCloudFormation(properties.RoutingRuleCondition), | |
}; | |
CfnBucket_RoutingRulePropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-routingrulecondition.html | |
*/ | |
export interface RoutingRuleConditionProperty { | |
/** | |
* `CfnBucket.RoutingRuleConditionProperty.HttpErrorCodeReturnedEquals` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-routingrulecondition.html#cfn-s3-websiteconfiguration-routingrules-routingrulecondition-httperrorcodereturnedequals | |
*/ | |
readonly httpErrorCodeReturnedEquals?: string; | |
/** | |
* `CfnBucket.RoutingRuleConditionProperty.KeyPrefixEquals` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-routingrulecondition.html#cfn-s3-websiteconfiguration-routingrules-routingrulecondition-keyprefixequals | |
*/ | |
readonly keyPrefixEquals?: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `RoutingRuleConditionProperty` | |
* | |
* @param properties - the TypeScript properties of a `RoutingRuleConditionProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_RoutingRuleConditionPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('httpErrorCodeReturnedEquals', cdk.validateString)(properties.httpErrorCodeReturnedEquals)); | |
errors.collect(cdk.propertyValidator('keyPrefixEquals', cdk.validateString)(properties.keyPrefixEquals)); | |
return errors.wrap('supplied properties not correct for "RoutingRuleConditionProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.RoutingRuleCondition` resource | |
* | |
* @param properties - the TypeScript properties of a `RoutingRuleConditionProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.RoutingRuleCondition` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketRoutingRuleConditionPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_RoutingRuleConditionPropertyValidator(properties).assertSuccess(); | |
return { | |
HttpErrorCodeReturnedEquals: cdk.stringToCloudFormation(properties.httpErrorCodeReturnedEquals), | |
KeyPrefixEquals: cdk.stringToCloudFormation(properties.keyPrefixEquals), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketRoutingRuleConditionPropertyFromCloudFormation(properties: any): CfnBucket.RoutingRuleConditionProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.RoutingRuleConditionProperty = { | |
httpErrorCodeReturnedEquals: properties.HttpErrorCodeReturnedEquals == null ? undefined : cdk.stringFromCloudFormation(properties.HttpErrorCodeReturnedEquals), | |
keyPrefixEquals: properties.KeyPrefixEquals == null ? undefined : cdk.stringFromCloudFormation(properties.KeyPrefixEquals), | |
}; | |
CfnBucket_RoutingRuleConditionPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html | |
*/ | |
export interface RuleProperty { | |
/** | |
* `CfnBucket.RuleProperty.AbortIncompleteMultipartUpload` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-rule-abortincompletemultipartupload | |
*/ | |
readonly abortIncompleteMultipartUpload?: CfnBucket.AbortIncompleteMultipartUploadProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.RuleProperty.ExpirationDate` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-expirationdate | |
*/ | |
readonly expirationDate?: Date | cdk.IResolvable; | |
/** | |
* `CfnBucket.RuleProperty.ExpirationInDays` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-expirationindays | |
*/ | |
readonly expirationInDays?: number; | |
/** | |
* `CfnBucket.RuleProperty.Id` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-id | |
*/ | |
readonly id?: string; | |
/** | |
* `CfnBucket.RuleProperty.NoncurrentVersionExpirationInDays` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversionexpirationindays | |
*/ | |
readonly noncurrentVersionExpirationInDays?: number; | |
/** | |
* `CfnBucket.RuleProperty.NoncurrentVersionTransition` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition | |
*/ | |
readonly noncurrentVersionTransition?: CfnBucket.NoncurrentVersionTransitionProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.RuleProperty.NoncurrentVersionTransitions` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversiontransitions | |
*/ | |
readonly noncurrentVersionTransitions?: Array<CfnBucket.NoncurrentVersionTransitionProperty | cdk.IResolvable> | cdk.IResolvable; | |
/** | |
* `CfnBucket.RuleProperty.Prefix` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-prefix | |
*/ | |
readonly prefix?: string; | |
/** | |
* `CfnBucket.RuleProperty.Status` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-status | |
*/ | |
readonly status: string; | |
/** | |
* `CfnBucket.RuleProperty.TagFilters` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-rule-tagfilters | |
*/ | |
readonly tagFilters?: Array<CfnBucket.TagFilterProperty | cdk.IResolvable> | cdk.IResolvable; | |
/** | |
* `CfnBucket.RuleProperty.Transition` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-transition | |
*/ | |
readonly transition?: CfnBucket.TransitionProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.RuleProperty.Transitions` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-transitions | |
*/ | |
readonly transitions?: Array<CfnBucket.TransitionProperty | cdk.IResolvable> | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `RuleProperty` | |
* | |
* @param properties - the TypeScript properties of a `RuleProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_RulePropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('abortIncompleteMultipartUpload', CfnBucket_AbortIncompleteMultipartUploadPropertyValidator)(properties.abortIncompleteMultipartUpload)); | |
errors.collect(cdk.propertyValidator('expirationDate', cdk.validateDate)(properties.expirationDate)); | |
errors.collect(cdk.propertyValidator('expirationInDays', cdk.validateNumber)(properties.expirationInDays)); | |
errors.collect(cdk.propertyValidator('id', cdk.validateString)(properties.id)); | |
errors.collect(cdk.propertyValidator('noncurrentVersionExpirationInDays', cdk.validateNumber)(properties.noncurrentVersionExpirationInDays)); | |
errors.collect(cdk.propertyValidator('noncurrentVersionTransition', CfnBucket_NoncurrentVersionTransitionPropertyValidator)(properties.noncurrentVersionTransition)); | |
errors.collect(cdk.propertyValidator('noncurrentVersionTransitions', cdk.listValidator(CfnBucket_NoncurrentVersionTransitionPropertyValidator))(properties.noncurrentVersionTransitions)); | |
errors.collect(cdk.propertyValidator('prefix', cdk.validateString)(properties.prefix)); | |
errors.collect(cdk.propertyValidator('status', cdk.requiredValidator)(properties.status)); | |
errors.collect(cdk.propertyValidator('status', cdk.validateString)(properties.status)); | |
errors.collect(cdk.propertyValidator('tagFilters', cdk.listValidator(CfnBucket_TagFilterPropertyValidator))(properties.tagFilters)); | |
errors.collect(cdk.propertyValidator('transition', CfnBucket_TransitionPropertyValidator)(properties.transition)); | |
errors.collect(cdk.propertyValidator('transitions', cdk.listValidator(CfnBucket_TransitionPropertyValidator))(properties.transitions)); | |
return errors.wrap('supplied properties not correct for "RuleProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.Rule` resource | |
* | |
* @param properties - the TypeScript properties of a `RuleProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.Rule` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketRulePropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_RulePropertyValidator(properties).assertSuccess(); | |
return { | |
AbortIncompleteMultipartUpload: cfnBucketAbortIncompleteMultipartUploadPropertyToCloudFormation(properties.abortIncompleteMultipartUpload), | |
ExpirationDate: cdk.dateToCloudFormation(properties.expirationDate), | |
ExpirationInDays: cdk.numberToCloudFormation(properties.expirationInDays), | |
Id: cdk.stringToCloudFormation(properties.id), | |
NoncurrentVersionExpirationInDays: cdk.numberToCloudFormation(properties.noncurrentVersionExpirationInDays), | |
NoncurrentVersionTransition: cfnBucketNoncurrentVersionTransitionPropertyToCloudFormation(properties.noncurrentVersionTransition), | |
NoncurrentVersionTransitions: cdk.listMapper(cfnBucketNoncurrentVersionTransitionPropertyToCloudFormation)(properties.noncurrentVersionTransitions), | |
Prefix: cdk.stringToCloudFormation(properties.prefix), | |
Status: cdk.stringToCloudFormation(properties.status), | |
TagFilters: cdk.listMapper(cfnBucketTagFilterPropertyToCloudFormation)(properties.tagFilters), | |
Transition: cfnBucketTransitionPropertyToCloudFormation(properties.transition), | |
Transitions: cdk.listMapper(cfnBucketTransitionPropertyToCloudFormation)(properties.transitions), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketRulePropertyFromCloudFormation(properties: any): CfnBucket.RuleProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.RuleProperty = { | |
abortIncompleteMultipartUpload: properties.AbortIncompleteMultipartUpload == null ? undefined : CfnBucketAbortIncompleteMultipartUploadPropertyFromCloudFormation(properties.AbortIncompleteMultipartUpload), | |
expirationDate: properties.ExpirationDate == null ? undefined : cdk.dateFromCloudFormation(properties.ExpirationDate), | |
expirationInDays: properties.ExpirationInDays == null ? undefined : cdk.numberFromCloudFormation(properties.ExpirationInDays), | |
id: properties.Id == null ? undefined : cdk.stringFromCloudFormation(properties.Id), | |
noncurrentVersionExpirationInDays: properties.NoncurrentVersionExpirationInDays == null ? undefined : cdk.numberFromCloudFormation(properties.NoncurrentVersionExpirationInDays), | |
noncurrentVersionTransition: properties.NoncurrentVersionTransition == null ? undefined : CfnBucketNoncurrentVersionTransitionPropertyFromCloudFormation(properties.NoncurrentVersionTransition), | |
noncurrentVersionTransitions: cdk.cloudFormationArrayToCdkArray(properties.NoncurrentVersionTransitions, (prop1: any) => CfnBucketNoncurrentVersionTransitionPropertyFromCloudFormation(prop1)), | |
prefix: properties.Prefix == null ? undefined : cdk.stringFromCloudFormation(properties.Prefix), | |
status: cdk.stringFromCloudFormation(properties.Status), | |
tagFilters: cdk.cloudFormationArrayToCdkArray(properties.TagFilters, (prop1: any) => CfnBucketTagFilterPropertyFromCloudFormation(prop1)), | |
transition: properties.Transition == null ? undefined : CfnBucketTransitionPropertyFromCloudFormation(properties.Transition), | |
transitions: cdk.cloudFormationArrayToCdkArray(properties.Transitions, (prop1: any) => CfnBucketTransitionPropertyFromCloudFormation(prop1)), | |
}; | |
CfnBucket_RulePropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key.html | |
*/ | |
export interface S3KeyFilterProperty { | |
/** | |
* `CfnBucket.S3KeyFilterProperty.Rules` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key-rules | |
*/ | |
readonly rules: Array<CfnBucket.FilterRuleProperty | cdk.IResolvable> | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `S3KeyFilterProperty` | |
* | |
* @param properties - the TypeScript properties of a `S3KeyFilterProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_S3KeyFilterPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('rules', cdk.requiredValidator)(properties.rules)); | |
errors.collect(cdk.propertyValidator('rules', cdk.listValidator(CfnBucket_FilterRulePropertyValidator))(properties.rules)); | |
return errors.wrap('supplied properties not correct for "S3KeyFilterProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.S3KeyFilter` resource | |
* | |
* @param properties - the TypeScript properties of a `S3KeyFilterProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.S3KeyFilter` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketS3KeyFilterPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_S3KeyFilterPropertyValidator(properties).assertSuccess(); | |
return { | |
Rules: cdk.listMapper(cfnBucketFilterRulePropertyToCloudFormation)(properties.rules), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketS3KeyFilterPropertyFromCloudFormation(properties: any): CfnBucket.S3KeyFilterProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.S3KeyFilterProperty = { | |
rules: cdk.cloudFormationArrayToCdkArray(properties.Rules, (prop1: any) => CfnBucketFilterRulePropertyFromCloudFormation(prop1)), | |
}; | |
CfnBucket_S3KeyFilterPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionbydefault.html | |
*/ | |
export interface ServerSideEncryptionByDefaultProperty { | |
/** | |
* `CfnBucket.ServerSideEncryptionByDefaultProperty.KMSMasterKeyID` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionbydefault.html#cfn-s3-bucket-serversideencryptionbydefault-kmsmasterkeyid | |
*/ | |
readonly kmsMasterKeyId?: string; | |
/** | |
* `CfnBucket.ServerSideEncryptionByDefaultProperty.SSEAlgorithm` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionbydefault.html#cfn-s3-bucket-serversideencryptionbydefault-ssealgorithm | |
*/ | |
readonly sseAlgorithm: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `ServerSideEncryptionByDefaultProperty` | |
* | |
* @param properties - the TypeScript properties of a `ServerSideEncryptionByDefaultProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_ServerSideEncryptionByDefaultPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('kmsMasterKeyId', cdk.validateString)(properties.kmsMasterKeyId)); | |
errors.collect(cdk.propertyValidator('sseAlgorithm', cdk.requiredValidator)(properties.sseAlgorithm)); | |
errors.collect(cdk.propertyValidator('sseAlgorithm', cdk.validateString)(properties.sseAlgorithm)); | |
return errors.wrap('supplied properties not correct for "ServerSideEncryptionByDefaultProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.ServerSideEncryptionByDefault` resource | |
* | |
* @param properties - the TypeScript properties of a `ServerSideEncryptionByDefaultProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.ServerSideEncryptionByDefault` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketServerSideEncryptionByDefaultPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_ServerSideEncryptionByDefaultPropertyValidator(properties).assertSuccess(); | |
return { | |
KMSMasterKeyID: cdk.stringToCloudFormation(properties.kmsMasterKeyId), | |
SSEAlgorithm: cdk.stringToCloudFormation(properties.sseAlgorithm), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketServerSideEncryptionByDefaultPropertyFromCloudFormation(properties: any): CfnBucket.ServerSideEncryptionByDefaultProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.ServerSideEncryptionByDefaultProperty = { | |
kmsMasterKeyId: properties.KMSMasterKeyID == null ? undefined : cdk.stringFromCloudFormation(properties.KMSMasterKeyID), | |
sseAlgorithm: cdk.stringFromCloudFormation(properties.SSEAlgorithm), | |
}; | |
CfnBucket_ServerSideEncryptionByDefaultPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionrule.html | |
*/ | |
export interface ServerSideEncryptionRuleProperty { | |
/** | |
* `CfnBucket.ServerSideEncryptionRuleProperty.ServerSideEncryptionByDefault` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionrule.html#cfn-s3-bucket-serversideencryptionrule-serversideencryptionbydefault | |
*/ | |
readonly serverSideEncryptionByDefault?: CfnBucket.ServerSideEncryptionByDefaultProperty | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `ServerSideEncryptionRuleProperty` | |
* | |
* @param properties - the TypeScript properties of a `ServerSideEncryptionRuleProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_ServerSideEncryptionRulePropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('serverSideEncryptionByDefault', CfnBucket_ServerSideEncryptionByDefaultPropertyValidator)(properties.serverSideEncryptionByDefault)); | |
return errors.wrap('supplied properties not correct for "ServerSideEncryptionRuleProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.ServerSideEncryptionRule` resource | |
* | |
* @param properties - the TypeScript properties of a `ServerSideEncryptionRuleProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.ServerSideEncryptionRule` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketServerSideEncryptionRulePropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_ServerSideEncryptionRulePropertyValidator(properties).assertSuccess(); | |
return { | |
ServerSideEncryptionByDefault: cfnBucketServerSideEncryptionByDefaultPropertyToCloudFormation(properties.serverSideEncryptionByDefault), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketServerSideEncryptionRulePropertyFromCloudFormation(properties: any): CfnBucket.ServerSideEncryptionRuleProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.ServerSideEncryptionRuleProperty = { | |
serverSideEncryptionByDefault: properties.ServerSideEncryptionByDefault == null ? undefined : CfnBucketServerSideEncryptionByDefaultPropertyFromCloudFormation(properties.ServerSideEncryptionByDefault), | |
}; | |
CfnBucket_ServerSideEncryptionRulePropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-sourceselectioncriteria.html | |
*/ | |
export interface SourceSelectionCriteriaProperty { | |
/** | |
* `CfnBucket.SourceSelectionCriteriaProperty.SseKmsEncryptedObjects` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-sourceselectioncriteria.html#cfn-s3-bucket-sourceselectioncriteria-ssekmsencryptedobjects | |
*/ | |
readonly sseKmsEncryptedObjects: CfnBucket.SseKmsEncryptedObjectsProperty | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `SourceSelectionCriteriaProperty` | |
* | |
* @param properties - the TypeScript properties of a `SourceSelectionCriteriaProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_SourceSelectionCriteriaPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('sseKmsEncryptedObjects', cdk.requiredValidator)(properties.sseKmsEncryptedObjects)); | |
errors.collect(cdk.propertyValidator('sseKmsEncryptedObjects', CfnBucket_SseKmsEncryptedObjectsPropertyValidator)(properties.sseKmsEncryptedObjects)); | |
return errors.wrap('supplied properties not correct for "SourceSelectionCriteriaProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.SourceSelectionCriteria` resource | |
* | |
* @param properties - the TypeScript properties of a `SourceSelectionCriteriaProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.SourceSelectionCriteria` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketSourceSelectionCriteriaPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_SourceSelectionCriteriaPropertyValidator(properties).assertSuccess(); | |
return { | |
SseKmsEncryptedObjects: cfnBucketSseKmsEncryptedObjectsPropertyToCloudFormation(properties.sseKmsEncryptedObjects), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketSourceSelectionCriteriaPropertyFromCloudFormation(properties: any): CfnBucket.SourceSelectionCriteriaProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.SourceSelectionCriteriaProperty = { | |
sseKmsEncryptedObjects: CfnBucketSseKmsEncryptedObjectsPropertyFromCloudFormation(properties.SseKmsEncryptedObjects), | |
}; | |
CfnBucket_SourceSelectionCriteriaPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ssekmsencryptedobjects.html | |
*/ | |
export interface SseKmsEncryptedObjectsProperty { | |
/** | |
* `CfnBucket.SseKmsEncryptedObjectsProperty.Status` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ssekmsencryptedobjects.html#cfn-s3-bucket-ssekmsencryptedobjects-status | |
*/ | |
readonly status: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `SseKmsEncryptedObjectsProperty` | |
* | |
* @param properties - the TypeScript properties of a `SseKmsEncryptedObjectsProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_SseKmsEncryptedObjectsPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('status', cdk.requiredValidator)(properties.status)); | |
errors.collect(cdk.propertyValidator('status', cdk.validateString)(properties.status)); | |
return errors.wrap('supplied properties not correct for "SseKmsEncryptedObjectsProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.SseKmsEncryptedObjects` resource | |
* | |
* @param properties - the TypeScript properties of a `SseKmsEncryptedObjectsProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.SseKmsEncryptedObjects` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketSseKmsEncryptedObjectsPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_SseKmsEncryptedObjectsPropertyValidator(properties).assertSuccess(); | |
return { | |
Status: cdk.stringToCloudFormation(properties.status), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketSseKmsEncryptedObjectsPropertyFromCloudFormation(properties: any): CfnBucket.SseKmsEncryptedObjectsProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.SseKmsEncryptedObjectsProperty = { | |
status: cdk.stringFromCloudFormation(properties.Status), | |
}; | |
CfnBucket_SseKmsEncryptedObjectsPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-storageclassanalysis.html | |
*/ | |
export interface StorageClassAnalysisProperty { | |
/** | |
* `CfnBucket.StorageClassAnalysisProperty.DataExport` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-storageclassanalysis.html#cfn-s3-bucket-storageclassanalysis-dataexport | |
*/ | |
readonly dataExport?: CfnBucket.DataExportProperty | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `StorageClassAnalysisProperty` | |
* | |
* @param properties - the TypeScript properties of a `StorageClassAnalysisProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_StorageClassAnalysisPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('dataExport', CfnBucket_DataExportPropertyValidator)(properties.dataExport)); | |
return errors.wrap('supplied properties not correct for "StorageClassAnalysisProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.StorageClassAnalysis` resource | |
* | |
* @param properties - the TypeScript properties of a `StorageClassAnalysisProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.StorageClassAnalysis` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketStorageClassAnalysisPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_StorageClassAnalysisPropertyValidator(properties).assertSuccess(); | |
return { | |
DataExport: cfnBucketDataExportPropertyToCloudFormation(properties.dataExport), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketStorageClassAnalysisPropertyFromCloudFormation(properties: any): CfnBucket.StorageClassAnalysisProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.StorageClassAnalysisProperty = { | |
dataExport: properties.DataExport == null ? undefined : CfnBucketDataExportPropertyFromCloudFormation(properties.DataExport), | |
}; | |
CfnBucket_StorageClassAnalysisPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tagfilter.html | |
*/ | |
export interface TagFilterProperty { | |
/** | |
* `CfnBucket.TagFilterProperty.Key` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tagfilter.html#cfn-s3-bucket-tagfilter-key | |
*/ | |
readonly key: string; | |
/** | |
* `CfnBucket.TagFilterProperty.Value` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tagfilter.html#cfn-s3-bucket-tagfilter-value | |
*/ | |
readonly value: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `TagFilterProperty` | |
* | |
* @param properties - the TypeScript properties of a `TagFilterProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_TagFilterPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('key', cdk.requiredValidator)(properties.key)); | |
errors.collect(cdk.propertyValidator('key', cdk.validateString)(properties.key)); | |
errors.collect(cdk.propertyValidator('value', cdk.requiredValidator)(properties.value)); | |
errors.collect(cdk.propertyValidator('value', cdk.validateString)(properties.value)); | |
return errors.wrap('supplied properties not correct for "TagFilterProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.TagFilter` resource | |
* | |
* @param properties - the TypeScript properties of a `TagFilterProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.TagFilter` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketTagFilterPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_TagFilterPropertyValidator(properties).assertSuccess(); | |
return { | |
Key: cdk.stringToCloudFormation(properties.key), | |
Value: cdk.stringToCloudFormation(properties.value), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketTagFilterPropertyFromCloudFormation(properties: any): CfnBucket.TagFilterProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.TagFilterProperty = { | |
key: cdk.stringFromCloudFormation(properties.Key), | |
value: cdk.stringFromCloudFormation(properties.Value), | |
}; | |
CfnBucket_TagFilterPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html | |
*/ | |
export interface TopicConfigurationProperty { | |
/** | |
* `CfnBucket.TopicConfigurationProperty.Event` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html#cfn-s3-bucket-notificationconfig-topicconfig-event | |
*/ | |
readonly event: string; | |
/** | |
* `CfnBucket.TopicConfigurationProperty.Filter` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html#cfn-s3-bucket-notificationconfig-topicconfig-filter | |
*/ | |
readonly filter?: CfnBucket.NotificationFilterProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.TopicConfigurationProperty.Topic` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html#cfn-s3-bucket-notificationconfig-topicconfig-topic | |
*/ | |
readonly topic: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `TopicConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `TopicConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_TopicConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('event', cdk.requiredValidator)(properties.event)); | |
errors.collect(cdk.propertyValidator('event', cdk.validateString)(properties.event)); | |
errors.collect(cdk.propertyValidator('filter', CfnBucket_NotificationFilterPropertyValidator)(properties.filter)); | |
errors.collect(cdk.propertyValidator('topic', cdk.requiredValidator)(properties.topic)); | |
errors.collect(cdk.propertyValidator('topic', cdk.validateString)(properties.topic)); | |
return errors.wrap('supplied properties not correct for "TopicConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.TopicConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `TopicConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.TopicConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketTopicConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_TopicConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
Event: cdk.stringToCloudFormation(properties.event), | |
Filter: cfnBucketNotificationFilterPropertyToCloudFormation(properties.filter), | |
Topic: cdk.stringToCloudFormation(properties.topic), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketTopicConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.TopicConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.TopicConfigurationProperty = { | |
event: cdk.stringFromCloudFormation(properties.Event), | |
filter: properties.Filter == null ? undefined : CfnBucketNotificationFilterPropertyFromCloudFormation(properties.Filter), | |
topic: cdk.stringFromCloudFormation(properties.Topic), | |
}; | |
CfnBucket_TopicConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-transition.html | |
*/ | |
export interface TransitionProperty { | |
/** | |
* `CfnBucket.TransitionProperty.StorageClass` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-transition.html#cfn-s3-bucket-lifecycleconfig-rule-transition-storageclass | |
*/ | |
readonly storageClass: string; | |
/** | |
* `CfnBucket.TransitionProperty.TransitionDate` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-transition.html#cfn-s3-bucket-lifecycleconfig-rule-transition-transitiondate | |
*/ | |
readonly transitionDate?: Date | cdk.IResolvable; | |
/** | |
* `CfnBucket.TransitionProperty.TransitionInDays` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-transition.html#cfn-s3-bucket-lifecycleconfig-rule-transition-transitionindays | |
*/ | |
readonly transitionInDays?: number; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `TransitionProperty` | |
* | |
* @param properties - the TypeScript properties of a `TransitionProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_TransitionPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('storageClass', cdk.requiredValidator)(properties.storageClass)); | |
errors.collect(cdk.propertyValidator('storageClass', cdk.validateString)(properties.storageClass)); | |
errors.collect(cdk.propertyValidator('transitionDate', cdk.validateDate)(properties.transitionDate)); | |
errors.collect(cdk.propertyValidator('transitionInDays', cdk.validateNumber)(properties.transitionInDays)); | |
return errors.wrap('supplied properties not correct for "TransitionProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.Transition` resource | |
* | |
* @param properties - the TypeScript properties of a `TransitionProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.Transition` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketTransitionPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_TransitionPropertyValidator(properties).assertSuccess(); | |
return { | |
StorageClass: cdk.stringToCloudFormation(properties.storageClass), | |
TransitionDate: cdk.dateToCloudFormation(properties.transitionDate), | |
TransitionInDays: cdk.numberToCloudFormation(properties.transitionInDays), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketTransitionPropertyFromCloudFormation(properties: any): CfnBucket.TransitionProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.TransitionProperty = { | |
storageClass: cdk.stringFromCloudFormation(properties.StorageClass), | |
transitionDate: properties.TransitionDate == null ? undefined : cdk.dateFromCloudFormation(properties.TransitionDate), | |
transitionInDays: properties.TransitionInDays == null ? undefined : cdk.numberFromCloudFormation(properties.TransitionInDays), | |
}; | |
CfnBucket_TransitionPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-versioningconfig.html | |
*/ | |
export interface VersioningConfigurationProperty { | |
/** | |
* `CfnBucket.VersioningConfigurationProperty.Status` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-versioningconfig.html#cfn-s3-bucket-versioningconfig-status | |
*/ | |
readonly status: string; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `VersioningConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `VersioningConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_VersioningConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('status', cdk.requiredValidator)(properties.status)); | |
errors.collect(cdk.propertyValidator('status', cdk.validateString)(properties.status)); | |
return errors.wrap('supplied properties not correct for "VersioningConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.VersioningConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `VersioningConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.VersioningConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketVersioningConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_VersioningConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
Status: cdk.stringToCloudFormation(properties.status), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketVersioningConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.VersioningConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.VersioningConfigurationProperty = { | |
status: cdk.stringFromCloudFormation(properties.Status), | |
}; | |
CfnBucket_VersioningConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
export namespace CfnBucket { | |
/** | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html | |
*/ | |
export interface WebsiteConfigurationProperty { | |
/** | |
* `CfnBucket.WebsiteConfigurationProperty.ErrorDocument` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-errordocument | |
*/ | |
readonly errorDocument?: string; | |
/** | |
* `CfnBucket.WebsiteConfigurationProperty.IndexDocument` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-indexdocument | |
*/ | |
readonly indexDocument?: string; | |
/** | |
* `CfnBucket.WebsiteConfigurationProperty.RedirectAllRequestsTo` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-redirectallrequeststo | |
*/ | |
readonly redirectAllRequestsTo?: CfnBucket.RedirectAllRequestsToProperty | cdk.IResolvable; | |
/** | |
* `CfnBucket.WebsiteConfigurationProperty.RoutingRules` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-routingrules | |
*/ | |
readonly routingRules?: Array<CfnBucket.RoutingRuleProperty | cdk.IResolvable> | cdk.IResolvable; | |
} | |
} | |
/** | |
* Determine whether the given properties match those of a `WebsiteConfigurationProperty` | |
* | |
* @param properties - the TypeScript properties of a `WebsiteConfigurationProperty` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucket_WebsiteConfigurationPropertyValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('errorDocument', cdk.validateString)(properties.errorDocument)); | |
errors.collect(cdk.propertyValidator('indexDocument', cdk.validateString)(properties.indexDocument)); | |
errors.collect(cdk.propertyValidator('redirectAllRequestsTo', CfnBucket_RedirectAllRequestsToPropertyValidator)(properties.redirectAllRequestsTo)); | |
errors.collect(cdk.propertyValidator('routingRules', cdk.listValidator(CfnBucket_RoutingRulePropertyValidator))(properties.routingRules)); | |
return errors.wrap('supplied properties not correct for "WebsiteConfigurationProperty"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.WebsiteConfiguration` resource | |
* | |
* @param properties - the TypeScript properties of a `WebsiteConfigurationProperty` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::Bucket.WebsiteConfiguration` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketWebsiteConfigurationPropertyToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucket_WebsiteConfigurationPropertyValidator(properties).assertSuccess(); | |
return { | |
ErrorDocument: cdk.stringToCloudFormation(properties.errorDocument), | |
IndexDocument: cdk.stringToCloudFormation(properties.indexDocument), | |
RedirectAllRequestsTo: cfnBucketRedirectAllRequestsToPropertyToCloudFormation(properties.redirectAllRequestsTo), | |
RoutingRules: cdk.listMapper(cfnBucketRoutingRulePropertyToCloudFormation)(properties.routingRules), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketWebsiteConfigurationPropertyFromCloudFormation(properties: any): CfnBucket.WebsiteConfigurationProperty | cdk.IResolvable { | |
if (cdk.isResolvableObject(properties)) { | |
return properties; | |
} | |
properties = properties || {}; | |
const ret: CfnBucket.WebsiteConfigurationProperty = { | |
errorDocument: properties.ErrorDocument == null ? undefined : cdk.stringFromCloudFormation(properties.ErrorDocument), | |
indexDocument: properties.IndexDocument == null ? undefined : cdk.stringFromCloudFormation(properties.IndexDocument), | |
redirectAllRequestsTo: properties.RedirectAllRequestsTo == null ? undefined : CfnBucketRedirectAllRequestsToPropertyFromCloudFormation(properties.RedirectAllRequestsTo), | |
routingRules: cdk.cloudFormationArrayToCdkArray(properties.RoutingRules, (prop1: any) => CfnBucketRoutingRulePropertyFromCloudFormation(prop1)), | |
}; | |
CfnBucket_WebsiteConfigurationPropertyValidator(ret).assertSuccess(); | |
return ret; | |
} | |
/** | |
* Properties for defining a `AWS::S3::BucketPolicy` | |
* | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html | |
*/ | |
export interface CfnBucketPolicyProps { | |
/** | |
* `AWS::S3::BucketPolicy.Bucket` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html#aws-properties-s3-policy-bucket | |
*/ | |
readonly bucket: string; | |
/** | |
* `AWS::S3::BucketPolicy.PolicyDocument` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html#aws-properties-s3-policy-policydocument | |
*/ | |
readonly policyDocument: any | cdk.IResolvable; | |
} | |
/** | |
* Determine whether the given properties match those of a `CfnBucketPolicyProps` | |
* | |
* @param properties - the TypeScript properties of a `CfnBucketPolicyProps` | |
* | |
* @returns the result of the validation. | |
*/ | |
function CfnBucketPolicyPropsValidator(properties: any): cdk.ValidationResult { | |
if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } | |
const errors = new cdk.ValidationResults(); | |
errors.collect(cdk.propertyValidator('bucket', cdk.requiredValidator)(properties.bucket)); | |
errors.collect(cdk.propertyValidator('bucket', cdk.validateString)(properties.bucket)); | |
errors.collect(cdk.propertyValidator('policyDocument', cdk.requiredValidator)(properties.policyDocument)); | |
errors.collect(cdk.propertyValidator('policyDocument', cdk.validateObject)(properties.policyDocument)); | |
return errors.wrap('supplied properties not correct for "CfnBucketPolicyProps"'); | |
} | |
/** | |
* Renders the AWS CloudFormation properties of an `AWS::S3::BucketPolicy` resource | |
* | |
* @param properties - the TypeScript properties of a `CfnBucketPolicyProps` | |
* | |
* @returns the AWS CloudFormation properties of an `AWS::S3::BucketPolicy` resource. | |
*/ | |
// @ts-ignore TS6133 | |
function cfnBucketPolicyPropsToCloudFormation(properties: any): any { | |
if (!cdk.canInspect(properties)) { return properties; } | |
CfnBucketPolicyPropsValidator(properties).assertSuccess(); | |
return { | |
Bucket: cdk.stringToCloudFormation(properties.bucket), | |
PolicyDocument: cdk.objectToCloudFormation(properties.policyDocument), | |
}; | |
} | |
// @ts-ignore TS6133 | |
function CfnBucketPolicyPropsFromCloudFormation(properties: any): CfnBucketPolicyProps { | |
properties = properties || {}; | |
const ret: CfnBucketPolicyProps = { | |
bucket: cdk.stringFromCloudFormation(properties.Bucket), | |
policyDocument: cdk.anyFromCloudFormation(properties.PolicyDocument), | |
}; | |
CfnBucketPolicyPropsValidator(ret).assertSuccess(); | |
return ret; | |
} | |
/** | |
* A CloudFormation `AWS::S3::BucketPolicy` | |
* | |
* @cloudformationResource AWS::S3::BucketPolicy | |
* @stability external | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html | |
*/ | |
export class CfnBucketPolicy extends cdk.CfnResource implements cdk.IInspectable { | |
/** | |
* The CloudFormation resource type name for this resource class. | |
*/ | |
public static readonly CFN_RESOURCE_TYPE_NAME = "AWS::S3::BucketPolicy"; | |
/** | |
* A factory method that creates a new instance of this class from an object | |
* containing the CloudFormation properties of this resource. | |
* Used in the @aws-cdk/cloudformation-include module. | |
* | |
* @experimental | |
*/ | |
public static fromCloudFormation(scope: cdk.Construct, id: string, resourceAttributes: any): CfnBucketPolicy { | |
resourceAttributes = resourceAttributes || {}; | |
const resourceProperties = cdk.cfnValueToCdkValue(resourceAttributes.Properties); | |
const props = CfnBucketPolicyPropsFromCloudFormation(resourceProperties); | |
const ret = new CfnBucketPolicy(scope, id, props); | |
const cfnOptions = ret.cfnOptions; | |
cfnOptions.deletionPolicy = cdk.stringToDeletionPolicy(resourceAttributes.DeletionPolicy); | |
cfnOptions.updateReplacePolicy = cdk.stringToDeletionPolicy(resourceAttributes.UpdateReplacePolicy); | |
cfnOptions.metadata = cdk.cfnValueToCdkValue(resourceAttributes.Metadata); | |
return ret; | |
} | |
/** | |
* `AWS::S3::BucketPolicy.Bucket` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html#aws-properties-s3-policy-bucket | |
*/ | |
public bucket: string; | |
/** | |
* `AWS::S3::BucketPolicy.PolicyDocument` | |
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html#aws-properties-s3-policy-policydocument | |
*/ | |
public policyDocument: any | cdk.IResolvable; | |
/** | |
* Create a new `AWS::S3::BucketPolicy`. | |
* | |
* @param scope - scope in which this resource is defined | |
* @param id - scoped id of the resource | |
* @param props - resource properties | |
*/ | |
constructor(scope: cdk.Construct, id: string, props: CfnBucketPolicyProps) { | |
super(scope, id, { type: CfnBucketPolicy.CFN_RESOURCE_TYPE_NAME, properties: props }); | |
cdk.requireProperty(props, 'bucket', this); | |
cdk.requireProperty(props, 'policyDocument', this); | |
this.bucket = props.bucket; | |
this.policyDocument = props.policyDocument; | |
} | |
/** | |
* Examines the CloudFormation resource and discloses attributes. | |
* | |
* @param inspector - tree inspector to collect and process attributes | |
* | |
* @stability experimental | |
*/ | |
public inspect(inspector: cdk.TreeInspector) { | |
inspector.addAttribute("aws:cdk:cloudformation:type", CfnBucketPolicy.CFN_RESOURCE_TYPE_NAME); | |
inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties); | |
} | |
protected get cfnProperties(): { [key: string]: any } { | |
return { | |
bucket: this.bucket, | |
policyDocument: this.policyDocument, | |
}; | |
} | |
protected renderProperties(props: {[key: string]: any}): { [key: string]: any } { | |
return cfnBucketPolicyPropsToCloudFormation(props); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment