@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
254 lines (253 loc) • 7.66 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* `aws.ec2.Eip` provides details about a specific Elastic IP.
*
* ## Example Usage
*
* ### Search By Allocation ID (VPC only)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const byAllocationId = aws.ec2.getElasticIp({
* id: "eipalloc-12345678",
* });
* ```
*
* ### Search By Filters (EC2-Classic or VPC)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const byFilter = aws.ec2.getElasticIp({
* filters: [{
* name: "tag:Name",
* values: ["exampleNameTagValue"],
* }],
* });
* ```
*
* ### Search By Public IP (EC2-Classic or VPC)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const byPublicIp = aws.ec2.getElasticIp({
* publicIp: "1.2.3.4",
* });
* ```
*
* ### Search By Tags (EC2-Classic or VPC)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const byTags = aws.ec2.getElasticIp({
* tags: {
* Name: "exampleNameTagValue",
* },
* });
* ```
*/
export declare function getElasticIp(args?: GetElasticIpArgs, opts?: pulumi.InvokeOptions): Promise<GetElasticIpResult>;
/**
* A collection of arguments for invoking getElasticIp.
*/
export interface GetElasticIpArgs {
/**
* One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAddresses.html).
*/
filters?: inputs.ec2.GetElasticIpFilter[];
/**
* Allocation ID of the specific VPC EIP to retrieve. If a classic EIP is required, do NOT set `id`, only set `publicIp`
*/
id?: string;
/**
* Public IP of the specific EIP to retrieve.
*/
publicIp?: string;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: string;
/**
* Map of tags, each pair of which must exactly match a pair on the desired Elastic IP.
*
* The arguments of this data source act as filters for querying the available
* Elastic IPs in the current region. The given filters must match exactly one
* Elastic IP whose data will be exported as attributes.
*/
tags?: {
[key: string]: string;
};
}
/**
* A collection of values returned by getElasticIp.
*/
export interface GetElasticIpResult {
readonly arn: string;
/**
* ID representing the association of the address with an instance in a VPC.
*/
readonly associationId: string;
/**
* Carrier IP address.
*/
readonly carrierIp: string;
/**
* Customer Owned IP.
*/
readonly customerOwnedIp: string;
/**
* The ID of a Customer Owned IP Pool. For more on customer owned IP addressed check out [Customer-owned IP addresses guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing)
*/
readonly customerOwnedIpv4Pool: string;
/**
* Whether the address is for use in EC2-Classic (standard) or in a VPC (vpc).
*/
readonly domain: string;
readonly filters?: outputs.ec2.GetElasticIpFilter[];
/**
* If VPC Elastic IP, the allocation identifier. If EC2-Classic Elastic IP, the public IP address.
*/
readonly id: string;
/**
* ID of the instance that the address is associated with (if any).
*/
readonly instanceId: string;
/**
* The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.
*/
readonly ipamPoolId: string;
/**
* The ID of the network interface.
*/
readonly networkInterfaceId: string;
/**
* The ID of the AWS account that owns the network interface.
*/
readonly networkInterfaceOwnerId: string;
/**
* Private DNS associated with the Elastic IP address.
*/
readonly privateDns: string;
/**
* Private IP address associated with the Elastic IP address.
*/
readonly privateIp: string;
/**
* The DNS pointer (PTR) record for the IP address.
*/
readonly ptrRecord: string;
/**
* Public DNS associated with the Elastic IP address.
*/
readonly publicDns: string;
/**
* Public IP address of Elastic IP.
*/
readonly publicIp: string;
/**
* ID of an address pool.
*/
readonly publicIpv4Pool: string;
readonly region: string;
/**
* Key-value map of tags associated with Elastic IP.
*/
readonly tags: {
[key: string]: string;
};
}
/**
* `aws.ec2.Eip` provides details about a specific Elastic IP.
*
* ## Example Usage
*
* ### Search By Allocation ID (VPC only)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const byAllocationId = aws.ec2.getElasticIp({
* id: "eipalloc-12345678",
* });
* ```
*
* ### Search By Filters (EC2-Classic or VPC)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const byFilter = aws.ec2.getElasticIp({
* filters: [{
* name: "tag:Name",
* values: ["exampleNameTagValue"],
* }],
* });
* ```
*
* ### Search By Public IP (EC2-Classic or VPC)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const byPublicIp = aws.ec2.getElasticIp({
* publicIp: "1.2.3.4",
* });
* ```
*
* ### Search By Tags (EC2-Classic or VPC)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const byTags = aws.ec2.getElasticIp({
* tags: {
* Name: "exampleNameTagValue",
* },
* });
* ```
*/
export declare function getElasticIpOutput(args?: GetElasticIpOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetElasticIpResult>;
/**
* A collection of arguments for invoking getElasticIp.
*/
export interface GetElasticIpOutputArgs {
/**
* One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAddresses.html).
*/
filters?: pulumi.Input<pulumi.Input<inputs.ec2.GetElasticIpFilterArgs>[]>;
/**
* Allocation ID of the specific VPC EIP to retrieve. If a classic EIP is required, do NOT set `id`, only set `publicIp`
*/
id?: pulumi.Input<string>;
/**
* Public IP of the specific EIP to retrieve.
*/
publicIp?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Map of tags, each pair of which must exactly match a pair on the desired Elastic IP.
*
* The arguments of this data source act as filters for querying the available
* Elastic IPs in the current region. The given filters must match exactly one
* Elastic IP whose data will be exported as attributes.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}