// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS CloudFront */ export interface DataAwsCloudfrontDistributionConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/cloudfront_distribution.html#id DataAwsCloudfrontDistribution#id} */ readonly id: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/cloudfront_distribution.html#tags DataAwsCloudfrontDistribution#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/d/cloudfront_distribution.html aws_cloudfront_distribution} */ export class DataAwsCloudfrontDistribution extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_cloudfront_distribution"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/cloudfront_distribution.html aws_cloudfront_distribution} 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 DataAwsCloudfrontDistributionConfig */ public constructor(scope: Construct, id: string, config: DataAwsCloudfrontDistributionConfig) { super(scope, id, { terraformResourceType: 'aws_cloudfront_distribution', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._id = config.id; this._tags = config.tags; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // domain_name - computed: true, optional: false, required: false public get domainName() { return this.getStringAttribute('domain_name'); } // enabled - computed: true, optional: false, required: false public get enabled() { return this.getBooleanAttribute('enabled') as any; } // etag - computed: true, optional: false, required: false public get etag() { return this.getStringAttribute('etag'); } // hosted_zone_id - computed: true, optional: false, required: false public get hostedZoneId() { return this.getStringAttribute('hosted_zone_id'); } // id - computed: false, optional: false, required: true private _id?: string; public get id() { return this.getStringAttribute('id'); } public set id(value: string) { this._id = value; } // Temporarily expose input value. Use with caution. public get idInput() { return this._id; } // in_progress_validation_batches - computed: true, optional: false, required: false public get inProgressValidationBatches() { return this.getNumberAttribute('in_progress_validation_batches'); } // last_modified_time - computed: true, optional: false, required: false public get lastModifiedTime() { return this.getStringAttribute('last_modified_time'); } // status - computed: true, optional: false, required: false public get status() { return this.getStringAttribute('status'); } // 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; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { id: cdktf.stringToTerraform(this._id), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), }; } }