// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS EC2 */ export interface DataAwsEc2ManagedPrefixListConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ec2_managed_prefix_list.html#name DataAwsEc2ManagedPrefixList#name} */ readonly name?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ec2_managed_prefix_list.html#tags DataAwsEc2ManagedPrefixList#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * filter block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ec2_managed_prefix_list.html#filter DataAwsEc2ManagedPrefixList#filter} */ readonly filter?: DataAwsEc2ManagedPrefixListFilter[]; } export class DataAwsEc2ManagedPrefixListEntries extends cdktf.ComplexComputedList { // cidr - computed: true, optional: false, required: false public get cidr() { return this.getStringAttribute('cidr'); } // description - computed: true, optional: false, required: false public get description() { return this.getStringAttribute('description'); } } export interface DataAwsEc2ManagedPrefixListFilter { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ec2_managed_prefix_list.html#name DataAwsEc2ManagedPrefixList#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/ec2_managed_prefix_list.html#values DataAwsEc2ManagedPrefixList#values} */ readonly values: string[]; } export function dataAwsEc2ManagedPrefixListFilterToTerraform(struct?: DataAwsEc2ManagedPrefixListFilter): 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/ec2_managed_prefix_list.html aws_ec2_managed_prefix_list} */ export class DataAwsEc2ManagedPrefixList extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_ec2_managed_prefix_list"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/ec2_managed_prefix_list.html aws_ec2_managed_prefix_list} 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 DataAwsEc2ManagedPrefixListConfig = {} */ public constructor(scope: Construct, id: string, config: DataAwsEc2ManagedPrefixListConfig = {}) { super(scope, id, { terraformResourceType: 'aws_ec2_managed_prefix_list', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._name = config.name; this._tags = config.tags; this._filter = config.filter; } // ========== // ATTRIBUTES // ========== // address_family - computed: true, optional: false, required: false public get addressFamily() { return this.getStringAttribute('address_family'); } // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // entries - computed: true, optional: false, required: false public entries(index: string) { return new DataAwsEc2ManagedPrefixListEntries(this, 'entries', index); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // max_entries - computed: true, optional: false, required: false public get maxEntries() { return this.getNumberAttribute('max_entries'); } // name - computed: true, optional: true, required: false private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } public resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. public get nameInput() { return this._name; } // owner_id - computed: true, optional: false, required: false public get ownerId() { return this.getStringAttribute('owner_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; } // version - computed: true, optional: false, required: false public get version() { return this.getNumberAttribute('version'); } // filter - computed: false, optional: true, required: false private _filter?: DataAwsEc2ManagedPrefixListFilter[]; public get filter() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('filter') as any; } public set filter(value: DataAwsEc2ManagedPrefixListFilter[]) { 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 { name: cdktf.stringToTerraform(this._name), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), filter: cdktf.listMapper(dataAwsEc2ManagedPrefixListFilterToTerraform)(this._filter), }; } }