// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Simple Storage Service */ export interface S3BucketConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#acceleration_status S3Bucket#acceleration_status} */ readonly accelerationStatus?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#acl S3Bucket#acl} */ readonly acl?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#bucket S3Bucket#bucket} */ readonly bucket?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#bucket_prefix S3Bucket#bucket_prefix} */ readonly bucketPrefix?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#force_destroy S3Bucket#force_destroy} */ readonly forceDestroy?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#hosted_zone_id S3Bucket#hosted_zone_id} */ readonly hostedZoneId?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#policy S3Bucket#policy} */ readonly policy?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#request_payer S3Bucket#request_payer} */ readonly requestPayer?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#tags S3Bucket#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#tags_all S3Bucket#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#website_domain S3Bucket#website_domain} */ readonly websiteDomain?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#website_endpoint S3Bucket#website_endpoint} */ readonly websiteEndpoint?: string; /** * cors_rule block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#cors_rule S3Bucket#cors_rule} */ readonly corsRule?: S3BucketCorsRule[]; /** * grant block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#grant S3Bucket#grant} */ readonly grant?: S3BucketGrant[]; /** * lifecycle_rule block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#lifecycle_rule S3Bucket#lifecycle_rule} */ readonly lifecycleRule?: S3BucketLifecycleRule[]; /** * logging block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#logging S3Bucket#logging} */ readonly logging?: S3BucketLogging[]; /** * object_lock_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#object_lock_configuration S3Bucket#object_lock_configuration} */ readonly objectLockConfiguration?: S3BucketObjectLockConfiguration; /** * replication_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#replication_configuration S3Bucket#replication_configuration} */ readonly replicationConfiguration?: S3BucketReplicationConfiguration; /** * server_side_encryption_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#server_side_encryption_configuration S3Bucket#server_side_encryption_configuration} */ readonly serverSideEncryptionConfiguration?: S3BucketServerSideEncryptionConfiguration; /** * versioning block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#versioning S3Bucket#versioning} */ readonly versioning?: S3BucketVersioning; /** * website block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#website S3Bucket#website} */ readonly website?: S3BucketWebsite; } export interface S3BucketCorsRule { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#allowed_headers S3Bucket#allowed_headers} */ readonly allowedHeaders?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#allowed_methods S3Bucket#allowed_methods} */ readonly allowedMethods: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#allowed_origins S3Bucket#allowed_origins} */ readonly allowedOrigins: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#expose_headers S3Bucket#expose_headers} */ readonly exposeHeaders?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#max_age_seconds S3Bucket#max_age_seconds} */ readonly maxAgeSeconds?: number; } export function s3BucketCorsRuleToTerraform(struct?: S3BucketCorsRule): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { allowed_headers: cdktf.listMapper(cdktf.stringToTerraform)(struct!.allowedHeaders), allowed_methods: cdktf.listMapper(cdktf.stringToTerraform)(struct!.allowedMethods), allowed_origins: cdktf.listMapper(cdktf.stringToTerraform)(struct!.allowedOrigins), expose_headers: cdktf.listMapper(cdktf.stringToTerraform)(struct!.exposeHeaders), max_age_seconds: cdktf.numberToTerraform(struct!.maxAgeSeconds), } } export interface S3BucketGrant { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#id S3Bucket#id} */ readonly id?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#permissions S3Bucket#permissions} */ readonly permissions: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#type S3Bucket#type} */ readonly type: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#uri S3Bucket#uri} */ readonly uri?: string; } export function s3BucketGrantToTerraform(struct?: S3BucketGrant): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { id: cdktf.stringToTerraform(struct!.id), permissions: cdktf.listMapper(cdktf.stringToTerraform)(struct!.permissions), type: cdktf.stringToTerraform(struct!.type), uri: cdktf.stringToTerraform(struct!.uri), } } export interface S3BucketLifecycleRuleExpiration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#date S3Bucket#date} */ readonly date?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#days S3Bucket#days} */ readonly days?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#expired_object_delete_marker S3Bucket#expired_object_delete_marker} */ readonly expiredObjectDeleteMarker?: boolean | cdktf.IResolvable; } export function s3BucketLifecycleRuleExpirationToTerraform(struct?: S3BucketLifecycleRuleExpirationOutputReference | S3BucketLifecycleRuleExpiration): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { date: cdktf.stringToTerraform(struct!.date), days: cdktf.numberToTerraform(struct!.days), expired_object_delete_marker: cdktf.booleanToTerraform(struct!.expiredObjectDeleteMarker), } } export class S3BucketLifecycleRuleExpirationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketLifecycleRuleExpiration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._date !== undefined) { hasAnyValues = true; internalValueResult.date = this._date; } if (this._days !== undefined) { hasAnyValues = true; internalValueResult.days = this._days; } if (this._expiredObjectDeleteMarker !== undefined) { hasAnyValues = true; internalValueResult.expiredObjectDeleteMarker = this._expiredObjectDeleteMarker; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketLifecycleRuleExpiration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._date = undefined; this._days = undefined; this._expiredObjectDeleteMarker = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._date = value.date; this._days = value.days; this._expiredObjectDeleteMarker = value.expiredObjectDeleteMarker; } } // date - computed: false, optional: true, required: false private _date?: string; public get date() { return this.getStringAttribute('date'); } public set date(value: string) { this._date = value; } public resetDate() { this._date = undefined; } // Temporarily expose input value. Use with caution. public get dateInput() { return this._date; } // days - computed: false, optional: true, required: false private _days?: number; public get days() { return this.getNumberAttribute('days'); } public set days(value: number) { this._days = value; } public resetDays() { this._days = undefined; } // Temporarily expose input value. Use with caution. public get daysInput() { return this._days; } // expired_object_delete_marker - computed: false, optional: true, required: false private _expiredObjectDeleteMarker?: boolean | cdktf.IResolvable; public get expiredObjectDeleteMarker() { return this.getBooleanAttribute('expired_object_delete_marker') as any; } public set expiredObjectDeleteMarker(value: boolean | cdktf.IResolvable) { this._expiredObjectDeleteMarker = value; } public resetExpiredObjectDeleteMarker() { this._expiredObjectDeleteMarker = undefined; } // Temporarily expose input value. Use with caution. public get expiredObjectDeleteMarkerInput() { return this._expiredObjectDeleteMarker; } } export interface S3BucketLifecycleRuleNoncurrentVersionExpiration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#days S3Bucket#days} */ readonly days?: number; } export function s3BucketLifecycleRuleNoncurrentVersionExpirationToTerraform(struct?: S3BucketLifecycleRuleNoncurrentVersionExpirationOutputReference | S3BucketLifecycleRuleNoncurrentVersionExpiration): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { days: cdktf.numberToTerraform(struct!.days), } } export class S3BucketLifecycleRuleNoncurrentVersionExpirationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketLifecycleRuleNoncurrentVersionExpiration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._days !== undefined) { hasAnyValues = true; internalValueResult.days = this._days; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketLifecycleRuleNoncurrentVersionExpiration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._days = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._days = value.days; } } // days - computed: false, optional: true, required: false private _days?: number; public get days() { return this.getNumberAttribute('days'); } public set days(value: number) { this._days = value; } public resetDays() { this._days = undefined; } // Temporarily expose input value. Use with caution. public get daysInput() { return this._days; } } export interface S3BucketLifecycleRuleNoncurrentVersionTransition { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#days S3Bucket#days} */ readonly days?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#storage_class S3Bucket#storage_class} */ readonly storageClass: string; } export function s3BucketLifecycleRuleNoncurrentVersionTransitionToTerraform(struct?: S3BucketLifecycleRuleNoncurrentVersionTransition): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { days: cdktf.numberToTerraform(struct!.days), storage_class: cdktf.stringToTerraform(struct!.storageClass), } } export interface S3BucketLifecycleRuleTransition { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#date S3Bucket#date} */ readonly date?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#days S3Bucket#days} */ readonly days?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#storage_class S3Bucket#storage_class} */ readonly storageClass: string; } export function s3BucketLifecycleRuleTransitionToTerraform(struct?: S3BucketLifecycleRuleTransition): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { date: cdktf.stringToTerraform(struct!.date), days: cdktf.numberToTerraform(struct!.days), storage_class: cdktf.stringToTerraform(struct!.storageClass), } } export interface S3BucketLifecycleRule { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#abort_incomplete_multipart_upload_days S3Bucket#abort_incomplete_multipart_upload_days} */ readonly abortIncompleteMultipartUploadDays?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#enabled S3Bucket#enabled} */ readonly enabled: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#id S3Bucket#id} */ readonly id?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#prefix S3Bucket#prefix} */ readonly prefix?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#tags S3Bucket#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * expiration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#expiration S3Bucket#expiration} */ readonly expiration?: S3BucketLifecycleRuleExpiration; /** * noncurrent_version_expiration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#noncurrent_version_expiration S3Bucket#noncurrent_version_expiration} */ readonly noncurrentVersionExpiration?: S3BucketLifecycleRuleNoncurrentVersionExpiration; /** * noncurrent_version_transition block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#noncurrent_version_transition S3Bucket#noncurrent_version_transition} */ readonly noncurrentVersionTransition?: S3BucketLifecycleRuleNoncurrentVersionTransition[]; /** * transition block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#transition S3Bucket#transition} */ readonly transition?: S3BucketLifecycleRuleTransition[]; } export function s3BucketLifecycleRuleToTerraform(struct?: S3BucketLifecycleRule): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { abort_incomplete_multipart_upload_days: cdktf.numberToTerraform(struct!.abortIncompleteMultipartUploadDays), enabled: cdktf.booleanToTerraform(struct!.enabled), prefix: cdktf.stringToTerraform(struct!.prefix), tags: cdktf.hashMapper(cdktf.anyToTerraform)(struct!.tags), expiration: s3BucketLifecycleRuleExpirationToTerraform(struct!.expiration), noncurrent_version_expiration: s3BucketLifecycleRuleNoncurrentVersionExpirationToTerraform(struct!.noncurrentVersionExpiration), noncurrent_version_transition: cdktf.listMapper(s3BucketLifecycleRuleNoncurrentVersionTransitionToTerraform)(struct!.noncurrentVersionTransition), transition: cdktf.listMapper(s3BucketLifecycleRuleTransitionToTerraform)(struct!.transition), } } export interface S3BucketLogging { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#target_bucket S3Bucket#target_bucket} */ readonly targetBucket: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#target_prefix S3Bucket#target_prefix} */ readonly targetPrefix?: string; } export function s3BucketLoggingToTerraform(struct?: S3BucketLogging): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { target_bucket: cdktf.stringToTerraform(struct!.targetBucket), target_prefix: cdktf.stringToTerraform(struct!.targetPrefix), } } export interface S3BucketObjectLockConfigurationRuleDefaultRetention { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#days S3Bucket#days} */ readonly days?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#mode S3Bucket#mode} */ readonly mode: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#years S3Bucket#years} */ readonly years?: number; } export function s3BucketObjectLockConfigurationRuleDefaultRetentionToTerraform(struct?: S3BucketObjectLockConfigurationRuleDefaultRetentionOutputReference | S3BucketObjectLockConfigurationRuleDefaultRetention): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { days: cdktf.numberToTerraform(struct!.days), mode: cdktf.stringToTerraform(struct!.mode), years: cdktf.numberToTerraform(struct!.years), } } export class S3BucketObjectLockConfigurationRuleDefaultRetentionOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketObjectLockConfigurationRuleDefaultRetention | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._days !== undefined) { hasAnyValues = true; internalValueResult.days = this._days; } if (this._mode !== undefined) { hasAnyValues = true; internalValueResult.mode = this._mode; } if (this._years !== undefined) { hasAnyValues = true; internalValueResult.years = this._years; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketObjectLockConfigurationRuleDefaultRetention | undefined) { if (value === undefined) { this.isEmptyObject = false; this._days = undefined; this._mode = undefined; this._years = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._days = value.days; this._mode = value.mode; this._years = value.years; } } // days - computed: false, optional: true, required: false private _days?: number; public get days() { return this.getNumberAttribute('days'); } public set days(value: number) { this._days = value; } public resetDays() { this._days = undefined; } // Temporarily expose input value. Use with caution. public get daysInput() { return this._days; } // mode - computed: false, optional: false, required: true private _mode?: string; public get mode() { return this.getStringAttribute('mode'); } public set mode(value: string) { this._mode = value; } // Temporarily expose input value. Use with caution. public get modeInput() { return this._mode; } // years - computed: false, optional: true, required: false private _years?: number; public get years() { return this.getNumberAttribute('years'); } public set years(value: number) { this._years = value; } public resetYears() { this._years = undefined; } // Temporarily expose input value. Use with caution. public get yearsInput() { return this._years; } } export interface S3BucketObjectLockConfigurationRule { /** * default_retention block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#default_retention S3Bucket#default_retention} */ readonly defaultRetention: S3BucketObjectLockConfigurationRuleDefaultRetention; } export function s3BucketObjectLockConfigurationRuleToTerraform(struct?: S3BucketObjectLockConfigurationRuleOutputReference | S3BucketObjectLockConfigurationRule): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { default_retention: s3BucketObjectLockConfigurationRuleDefaultRetentionToTerraform(struct!.defaultRetention), } } export class S3BucketObjectLockConfigurationRuleOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketObjectLockConfigurationRule | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._defaultRetention?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.defaultRetention = this._defaultRetention?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketObjectLockConfigurationRule | undefined) { if (value === undefined) { this.isEmptyObject = false; this._defaultRetention.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._defaultRetention.internalValue = value.defaultRetention; } } // default_retention - computed: false, optional: false, required: true private _defaultRetention = new S3BucketObjectLockConfigurationRuleDefaultRetentionOutputReference(this as any, "default_retention", true); public get defaultRetention() { return this._defaultRetention; } public putDefaultRetention(value: S3BucketObjectLockConfigurationRuleDefaultRetention) { this._defaultRetention.internalValue = value; } // Temporarily expose input value. Use with caution. public get defaultRetentionInput() { return this._defaultRetention.internalValue; } } export interface S3BucketObjectLockConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#object_lock_enabled S3Bucket#object_lock_enabled} */ readonly objectLockEnabled: string; /** * rule block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#rule S3Bucket#rule} */ readonly rule?: S3BucketObjectLockConfigurationRule; } export function s3BucketObjectLockConfigurationToTerraform(struct?: S3BucketObjectLockConfigurationOutputReference | S3BucketObjectLockConfiguration): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { object_lock_enabled: cdktf.stringToTerraform(struct!.objectLockEnabled), rule: s3BucketObjectLockConfigurationRuleToTerraform(struct!.rule), } } export class S3BucketObjectLockConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketObjectLockConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._objectLockEnabled !== undefined) { hasAnyValues = true; internalValueResult.objectLockEnabled = this._objectLockEnabled; } if (this._rule?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.rule = this._rule?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketObjectLockConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._objectLockEnabled = undefined; this._rule.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._objectLockEnabled = value.objectLockEnabled; this._rule.internalValue = value.rule; } } // object_lock_enabled - computed: false, optional: false, required: true private _objectLockEnabled?: string; public get objectLockEnabled() { return this.getStringAttribute('object_lock_enabled'); } public set objectLockEnabled(value: string) { this._objectLockEnabled = value; } // Temporarily expose input value. Use with caution. public get objectLockEnabledInput() { return this._objectLockEnabled; } // rule - computed: false, optional: true, required: false private _rule = new S3BucketObjectLockConfigurationRuleOutputReference(this as any, "rule", true); public get rule() { return this._rule; } public putRule(value: S3BucketObjectLockConfigurationRule) { this._rule.internalValue = value; } public resetRule() { this._rule.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get ruleInput() { return this._rule.internalValue; } } export interface S3BucketReplicationConfigurationRulesDestinationAccessControlTranslation { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#owner S3Bucket#owner} */ readonly owner: string; } export function s3BucketReplicationConfigurationRulesDestinationAccessControlTranslationToTerraform(struct?: S3BucketReplicationConfigurationRulesDestinationAccessControlTranslationOutputReference | S3BucketReplicationConfigurationRulesDestinationAccessControlTranslation): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { owner: cdktf.stringToTerraform(struct!.owner), } } export class S3BucketReplicationConfigurationRulesDestinationAccessControlTranslationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketReplicationConfigurationRulesDestinationAccessControlTranslation | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._owner !== undefined) { hasAnyValues = true; internalValueResult.owner = this._owner; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketReplicationConfigurationRulesDestinationAccessControlTranslation | undefined) { if (value === undefined) { this.isEmptyObject = false; this._owner = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._owner = value.owner; } } // owner - computed: false, optional: false, required: true private _owner?: string; public get owner() { return this.getStringAttribute('owner'); } public set owner(value: string) { this._owner = value; } // Temporarily expose input value. Use with caution. public get ownerInput() { return this._owner; } } export interface S3BucketReplicationConfigurationRulesDestinationMetrics { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#minutes S3Bucket#minutes} */ readonly minutes?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#status S3Bucket#status} */ readonly status?: string; } export function s3BucketReplicationConfigurationRulesDestinationMetricsToTerraform(struct?: S3BucketReplicationConfigurationRulesDestinationMetricsOutputReference | S3BucketReplicationConfigurationRulesDestinationMetrics): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { minutes: cdktf.numberToTerraform(struct!.minutes), status: cdktf.stringToTerraform(struct!.status), } } export class S3BucketReplicationConfigurationRulesDestinationMetricsOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketReplicationConfigurationRulesDestinationMetrics | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._minutes !== undefined) { hasAnyValues = true; internalValueResult.minutes = this._minutes; } if (this._status !== undefined) { hasAnyValues = true; internalValueResult.status = this._status; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketReplicationConfigurationRulesDestinationMetrics | undefined) { if (value === undefined) { this.isEmptyObject = false; this._minutes = undefined; this._status = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._minutes = value.minutes; this._status = value.status; } } // minutes - computed: false, optional: true, required: false private _minutes?: number; public get minutes() { return this.getNumberAttribute('minutes'); } public set minutes(value: number) { this._minutes = value; } public resetMinutes() { this._minutes = undefined; } // Temporarily expose input value. Use with caution. public get minutesInput() { return this._minutes; } // status - computed: false, optional: true, required: false private _status?: string; public get status() { return this.getStringAttribute('status'); } public set status(value: string) { this._status = value; } public resetStatus() { this._status = undefined; } // Temporarily expose input value. Use with caution. public get statusInput() { return this._status; } } export interface S3BucketReplicationConfigurationRulesDestinationReplicationTime { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#minutes S3Bucket#minutes} */ readonly minutes?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#status S3Bucket#status} */ readonly status?: string; } export function s3BucketReplicationConfigurationRulesDestinationReplicationTimeToTerraform(struct?: S3BucketReplicationConfigurationRulesDestinationReplicationTimeOutputReference | S3BucketReplicationConfigurationRulesDestinationReplicationTime): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { minutes: cdktf.numberToTerraform(struct!.minutes), status: cdktf.stringToTerraform(struct!.status), } } export class S3BucketReplicationConfigurationRulesDestinationReplicationTimeOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketReplicationConfigurationRulesDestinationReplicationTime | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._minutes !== undefined) { hasAnyValues = true; internalValueResult.minutes = this._minutes; } if (this._status !== undefined) { hasAnyValues = true; internalValueResult.status = this._status; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketReplicationConfigurationRulesDestinationReplicationTime | undefined) { if (value === undefined) { this.isEmptyObject = false; this._minutes = undefined; this._status = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._minutes = value.minutes; this._status = value.status; } } // minutes - computed: false, optional: true, required: false private _minutes?: number; public get minutes() { return this.getNumberAttribute('minutes'); } public set minutes(value: number) { this._minutes = value; } public resetMinutes() { this._minutes = undefined; } // Temporarily expose input value. Use with caution. public get minutesInput() { return this._minutes; } // status - computed: false, optional: true, required: false private _status?: string; public get status() { return this.getStringAttribute('status'); } public set status(value: string) { this._status = value; } public resetStatus() { this._status = undefined; } // Temporarily expose input value. Use with caution. public get statusInput() { return this._status; } } export interface S3BucketReplicationConfigurationRulesDestination { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#account_id S3Bucket#account_id} */ readonly accountId?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#bucket S3Bucket#bucket} */ readonly bucket: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#replica_kms_key_id S3Bucket#replica_kms_key_id} */ readonly replicaKmsKeyId?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#storage_class S3Bucket#storage_class} */ readonly storageClass?: string; /** * access_control_translation block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#access_control_translation S3Bucket#access_control_translation} */ readonly accessControlTranslation?: S3BucketReplicationConfigurationRulesDestinationAccessControlTranslation; /** * metrics block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#metrics S3Bucket#metrics} */ readonly metrics?: S3BucketReplicationConfigurationRulesDestinationMetrics; /** * replication_time block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#replication_time S3Bucket#replication_time} */ readonly replicationTime?: S3BucketReplicationConfigurationRulesDestinationReplicationTime; } export function s3BucketReplicationConfigurationRulesDestinationToTerraform(struct?: S3BucketReplicationConfigurationRulesDestinationOutputReference | S3BucketReplicationConfigurationRulesDestination): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { account_id: cdktf.stringToTerraform(struct!.accountId), bucket: cdktf.stringToTerraform(struct!.bucket), replica_kms_key_id: cdktf.stringToTerraform(struct!.replicaKmsKeyId), storage_class: cdktf.stringToTerraform(struct!.storageClass), access_control_translation: s3BucketReplicationConfigurationRulesDestinationAccessControlTranslationToTerraform(struct!.accessControlTranslation), metrics: s3BucketReplicationConfigurationRulesDestinationMetricsToTerraform(struct!.metrics), replication_time: s3BucketReplicationConfigurationRulesDestinationReplicationTimeToTerraform(struct!.replicationTime), } } export class S3BucketReplicationConfigurationRulesDestinationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketReplicationConfigurationRulesDestination | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._accountId !== undefined) { hasAnyValues = true; internalValueResult.accountId = this._accountId; } if (this._bucket !== undefined) { hasAnyValues = true; internalValueResult.bucket = this._bucket; } if (this._replicaKmsKeyId !== undefined) { hasAnyValues = true; internalValueResult.replicaKmsKeyId = this._replicaKmsKeyId; } if (this._storageClass !== undefined) { hasAnyValues = true; internalValueResult.storageClass = this._storageClass; } if (this._accessControlTranslation?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.accessControlTranslation = this._accessControlTranslation?.internalValue; } if (this._metrics?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.metrics = this._metrics?.internalValue; } if (this._replicationTime?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.replicationTime = this._replicationTime?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketReplicationConfigurationRulesDestination | undefined) { if (value === undefined) { this.isEmptyObject = false; this._accountId = undefined; this._bucket = undefined; this._replicaKmsKeyId = undefined; this._storageClass = undefined; this._accessControlTranslation.internalValue = undefined; this._metrics.internalValue = undefined; this._replicationTime.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._accountId = value.accountId; this._bucket = value.bucket; this._replicaKmsKeyId = value.replicaKmsKeyId; this._storageClass = value.storageClass; this._accessControlTranslation.internalValue = value.accessControlTranslation; this._metrics.internalValue = value.metrics; this._replicationTime.internalValue = value.replicationTime; } } // account_id - computed: false, optional: true, required: false private _accountId?: string; public get accountId() { return this.getStringAttribute('account_id'); } public set accountId(value: string) { this._accountId = value; } public resetAccountId() { this._accountId = undefined; } // Temporarily expose input value. Use with caution. public get accountIdInput() { return this._accountId; } // bucket - computed: false, optional: false, required: true private _bucket?: string; public get bucket() { return this.getStringAttribute('bucket'); } public set bucket(value: string) { this._bucket = value; } // Temporarily expose input value. Use with caution. public get bucketInput() { return this._bucket; } // replica_kms_key_id - computed: false, optional: true, required: false private _replicaKmsKeyId?: string; public get replicaKmsKeyId() { return this.getStringAttribute('replica_kms_key_id'); } public set replicaKmsKeyId(value: string) { this._replicaKmsKeyId = value; } public resetReplicaKmsKeyId() { this._replicaKmsKeyId = undefined; } // Temporarily expose input value. Use with caution. public get replicaKmsKeyIdInput() { return this._replicaKmsKeyId; } // storage_class - computed: false, optional: true, required: false private _storageClass?: string; public get storageClass() { return this.getStringAttribute('storage_class'); } public set storageClass(value: string) { this._storageClass = value; } public resetStorageClass() { this._storageClass = undefined; } // Temporarily expose input value. Use with caution. public get storageClassInput() { return this._storageClass; } // access_control_translation - computed: false, optional: true, required: false private _accessControlTranslation = new S3BucketReplicationConfigurationRulesDestinationAccessControlTranslationOutputReference(this as any, "access_control_translation", true); public get accessControlTranslation() { return this._accessControlTranslation; } public putAccessControlTranslation(value: S3BucketReplicationConfigurationRulesDestinationAccessControlTranslation) { this._accessControlTranslation.internalValue = value; } public resetAccessControlTranslation() { this._accessControlTranslation.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get accessControlTranslationInput() { return this._accessControlTranslation.internalValue; } // metrics - computed: false, optional: true, required: false private _metrics = new S3BucketReplicationConfigurationRulesDestinationMetricsOutputReference(this as any, "metrics", true); public get metrics() { return this._metrics; } public putMetrics(value: S3BucketReplicationConfigurationRulesDestinationMetrics) { this._metrics.internalValue = value; } public resetMetrics() { this._metrics.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get metricsInput() { return this._metrics.internalValue; } // replication_time - computed: false, optional: true, required: false private _replicationTime = new S3BucketReplicationConfigurationRulesDestinationReplicationTimeOutputReference(this as any, "replication_time", true); public get replicationTime() { return this._replicationTime; } public putReplicationTime(value: S3BucketReplicationConfigurationRulesDestinationReplicationTime) { this._replicationTime.internalValue = value; } public resetReplicationTime() { this._replicationTime.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get replicationTimeInput() { return this._replicationTime.internalValue; } } export interface S3BucketReplicationConfigurationRulesFilter { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#prefix S3Bucket#prefix} */ readonly prefix?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#tags S3Bucket#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; } export function s3BucketReplicationConfigurationRulesFilterToTerraform(struct?: S3BucketReplicationConfigurationRulesFilterOutputReference | S3BucketReplicationConfigurationRulesFilter): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { prefix: cdktf.stringToTerraform(struct!.prefix), tags: cdktf.hashMapper(cdktf.anyToTerraform)(struct!.tags), } } export class S3BucketReplicationConfigurationRulesFilterOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketReplicationConfigurationRulesFilter | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._prefix !== undefined) { hasAnyValues = true; internalValueResult.prefix = this._prefix; } if (this._tags !== undefined) { hasAnyValues = true; internalValueResult.tags = this._tags; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketReplicationConfigurationRulesFilter | undefined) { if (value === undefined) { this.isEmptyObject = false; this._prefix = undefined; this._tags = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._prefix = value.prefix; this._tags = value.tags; } } // prefix - computed: false, optional: true, required: false private _prefix?: string; public get prefix() { return this.getStringAttribute('prefix'); } public set prefix(value: string) { this._prefix = value; } public resetPrefix() { this._prefix = undefined; } // Temporarily expose input value. Use with caution. public get prefixInput() { return this._prefix; } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } } export interface S3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjects { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#enabled S3Bucket#enabled} */ readonly enabled: boolean | cdktf.IResolvable; } export function s3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjectsToTerraform(struct?: S3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjectsOutputReference | S3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjects): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { enabled: cdktf.booleanToTerraform(struct!.enabled), } } export class S3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjectsOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjects | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjects | undefined) { if (value === undefined) { this.isEmptyObject = false; this._enabled = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enabled = value.enabled; } } // enabled - computed: false, optional: false, required: true private _enabled?: boolean | cdktf.IResolvable; public get enabled() { return this.getBooleanAttribute('enabled') as any; } public set enabled(value: boolean | cdktf.IResolvable) { this._enabled = value; } // Temporarily expose input value. Use with caution. public get enabledInput() { return this._enabled; } } export interface S3BucketReplicationConfigurationRulesSourceSelectionCriteria { /** * sse_kms_encrypted_objects block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#sse_kms_encrypted_objects S3Bucket#sse_kms_encrypted_objects} */ readonly sseKmsEncryptedObjects?: S3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjects; } export function s3BucketReplicationConfigurationRulesSourceSelectionCriteriaToTerraform(struct?: S3BucketReplicationConfigurationRulesSourceSelectionCriteriaOutputReference | S3BucketReplicationConfigurationRulesSourceSelectionCriteria): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { sse_kms_encrypted_objects: s3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjectsToTerraform(struct!.sseKmsEncryptedObjects), } } export class S3BucketReplicationConfigurationRulesSourceSelectionCriteriaOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketReplicationConfigurationRulesSourceSelectionCriteria | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._sseKmsEncryptedObjects?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.sseKmsEncryptedObjects = this._sseKmsEncryptedObjects?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketReplicationConfigurationRulesSourceSelectionCriteria | undefined) { if (value === undefined) { this.isEmptyObject = false; this._sseKmsEncryptedObjects.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._sseKmsEncryptedObjects.internalValue = value.sseKmsEncryptedObjects; } } // sse_kms_encrypted_objects - computed: false, optional: true, required: false private _sseKmsEncryptedObjects = new S3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjectsOutputReference(this as any, "sse_kms_encrypted_objects", true); public get sseKmsEncryptedObjects() { return this._sseKmsEncryptedObjects; } public putSseKmsEncryptedObjects(value: S3BucketReplicationConfigurationRulesSourceSelectionCriteriaSseKmsEncryptedObjects) { this._sseKmsEncryptedObjects.internalValue = value; } public resetSseKmsEncryptedObjects() { this._sseKmsEncryptedObjects.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get sseKmsEncryptedObjectsInput() { return this._sseKmsEncryptedObjects.internalValue; } } export interface S3BucketReplicationConfigurationRules { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#delete_marker_replication_status S3Bucket#delete_marker_replication_status} */ readonly deleteMarkerReplicationStatus?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#id S3Bucket#id} */ readonly id?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#prefix S3Bucket#prefix} */ readonly prefix?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#priority S3Bucket#priority} */ readonly priority?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#status S3Bucket#status} */ readonly status: string; /** * destination block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#destination S3Bucket#destination} */ readonly destination: S3BucketReplicationConfigurationRulesDestination; /** * filter block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#filter S3Bucket#filter} */ readonly filter?: S3BucketReplicationConfigurationRulesFilter; /** * source_selection_criteria block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#source_selection_criteria S3Bucket#source_selection_criteria} */ readonly sourceSelectionCriteria?: S3BucketReplicationConfigurationRulesSourceSelectionCriteria; } export function s3BucketReplicationConfigurationRulesToTerraform(struct?: S3BucketReplicationConfigurationRules): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { delete_marker_replication_status: cdktf.stringToTerraform(struct!.deleteMarkerReplicationStatus), id: cdktf.stringToTerraform(struct!.id), prefix: cdktf.stringToTerraform(struct!.prefix), priority: cdktf.numberToTerraform(struct!.priority), status: cdktf.stringToTerraform(struct!.status), destination: s3BucketReplicationConfigurationRulesDestinationToTerraform(struct!.destination), filter: s3BucketReplicationConfigurationRulesFilterToTerraform(struct!.filter), source_selection_criteria: s3BucketReplicationConfigurationRulesSourceSelectionCriteriaToTerraform(struct!.sourceSelectionCriteria), } } export interface S3BucketReplicationConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#role S3Bucket#role} */ readonly role: string; /** * rules block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#rules S3Bucket#rules} */ readonly rules: S3BucketReplicationConfigurationRules[]; } export function s3BucketReplicationConfigurationToTerraform(struct?: S3BucketReplicationConfigurationOutputReference | S3BucketReplicationConfiguration): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { role: cdktf.stringToTerraform(struct!.role), rules: cdktf.listMapper(s3BucketReplicationConfigurationRulesToTerraform)(struct!.rules), } } export class S3BucketReplicationConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketReplicationConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._role !== undefined) { hasAnyValues = true; internalValueResult.role = this._role; } if (this._rules !== undefined) { hasAnyValues = true; internalValueResult.rules = this._rules; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketReplicationConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._role = undefined; this._rules = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._role = value.role; this._rules = value.rules; } } // role - computed: false, optional: false, required: true private _role?: string; public get role() { return this.getStringAttribute('role'); } public set role(value: string) { this._role = value; } // Temporarily expose input value. Use with caution. public get roleInput() { return this._role; } // rules - computed: false, optional: false, required: true private _rules?: S3BucketReplicationConfigurationRules[]; public get rules() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('rules') as any; } public set rules(value: S3BucketReplicationConfigurationRules[]) { this._rules = value; } // Temporarily expose input value. Use with caution. public get rulesInput() { return this._rules; } } export interface S3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#kms_master_key_id S3Bucket#kms_master_key_id} */ readonly kmsMasterKeyId?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#sse_algorithm S3Bucket#sse_algorithm} */ readonly sseAlgorithm: string; } export function s3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultToTerraform(struct?: S3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultOutputReference | S3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { kms_master_key_id: cdktf.stringToTerraform(struct!.kmsMasterKeyId), sse_algorithm: cdktf.stringToTerraform(struct!.sseAlgorithm), } } export class S3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._kmsMasterKeyId !== undefined) { hasAnyValues = true; internalValueResult.kmsMasterKeyId = this._kmsMasterKeyId; } if (this._sseAlgorithm !== undefined) { hasAnyValues = true; internalValueResult.sseAlgorithm = this._sseAlgorithm; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault | undefined) { if (value === undefined) { this.isEmptyObject = false; this._kmsMasterKeyId = undefined; this._sseAlgorithm = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._kmsMasterKeyId = value.kmsMasterKeyId; this._sseAlgorithm = value.sseAlgorithm; } } // kms_master_key_id - computed: false, optional: true, required: false private _kmsMasterKeyId?: string; public get kmsMasterKeyId() { return this.getStringAttribute('kms_master_key_id'); } public set kmsMasterKeyId(value: string) { this._kmsMasterKeyId = value; } public resetKmsMasterKeyId() { this._kmsMasterKeyId = undefined; } // Temporarily expose input value. Use with caution. public get kmsMasterKeyIdInput() { return this._kmsMasterKeyId; } // sse_algorithm - computed: false, optional: false, required: true private _sseAlgorithm?: string; public get sseAlgorithm() { return this.getStringAttribute('sse_algorithm'); } public set sseAlgorithm(value: string) { this._sseAlgorithm = value; } // Temporarily expose input value. Use with caution. public get sseAlgorithmInput() { return this._sseAlgorithm; } } export interface S3BucketServerSideEncryptionConfigurationRule { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#bucket_key_enabled S3Bucket#bucket_key_enabled} */ readonly bucketKeyEnabled?: boolean | cdktf.IResolvable; /** * apply_server_side_encryption_by_default block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#apply_server_side_encryption_by_default S3Bucket#apply_server_side_encryption_by_default} */ readonly applyServerSideEncryptionByDefault: S3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault; } export function s3BucketServerSideEncryptionConfigurationRuleToTerraform(struct?: S3BucketServerSideEncryptionConfigurationRuleOutputReference | S3BucketServerSideEncryptionConfigurationRule): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { bucket_key_enabled: cdktf.booleanToTerraform(struct!.bucketKeyEnabled), apply_server_side_encryption_by_default: s3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultToTerraform(struct!.applyServerSideEncryptionByDefault), } } export class S3BucketServerSideEncryptionConfigurationRuleOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketServerSideEncryptionConfigurationRule | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._bucketKeyEnabled !== undefined) { hasAnyValues = true; internalValueResult.bucketKeyEnabled = this._bucketKeyEnabled; } if (this._applyServerSideEncryptionByDefault?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.applyServerSideEncryptionByDefault = this._applyServerSideEncryptionByDefault?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketServerSideEncryptionConfigurationRule | undefined) { if (value === undefined) { this.isEmptyObject = false; this._bucketKeyEnabled = undefined; this._applyServerSideEncryptionByDefault.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._bucketKeyEnabled = value.bucketKeyEnabled; this._applyServerSideEncryptionByDefault.internalValue = value.applyServerSideEncryptionByDefault; } } // bucket_key_enabled - computed: false, optional: true, required: false private _bucketKeyEnabled?: boolean | cdktf.IResolvable; public get bucketKeyEnabled() { return this.getBooleanAttribute('bucket_key_enabled') as any; } public set bucketKeyEnabled(value: boolean | cdktf.IResolvable) { this._bucketKeyEnabled = value; } public resetBucketKeyEnabled() { this._bucketKeyEnabled = undefined; } // Temporarily expose input value. Use with caution. public get bucketKeyEnabledInput() { return this._bucketKeyEnabled; } // apply_server_side_encryption_by_default - computed: false, optional: false, required: true private _applyServerSideEncryptionByDefault = new S3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefaultOutputReference(this as any, "apply_server_side_encryption_by_default", true); public get applyServerSideEncryptionByDefault() { return this._applyServerSideEncryptionByDefault; } public putApplyServerSideEncryptionByDefault(value: S3BucketServerSideEncryptionConfigurationRuleApplyServerSideEncryptionByDefault) { this._applyServerSideEncryptionByDefault.internalValue = value; } // Temporarily expose input value. Use with caution. public get applyServerSideEncryptionByDefaultInput() { return this._applyServerSideEncryptionByDefault.internalValue; } } export interface S3BucketServerSideEncryptionConfiguration { /** * rule block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#rule S3Bucket#rule} */ readonly rule: S3BucketServerSideEncryptionConfigurationRule; } export function s3BucketServerSideEncryptionConfigurationToTerraform(struct?: S3BucketServerSideEncryptionConfigurationOutputReference | S3BucketServerSideEncryptionConfiguration): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { rule: s3BucketServerSideEncryptionConfigurationRuleToTerraform(struct!.rule), } } export class S3BucketServerSideEncryptionConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketServerSideEncryptionConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._rule?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.rule = this._rule?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketServerSideEncryptionConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._rule.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._rule.internalValue = value.rule; } } // rule - computed: false, optional: false, required: true private _rule = new S3BucketServerSideEncryptionConfigurationRuleOutputReference(this as any, "rule", true); public get rule() { return this._rule; } public putRule(value: S3BucketServerSideEncryptionConfigurationRule) { this._rule.internalValue = value; } // Temporarily expose input value. Use with caution. public get ruleInput() { return this._rule.internalValue; } } export interface S3BucketVersioning { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#enabled S3Bucket#enabled} */ readonly enabled?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#mfa_delete S3Bucket#mfa_delete} */ readonly mfaDelete?: boolean | cdktf.IResolvable; } export function s3BucketVersioningToTerraform(struct?: S3BucketVersioningOutputReference | S3BucketVersioning): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { enabled: cdktf.booleanToTerraform(struct!.enabled), mfa_delete: cdktf.booleanToTerraform(struct!.mfaDelete), } } export class S3BucketVersioningOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketVersioning | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } if (this._mfaDelete !== undefined) { hasAnyValues = true; internalValueResult.mfaDelete = this._mfaDelete; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketVersioning | undefined) { if (value === undefined) { this.isEmptyObject = false; this._enabled = undefined; this._mfaDelete = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enabled = value.enabled; this._mfaDelete = value.mfaDelete; } } // enabled - computed: false, optional: true, required: false private _enabled?: boolean | cdktf.IResolvable; public get enabled() { return this.getBooleanAttribute('enabled') as any; } public set enabled(value: boolean | cdktf.IResolvable) { this._enabled = value; } public resetEnabled() { this._enabled = undefined; } // Temporarily expose input value. Use with caution. public get enabledInput() { return this._enabled; } // mfa_delete - computed: false, optional: true, required: false private _mfaDelete?: boolean | cdktf.IResolvable; public get mfaDelete() { return this.getBooleanAttribute('mfa_delete') as any; } public set mfaDelete(value: boolean | cdktf.IResolvable) { this._mfaDelete = value; } public resetMfaDelete() { this._mfaDelete = undefined; } // Temporarily expose input value. Use with caution. public get mfaDeleteInput() { return this._mfaDelete; } } export interface S3BucketWebsite { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#error_document S3Bucket#error_document} */ readonly errorDocument?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#index_document S3Bucket#index_document} */ readonly indexDocument?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#redirect_all_requests_to S3Bucket#redirect_all_requests_to} */ readonly redirectAllRequestsTo?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html#routing_rules S3Bucket#routing_rules} */ readonly routingRules?: string; } export function s3BucketWebsiteToTerraform(struct?: S3BucketWebsiteOutputReference | S3BucketWebsite): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { error_document: cdktf.stringToTerraform(struct!.errorDocument), index_document: cdktf.stringToTerraform(struct!.indexDocument), redirect_all_requests_to: cdktf.stringToTerraform(struct!.redirectAllRequestsTo), routing_rules: cdktf.stringToTerraform(struct!.routingRules), } } export class S3BucketWebsiteOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): S3BucketWebsite | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._errorDocument !== undefined) { hasAnyValues = true; internalValueResult.errorDocument = this._errorDocument; } if (this._indexDocument !== undefined) { hasAnyValues = true; internalValueResult.indexDocument = this._indexDocument; } if (this._redirectAllRequestsTo !== undefined) { hasAnyValues = true; internalValueResult.redirectAllRequestsTo = this._redirectAllRequestsTo; } if (this._routingRules !== undefined) { hasAnyValues = true; internalValueResult.routingRules = this._routingRules; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: S3BucketWebsite | undefined) { if (value === undefined) { this.isEmptyObject = false; this._errorDocument = undefined; this._indexDocument = undefined; this._redirectAllRequestsTo = undefined; this._routingRules = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._errorDocument = value.errorDocument; this._indexDocument = value.indexDocument; this._redirectAllRequestsTo = value.redirectAllRequestsTo; this._routingRules = value.routingRules; } } // error_document - computed: false, optional: true, required: false private _errorDocument?: string; public get errorDocument() { return this.getStringAttribute('error_document'); } public set errorDocument(value: string) { this._errorDocument = value; } public resetErrorDocument() { this._errorDocument = undefined; } // Temporarily expose input value. Use with caution. public get errorDocumentInput() { return this._errorDocument; } // index_document - computed: false, optional: true, required: false private _indexDocument?: string; public get indexDocument() { return this.getStringAttribute('index_document'); } public set indexDocument(value: string) { this._indexDocument = value; } public resetIndexDocument() { this._indexDocument = undefined; } // Temporarily expose input value. Use with caution. public get indexDocumentInput() { return this._indexDocument; } // redirect_all_requests_to - computed: false, optional: true, required: false private _redirectAllRequestsTo?: string; public get redirectAllRequestsTo() { return this.getStringAttribute('redirect_all_requests_to'); } public set redirectAllRequestsTo(value: string) { this._redirectAllRequestsTo = value; } public resetRedirectAllRequestsTo() { this._redirectAllRequestsTo = undefined; } // Temporarily expose input value. Use with caution. public get redirectAllRequestsToInput() { return this._redirectAllRequestsTo; } // routing_rules - computed: false, optional: true, required: false private _routingRules?: string; public get routingRules() { return this.getStringAttribute('routing_rules'); } public set routingRules(value: string) { this._routingRules = value; } public resetRoutingRules() { this._routingRules = undefined; } // Temporarily expose input value. Use with caution. public get routingRulesInput() { return this._routingRules; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html aws_s3_bucket} */ export class S3Bucket extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_s3_bucket"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket.html aws_s3_bucket} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options S3BucketConfig = {} */ public constructor(scope: Construct, id: string, config: S3BucketConfig = {}) { super(scope, id, { terraformResourceType: 'aws_s3_bucket', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._accelerationStatus = config.accelerationStatus; this._acl = config.acl; this._bucket = config.bucket; this._bucketPrefix = config.bucketPrefix; this._forceDestroy = config.forceDestroy; this._hostedZoneId = config.hostedZoneId; this._policy = config.policy; this._requestPayer = config.requestPayer; this._tags = config.tags; this._tagsAll = config.tagsAll; this._websiteDomain = config.websiteDomain; this._websiteEndpoint = config.websiteEndpoint; this._corsRule = config.corsRule; this._grant = config.grant; this._lifecycleRule = config.lifecycleRule; this._logging = config.logging; this._objectLockConfiguration.internalValue = config.objectLockConfiguration; this._replicationConfiguration.internalValue = config.replicationConfiguration; this._serverSideEncryptionConfiguration.internalValue = config.serverSideEncryptionConfiguration; this._versioning.internalValue = config.versioning; this._website.internalValue = config.website; } // ========== // ATTRIBUTES // ========== // acceleration_status - computed: true, optional: true, required: false private _accelerationStatus?: string; public get accelerationStatus() { return this.getStringAttribute('acceleration_status'); } public set accelerationStatus(value: string) { this._accelerationStatus = value; } public resetAccelerationStatus() { this._accelerationStatus = undefined; } // Temporarily expose input value. Use with caution. public get accelerationStatusInput() { return this._accelerationStatus; } // acl - computed: false, optional: true, required: false private _acl?: string; public get acl() { return this.getStringAttribute('acl'); } public set acl(value: string) { this._acl = value; } public resetAcl() { this._acl = undefined; } // Temporarily expose input value. Use with caution. public get aclInput() { return this._acl; } // arn - computed: true, optional: true, required: false public get arn() { return this.getStringAttribute('arn'); } // bucket - computed: true, optional: true, required: false private _bucket?: string; public get bucket() { return this.getStringAttribute('bucket'); } public set bucket(value: string) { this._bucket = value; } public resetBucket() { this._bucket = undefined; } // Temporarily expose input value. Use with caution. public get bucketInput() { return this._bucket; } // bucket_domain_name - computed: true, optional: false, required: false public get bucketDomainName() { return this.getStringAttribute('bucket_domain_name'); } // bucket_prefix - computed: false, optional: true, required: false private _bucketPrefix?: string; public get bucketPrefix() { return this.getStringAttribute('bucket_prefix'); } public set bucketPrefix(value: string) { this._bucketPrefix = value; } public resetBucketPrefix() { this._bucketPrefix = undefined; } // Temporarily expose input value. Use with caution. public get bucketPrefixInput() { return this._bucketPrefix; } // bucket_regional_domain_name - computed: true, optional: false, required: false public get bucketRegionalDomainName() { return this.getStringAttribute('bucket_regional_domain_name'); } // force_destroy - computed: false, optional: true, required: false private _forceDestroy?: boolean | cdktf.IResolvable; public get forceDestroy() { return this.getBooleanAttribute('force_destroy') as any; } public set forceDestroy(value: boolean | cdktf.IResolvable) { this._forceDestroy = value; } public resetForceDestroy() { this._forceDestroy = undefined; } // Temporarily expose input value. Use with caution. public get forceDestroyInput() { return this._forceDestroy; } // hosted_zone_id - computed: true, optional: true, required: false private _hostedZoneId?: string; public get hostedZoneId() { return this.getStringAttribute('hosted_zone_id'); } public set hostedZoneId(value: string) { this._hostedZoneId = value; } public resetHostedZoneId() { this._hostedZoneId = undefined; } // Temporarily expose input value. Use with caution. public get hostedZoneIdInput() { return this._hostedZoneId; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // policy - computed: false, optional: true, required: false private _policy?: string; public get policy() { return this.getStringAttribute('policy'); } public set policy(value: string) { this._policy = value; } public resetPolicy() { this._policy = undefined; } // Temporarily expose input value. Use with caution. public get policyInput() { return this._policy; } // region - computed: true, optional: false, required: false public get region() { return this.getStringAttribute('region'); } // request_payer - computed: true, optional: true, required: false private _requestPayer?: string; public get requestPayer() { return this.getStringAttribute('request_payer'); } public set requestPayer(value: string) { this._requestPayer = value; } public resetRequestPayer() { this._requestPayer = undefined; } // Temporarily expose input value. Use with caution. public get requestPayerInput() { return this._requestPayer; } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // tags_all - computed: true, optional: true, required: false private _tagsAll?: { [key: string]: string } | cdktf.IResolvable; public get tagsAll() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags_all') as any; } public set tagsAll(value: { [key: string]: string } | cdktf.IResolvable) { this._tagsAll = value; } public resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. public get tagsAllInput() { return this._tagsAll; } // website_domain - computed: true, optional: true, required: false private _websiteDomain?: string; public get websiteDomain() { return this.getStringAttribute('website_domain'); } public set websiteDomain(value: string) { this._websiteDomain = value; } public resetWebsiteDomain() { this._websiteDomain = undefined; } // Temporarily expose input value. Use with caution. public get websiteDomainInput() { return this._websiteDomain; } // website_endpoint - computed: true, optional: true, required: false private _websiteEndpoint?: string; public get websiteEndpoint() { return this.getStringAttribute('website_endpoint'); } public set websiteEndpoint(value: string) { this._websiteEndpoint = value; } public resetWebsiteEndpoint() { this._websiteEndpoint = undefined; } // Temporarily expose input value. Use with caution. public get websiteEndpointInput() { return this._websiteEndpoint; } // cors_rule - computed: false, optional: true, required: false private _corsRule?: S3BucketCorsRule[]; public get corsRule() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('cors_rule') as any; } public set corsRule(value: S3BucketCorsRule[]) { this._corsRule = value; } public resetCorsRule() { this._corsRule = undefined; } // Temporarily expose input value. Use with caution. public get corsRuleInput() { return this._corsRule; } // grant - computed: false, optional: true, required: false private _grant?: S3BucketGrant[]; public get grant() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('grant') as any; } public set grant(value: S3BucketGrant[]) { this._grant = value; } public resetGrant() { this._grant = undefined; } // Temporarily expose input value. Use with caution. public get grantInput() { return this._grant; } // lifecycle_rule - computed: false, optional: true, required: false private _lifecycleRule?: S3BucketLifecycleRule[]; public get lifecycleRule() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('lifecycle_rule') as any; } public set lifecycleRule(value: S3BucketLifecycleRule[]) { this._lifecycleRule = value; } public resetLifecycleRule() { this._lifecycleRule = undefined; } // Temporarily expose input value. Use with caution. public get lifecycleRuleInput() { return this._lifecycleRule; } // logging - computed: false, optional: true, required: false private _logging?: S3BucketLogging[]; public get logging() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('logging') as any; } public set logging(value: S3BucketLogging[]) { this._logging = value; } public resetLogging() { this._logging = undefined; } // Temporarily expose input value. Use with caution. public get loggingInput() { return this._logging; } // object_lock_configuration - computed: false, optional: true, required: false private _objectLockConfiguration = new S3BucketObjectLockConfigurationOutputReference(this as any, "object_lock_configuration", true); public get objectLockConfiguration() { return this._objectLockConfiguration; } public putObjectLockConfiguration(value: S3BucketObjectLockConfiguration) { this._objectLockConfiguration.internalValue = value; } public resetObjectLockConfiguration() { this._objectLockConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get objectLockConfigurationInput() { return this._objectLockConfiguration.internalValue; } // replication_configuration - computed: false, optional: true, required: false private _replicationConfiguration = new S3BucketReplicationConfigurationOutputReference(this as any, "replication_configuration", true); public get replicationConfiguration() { return this._replicationConfiguration; } public putReplicationConfiguration(value: S3BucketReplicationConfiguration) { this._replicationConfiguration.internalValue = value; } public resetReplicationConfiguration() { this._replicationConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get replicationConfigurationInput() { return this._replicationConfiguration.internalValue; } // server_side_encryption_configuration - computed: false, optional: true, required: false private _serverSideEncryptionConfiguration = new S3BucketServerSideEncryptionConfigurationOutputReference(this as any, "server_side_encryption_configuration", true); public get serverSideEncryptionConfiguration() { return this._serverSideEncryptionConfiguration; } public putServerSideEncryptionConfiguration(value: S3BucketServerSideEncryptionConfiguration) { this._serverSideEncryptionConfiguration.internalValue = value; } public resetServerSideEncryptionConfiguration() { this._serverSideEncryptionConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get serverSideEncryptionConfigurationInput() { return this._serverSideEncryptionConfiguration.internalValue; } // versioning - computed: false, optional: true, required: false private _versioning = new S3BucketVersioningOutputReference(this as any, "versioning", true); public get versioning() { return this._versioning; } public putVersioning(value: S3BucketVersioning) { this._versioning.internalValue = value; } public resetVersioning() { this._versioning.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get versioningInput() { return this._versioning.internalValue; } // website - computed: false, optional: true, required: false private _website = new S3BucketWebsiteOutputReference(this as any, "website", true); public get website() { return this._website; } public putWebsite(value: S3BucketWebsite) { this._website.internalValue = value; } public resetWebsite() { this._website.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get websiteInput() { return this._website.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { acceleration_status: cdktf.stringToTerraform(this._accelerationStatus), acl: cdktf.stringToTerraform(this._acl), bucket: cdktf.stringToTerraform(this._bucket), bucket_prefix: cdktf.stringToTerraform(this._bucketPrefix), force_destroy: cdktf.booleanToTerraform(this._forceDestroy), hosted_zone_id: cdktf.stringToTerraform(this._hostedZoneId), policy: cdktf.stringToTerraform(this._policy), request_payer: cdktf.stringToTerraform(this._requestPayer), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), website_domain: cdktf.stringToTerraform(this._websiteDomain), website_endpoint: cdktf.stringToTerraform(this._websiteEndpoint), cors_rule: cdktf.listMapper(s3BucketCorsRuleToTerraform)(this._corsRule), grant: cdktf.listMapper(s3BucketGrantToTerraform)(this._grant), lifecycle_rule: cdktf.listMapper(s3BucketLifecycleRuleToTerraform)(this._lifecycleRule), logging: cdktf.listMapper(s3BucketLoggingToTerraform)(this._logging), object_lock_configuration: s3BucketObjectLockConfigurationToTerraform(this._objectLockConfiguration.internalValue), replication_configuration: s3BucketReplicationConfigurationToTerraform(this._replicationConfiguration.internalValue), server_side_encryption_configuration: s3BucketServerSideEncryptionConfigurationToTerraform(this._serverSideEncryptionConfiguration.internalValue), versioning: s3BucketVersioningToTerraform(this._versioning.internalValue), website: s3BucketWebsiteToTerraform(this._website.internalValue), }; } }