// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS EC2 */ export interface DataAwsEbsVolumeConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ebs_volume.html#most_recent DataAwsEbsVolume#most_recent} */ readonly mostRecent?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ebs_volume.html#tags DataAwsEbsVolume#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * filter block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ebs_volume.html#filter DataAwsEbsVolume#filter} */ readonly filter?: DataAwsEbsVolumeFilter[]; } export interface DataAwsEbsVolumeFilter { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ebs_volume.html#name DataAwsEbsVolume#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ebs_volume.html#values DataAwsEbsVolume#values} */ readonly values: string[]; } export function dataAwsEbsVolumeFilterToTerraform(struct?: DataAwsEbsVolumeFilter): 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 { name: cdktf.stringToTerraform(struct!.name), values: cdktf.listMapper(cdktf.stringToTerraform)(struct!.values), } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/d/ebs_volume.html aws_ebs_volume} */ export class DataAwsEbsVolume extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_ebs_volume"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/ebs_volume.html aws_ebs_volume} 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 DataAwsEbsVolumeConfig = {} */ public constructor(scope: Construct, id: string, config: DataAwsEbsVolumeConfig = {}) { super(scope, id, { terraformResourceType: 'aws_ebs_volume', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._mostRecent = config.mostRecent; this._tags = config.tags; this._filter = config.filter; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // availability_zone - computed: true, optional: false, required: false public get availabilityZone() { return this.getStringAttribute('availability_zone'); } // encrypted - computed: true, optional: false, required: false public get encrypted() { return this.getBooleanAttribute('encrypted') as any; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // iops - computed: true, optional: false, required: false public get iops() { return this.getNumberAttribute('iops'); } // kms_key_id - computed: true, optional: false, required: false public get kmsKeyId() { return this.getStringAttribute('kms_key_id'); } // most_recent - computed: false, optional: true, required: false private _mostRecent?: boolean | cdktf.IResolvable; public get mostRecent() { return this.getBooleanAttribute('most_recent') as any; } public set mostRecent(value: boolean | cdktf.IResolvable) { this._mostRecent = value; } public resetMostRecent() { this._mostRecent = undefined; } // Temporarily expose input value. Use with caution. public get mostRecentInput() { return this._mostRecent; } // multi_attach_enabled - computed: true, optional: false, required: false public get multiAttachEnabled() { return this.getBooleanAttribute('multi_attach_enabled') as any; } // outpost_arn - computed: true, optional: false, required: false public get outpostArn() { return this.getStringAttribute('outpost_arn'); } // size - computed: true, optional: false, required: false public get size() { return this.getNumberAttribute('size'); } // snapshot_id - computed: true, optional: false, required: false public get snapshotId() { return this.getStringAttribute('snapshot_id'); } // tags - computed: true, 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; } // throughput - computed: true, optional: false, required: false public get throughput() { return this.getNumberAttribute('throughput'); } // volume_id - computed: true, optional: false, required: false public get volumeId() { return this.getStringAttribute('volume_id'); } // volume_type - computed: true, optional: false, required: false public get volumeType() { return this.getStringAttribute('volume_type'); } // filter - computed: false, optional: true, required: false private _filter?: DataAwsEbsVolumeFilter[]; public get filter() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('filter') as any; } public set filter(value: DataAwsEbsVolumeFilter[]) { this._filter = value; } public resetFilter() { this._filter = undefined; } // Temporarily expose input value. Use with caution. public get filterInput() { return this._filter; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { most_recent: cdktf.booleanToTerraform(this._mostRecent), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), filter: cdktf.listMapper(dataAwsEbsVolumeFilterToTerraform)(this._filter), }; } }