// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS VPC */ export interface DataAwsNatGatewayConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/nat_gateway.html#state DataAwsNatGateway#state} */ readonly state?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/nat_gateway.html#subnet_id DataAwsNatGateway#subnet_id} */ readonly subnetId?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/nat_gateway.html#tags DataAwsNatGateway#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/nat_gateway.html#vpc_id DataAwsNatGateway#vpc_id} */ readonly vpcId?: string; /** * filter block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/nat_gateway.html#filter DataAwsNatGateway#filter} */ readonly filter?: DataAwsNatGatewayFilter[]; } export interface DataAwsNatGatewayFilter { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/nat_gateway.html#name DataAwsNatGateway#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/nat_gateway.html#values DataAwsNatGateway#values} */ readonly values: string[]; } export function dataAwsNatGatewayFilterToTerraform(struct?: DataAwsNatGatewayFilter): 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/nat_gateway.html aws_nat_gateway} */ export class DataAwsNatGateway extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_nat_gateway"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/nat_gateway.html aws_nat_gateway} 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 DataAwsNatGatewayConfig = {} */ public constructor(scope: Construct, id: string, config: DataAwsNatGatewayConfig = {}) { super(scope, id, { terraformResourceType: 'aws_nat_gateway', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._state = config.state; this._subnetId = config.subnetId; this._tags = config.tags; this._vpcId = config.vpcId; this._filter = config.filter; } // ========== // ATTRIBUTES // ========== // allocation_id - computed: true, optional: false, required: false public get allocationId() { return this.getStringAttribute('allocation_id'); } // connectivity_type - computed: true, optional: false, required: false public get connectivityType() { return this.getStringAttribute('connectivity_type'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // network_interface_id - computed: true, optional: false, required: false public get networkInterfaceId() { return this.getStringAttribute('network_interface_id'); } // private_ip - computed: true, optional: false, required: false public get privateIp() { return this.getStringAttribute('private_ip'); } // public_ip - computed: true, optional: false, required: false public get publicIp() { return this.getStringAttribute('public_ip'); } // state - computed: true, optional: true, required: false private _state?: string; public get state() { return this.getStringAttribute('state'); } public set state(value: string) { this._state = value; } public resetState() { this._state = undefined; } // Temporarily expose input value. Use with caution. public get stateInput() { return this._state; } // subnet_id - computed: true, optional: true, required: false private _subnetId?: string; public get subnetId() { return this.getStringAttribute('subnet_id'); } public set subnetId(value: string) { this._subnetId = value; } public resetSubnetId() { this._subnetId = undefined; } // Temporarily expose input value. Use with caution. public get subnetIdInput() { return this._subnetId; } // 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: true, required: false private _vpcId?: string; public get vpcId() { return this.getStringAttribute('vpc_id'); } public set vpcId(value: string) { this._vpcId = value; } public resetVpcId() { this._vpcId = undefined; } // Temporarily expose input value. Use with caution. public get vpcIdInput() { return this._vpcId; } // filter - computed: false, optional: true, required: false private _filter?: DataAwsNatGatewayFilter[]; public get filter() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('filter') as any; } public set filter(value: DataAwsNatGatewayFilter[]) { 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 { state: cdktf.stringToTerraform(this._state), subnet_id: cdktf.stringToTerraform(this._subnetId), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), vpc_id: cdktf.stringToTerraform(this._vpcId), filter: cdktf.listMapper(dataAwsNatGatewayFilterToTerraform)(this._filter), }; } }