// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS VPC */ export interface DataAwsNetworkInterfaceConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/network_interface.html#tags DataAwsNetworkInterface#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * filter block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/network_interface.html#filter DataAwsNetworkInterface#filter} */ readonly filter?: DataAwsNetworkInterfaceFilter[]; } export class DataAwsNetworkInterfaceAssociation extends cdktf.ComplexComputedList { // allocation_id - computed: true, optional: false, required: false public get allocationId() { return this.getStringAttribute('allocation_id'); } // association_id - computed: true, optional: false, required: false public get associationId() { return this.getStringAttribute('association_id'); } // carrier_ip - computed: true, optional: false, required: false public get carrierIp() { return this.getStringAttribute('carrier_ip'); } // customer_owned_ip - computed: true, optional: false, required: false public get customerOwnedIp() { return this.getStringAttribute('customer_owned_ip'); } // ip_owner_id - computed: true, optional: false, required: false public get ipOwnerId() { return this.getStringAttribute('ip_owner_id'); } // public_dns_name - computed: true, optional: false, required: false public get publicDnsName() { return this.getStringAttribute('public_dns_name'); } // public_ip - computed: true, optional: false, required: false public get publicIp() { return this.getStringAttribute('public_ip'); } } export class DataAwsNetworkInterfaceAttachment extends cdktf.ComplexComputedList { // attachment_id - computed: true, optional: false, required: false public get attachmentId() { return this.getStringAttribute('attachment_id'); } // device_index - computed: true, optional: false, required: false public get deviceIndex() { return this.getNumberAttribute('device_index'); } // instance_id - computed: true, optional: false, required: false public get instanceId() { return this.getStringAttribute('instance_id'); } // instance_owner_id - computed: true, optional: false, required: false public get instanceOwnerId() { return this.getStringAttribute('instance_owner_id'); } } export interface DataAwsNetworkInterfaceFilter { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/network_interface.html#name DataAwsNetworkInterface#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/network_interface.html#values DataAwsNetworkInterface#values} */ readonly values: string[]; } export function dataAwsNetworkInterfaceFilterToTerraform(struct?: DataAwsNetworkInterfaceFilter): 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/network_interface.html aws_network_interface} */ export class DataAwsNetworkInterface extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_network_interface"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/network_interface.html aws_network_interface} 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 DataAwsNetworkInterfaceConfig = {} */ public constructor(scope: Construct, id: string, config: DataAwsNetworkInterfaceConfig = {}) { super(scope, id, { terraformResourceType: 'aws_network_interface', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._tags = config.tags; this._filter = config.filter; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // association - computed: true, optional: false, required: false public association(index: string) { return new DataAwsNetworkInterfaceAssociation(this, 'association', index); } // attachment - computed: true, optional: false, required: false public attachment(index: string) { return new DataAwsNetworkInterfaceAttachment(this, 'attachment', index); } // availability_zone - computed: true, optional: false, required: false public get availabilityZone() { return this.getStringAttribute('availability_zone'); } // description - computed: true, optional: false, required: false public get description() { return this.getStringAttribute('description'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // interface_type - computed: true, optional: false, required: false public get interfaceType() { return this.getStringAttribute('interface_type'); } // ipv6_addresses - computed: true, optional: false, required: false public get ipv6Addresses() { return this.getListAttribute('ipv6_addresses'); } // mac_address - computed: true, optional: false, required: false public get macAddress() { return this.getStringAttribute('mac_address'); } // outpost_arn - computed: true, optional: false, required: false public get outpostArn() { return this.getStringAttribute('outpost_arn'); } // owner_id - computed: true, optional: false, required: false public get ownerId() { return this.getStringAttribute('owner_id'); } // private_dns_name - computed: true, optional: false, required: false public get privateDnsName() { return this.getStringAttribute('private_dns_name'); } // private_ip - computed: true, optional: false, required: false public get privateIp() { return this.getStringAttribute('private_ip'); } // private_ips - computed: true, optional: false, required: false public get privateIps() { return this.getListAttribute('private_ips'); } // requester_id - computed: true, optional: false, required: false public get requesterId() { return this.getStringAttribute('requester_id'); } // security_groups - computed: true, optional: false, required: false public get securityGroups() { return this.getListAttribute('security_groups'); } // subnet_id - computed: true, optional: false, required: false public get subnetId() { return this.getStringAttribute('subnet_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; } // vpc_id - computed: true, optional: false, required: false public get vpcId() { return this.getStringAttribute('vpc_id'); } // filter - computed: false, optional: true, required: false private _filter?: DataAwsNetworkInterfaceFilter[]; public get filter() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('filter') as any; } public set filter(value: DataAwsNetworkInterfaceFilter[]) { 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 { tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), filter: cdktf.listMapper(dataAwsNetworkInterfaceFilterToTerraform)(this._filter), }; } }