// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Simple Storage Service */ export interface DataAwsS3BucketConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/s3_bucket.html#bucket DataAwsS3Bucket#bucket} */ readonly bucket: string; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/d/s3_bucket.html aws_s3_bucket} */ export class DataAwsS3Bucket extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_s3_bucket"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/s3_bucket.html aws_s3_bucket} Data Source * * @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 DataAwsS3BucketConfig */ public constructor(scope: Construct, id: string, config: DataAwsS3BucketConfig) { super(scope, id, { terraformResourceType: 'aws_s3_bucket', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._bucket = config.bucket; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // 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; } // bucket_domain_name - computed: true, optional: false, required: false public get bucketDomainName() { return this.getStringAttribute('bucket_domain_name'); } // bucket_regional_domain_name - computed: true, optional: false, required: false public get bucketRegionalDomainName() { return this.getStringAttribute('bucket_regional_domain_name'); } // hosted_zone_id - computed: true, optional: false, required: false public get hostedZoneId() { return this.getStringAttribute('hosted_zone_id'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // region - computed: true, optional: false, required: false public get region() { return this.getStringAttribute('region'); } // website_domain - computed: true, optional: false, required: false public get websiteDomain() { return this.getStringAttribute('website_domain'); } // website_endpoint - computed: true, optional: false, required: false public get websiteEndpoint() { return this.getStringAttribute('website_endpoint'); } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { bucket: cdktf.stringToTerraform(this._bucket), }; } }