Package @pulumi/aws

Node.js:

var aws = require("@pulumi/aws");

ES6 modules:

import * as aws from "@pulumi/aws";

Index

arn.ts getAmi.ts getAmiIds.ts getArn.ts getAutoscalingGroups.ts getAvailabilityZone.ts getAvailabilityZones.ts getBillingServiceAccount.ts getCallerIdentity.ts getCanonicalUserId.ts getElasticIp.ts getIpRanges.ts getPartition.ts getPrefixList.ts getRegion.ts region.ts

Modules

function getAmi

getAmi(args?: GetAmiArgs): Promise<GetAmiResult>

Use this data source to get the ID of a registered AMI for use in other resources.

function getAmiIds

getAmiIds(args?: GetAmiIdsArgs): Promise<GetAmiIdsResult>

Use this data source to get a list of AMI IDs matching the specified criteria.

function getArn

getArn(args: GetArnArgs): Promise<GetArnResult>

Parses an Amazon Resource Name (ARN) into its constituent parts.

function getAutoscalingGroups

getAutoscalingGroups(args?: GetAutoscalingGroupsArgs): Promise<GetAutoscalingGroupsResult>

The Autoscaling Groups data source allows access to the list of AWS ASGs within a specific region. This will allow you to pass a list of AutoScaling Groups to other resources.

function getAvailabilityZone

getAvailabilityZone(args?: GetAvailabilityZoneArgs): Promise<GetAvailabilityZoneResult>

aws_availability_zone provides details about a specific availability zone (AZ) in the current region.

This can be used both to validate an availability zone given in a variable and to split the AZ name into its component parts of an AWS region and an AZ identifier letter. The latter may be useful e.g. for implementing a consistent subnet numbering scheme across several regions by mapping both the region and the subnet letter to network numbers.

This is different from the aws_availability_zones (plural) data source, which provides a list of the available zones.

function getAvailabilityZones

getAvailabilityZones(args?: GetAvailabilityZonesArgs): Promise<GetAvailabilityZonesResult>

The Availability Zones data source allows access to the list of AWS Availability Zones which can be accessed by an AWS account within the region configured in the provider.

This is different from the aws_availability_zone (singular) data source, which provides some details about a specific availability zone.

function getBillingServiceAccount

getBillingServiceAccount(): Promise<GetBillingServiceAccountResult>

Use this data source to get the Account ID of the AWS Billing and Cost Management Service Account for the purpose of whitelisting in S3 bucket policy.

function getCallerIdentity

getCallerIdentity(): Promise<GetCallerIdentityResult>

Use this data source to get the access to the effective Account ID, User ID, and ARN in which Terraform is authorized.

function getCanonicalUserId

getCanonicalUserId(): Promise<GetCanonicalUserIdResult>

The Canonical User ID data source allows access to the canonical user ID for the effective account in which Terraform is working.

function getElasticIp

getElasticIp(args?: GetElasticIpArgs): Promise<GetElasticIpResult>

aws_eip provides details about a specific Elastic IP.

This resource can prove useful when a module accepts an allocation ID or public IP as an input variable and needs to determine the other.

function getIpRanges

getIpRanges(args: GetIpRangesArgs): Promise<GetIpRangesResult>

Use this data source to get the [IP ranges][1] of various AWS products and services.

function getPartition

getPartition(): Promise<GetPartitionResult>

Use this data source to lookup current AWS partition in which Terraform is working

function getPrefixList

getPrefixList(args?: GetPrefixListArgs): Promise<GetPrefixListResult>

aws_prefix_list provides details about a specific prefix list (PL) in the current region.

This can be used both to validate a prefix list given in a variable and to obtain the CIDR blocks (IP address ranges) for the associated AWS service. The latter may be useful e.g. for adding network ACL rules.

function getRegion

getRegion(args?: GetRegionArgs): Promise<GetRegionResult>

aws_region provides details about a specific AWS region.

As well as validating a given region name this resource can be used to discover the name of the region configured within the provider. The latter can be useful in a child module which is inheriting an AWS provider configuration from its parent module.

interface GetAmiArgs

A collection of arguments for invoking getAmi.

property executableUsers

executableUsers?: pulumi.Input<pulumi.Input<string>[]>;

Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or self.

property filters

filters?: pulumi.Input<{ ... }[]>;

One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out [describe-images in the AWS CLI reference][1].

property mostRecent

mostRecent?: pulumi.Input<boolean>;

If more than one result is returned, use the most recent AMI.

property nameRegex

nameRegex?: pulumi.Input<string>;

A regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. It is recommended to combine this with other options to narrow down the list AWS returns.

property owners

owners?: pulumi.Input<pulumi.Input<string>[]>;

Limit search to specific AMI owners. Valid items are the numeric account ID, amazon, or self.

property tags

tags?: pulumi.Input<{ ... }>;

interface GetAmiIdsArgs

A collection of arguments for invoking getAmiIds.

property executableUsers

executableUsers?: pulumi.Input<pulumi.Input<string>[]>;

Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or self.

property filters

filters?: pulumi.Input<{ ... }[]>;

One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out [describe-images in the AWS CLI reference][1].

property nameRegex

nameRegex?: pulumi.Input<string>;

A regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. It is recommended to combine this with other options to narrow down the list AWS returns.

property owners

owners?: pulumi.Input<pulumi.Input<string>[]>;

Limit search to specific AMI owners. Valid items are the numeric account ID, amazon, or self.

interface GetAmiIdsResult

A collection of values returned by getAmiIds.

property ids

ids: string[];

interface GetAmiResult

A collection of values returned by getAmi.

property architecture

architecture: string;

The OS architecture of the AMI (ie: i386 or x86_64).

property blockDeviceMappings

blockDeviceMappings: { ... }[];

The block device mappings of the AMI.

  • block_device_mappings.#.device_name - The physical name of the device.
  • block_device_mappings.#.ebs.delete_on_termination - true if the EBS volume will be deleted on termination.
  • block_device_mappings.#.ebs.encrypted - true if the EBS volume is encrypted.
  • block_device_mappings.#.ebs.iops - 0 if the EBS volume is not a provisioned IOPS image, otherwise the supported IOPS count.
  • block_device_mappings.#.ebs.snapshot_id - The ID of the snapshot.
  • block_device_mappings.#.ebs.volume_size - The size of the volume, in GiB.
  • block_device_mappings.#.ebs.volume_type - The volume type.
  • block_device_mappings.#.no_device - Suppresses the specified device included in the block device mapping of the AMI.
  • block_device_mappings.#.virtual_name - The virtual device name (for instance stores).

property creationDate

creationDate: string;

The date and time the image was created.

property description

description: string;

The description of the AMI that was provided during image creation.

property hypervisor

hypervisor: string;

The hypervisor type of the image.

property imageId

imageId: string;

The ID of the AMI. Should be the same as the resource id.

property imageLocation

imageLocation: string;

The location of the AMI.

property imageOwnerAlias

imageOwnerAlias: string;

The AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.

property imageType

imageType: string;

The type of image.

property kernelId

kernelId: string;

The kernel associated with the image, if any. Only applicable for machine images.

property name

name: string;

The name of the AMI that was provided during image creation.

property ownerId

ownerId: string;

The AWS account ID of the image owner.

property platform

platform: string;

The value is Windows for Windows AMIs; otherwise blank.

property productCodes

productCodes: { ... }[];

Any product codes associated with the AMI.

  • product_codes.#.product_code_id - The product code.
  • product_codes.#.product_code_type - The type of product code.

property public

public: boolean;

true if the image has public launch permissions.

property ramdiskId

ramdiskId: string;

The RAM disk associated with the image, if any. Only applicable for machine images.

property rootDeviceName

rootDeviceName: string;

The device name of the root device.

property rootDeviceType

rootDeviceType: string;

The type of root device (ie: ebs or instance-store).

property rootSnapshotId

rootSnapshotId: string;

The snapshot id associated with the root device, if any (only applies to ebs root devices).

property sriovNetSupport

sriovNetSupport: string;

Specifies whether enhanced networking is enabled.

property state

state: string;

The current state of the AMI. If the state is available, the image is successfully registered and can be used to launch an instance.

property stateReason

stateReason: { ... };

Describes a state change. Fields are UNSET if not available.

  • state_reason.code - The reason code for the state change.
  • state_reason.message - The message for the state change.

property tags

tags: { ... };

Any tags assigned to the image.

  • tags.#.key - The key name of the tag.
  • tags.#.value - The value of the tag.

property virtualizationType

virtualizationType: string;

The type of virtualization of the AMI (ie: hvm or paravirtual).

interface GetArnArgs

A collection of arguments for invoking getArn.

property arn

arn: pulumi.Input<string>;

The ARN to parse.

interface GetArnResult

A collection of values returned by getArn.

property account

account: string;

The ID of the AWS account that owns the resource, without the hyphens.

property partition

partition: string;

The partition that the resource is in.

property region

region: string;

The region the resource resides in. Note that the ARNs for some resources do not require a region, so this component might be omitted.

property resource

resource: string;

The content of this part of the ARN varies by service. It often includes an indicator of the type of resource—for example, an IAM user or Amazon RDS database —followed by a slash (/) or a colon (:), followed by the resource name itself.

property service

service: string;

The service namespace that identifies the AWS product.

interface GetAutoscalingGroupsArgs

A collection of arguments for invoking getAutoscalingGroups.

property filters

filters?: pulumi.Input<{ ... }[]>;

A filter used to scope the list e.g. by tags. See related docs.

interface GetAutoscalingGroupsResult

A collection of values returned by getAutoscalingGroups.

property names

names: string[];

A list of the Autoscaling Groups in the current region.

interface GetAvailabilityZoneArgs

A collection of arguments for invoking getAvailabilityZone.

property name

name?: pulumi.Input<string>;

The full name of the availability zone to select.

property state

state?: pulumi.Input<string>;

A specific availability zone state to require. May be any of "available", "information" or "impaired".

interface GetAvailabilityZoneResult

A collection of values returned by getAvailabilityZone.

property name

name: string;

The name of the selected availability zone.

property nameSuffix

nameSuffix: string;

The part of the AZ name that appears after the region name, uniquely identifying the AZ within its region.

property region

region: string;

The region where the selected availability zone resides. This is always the region selected on the provider, since this data source searches only within that region.

property state

state: string;

The current state of the AZ.

interface GetAvailabilityZonesArgs

A collection of arguments for invoking getAvailabilityZones.

property state

state?: pulumi.Input<string>;

Allows to filter list of Availability Zones based on their current state. Can be either "available", "information", "impaired" or "unavailable". By default the list includes a complete set of Availability Zones to which the underlying AWS account has access, regardless of their state.

interface GetAvailabilityZonesResult

A collection of values returned by getAvailabilityZones.

property names

names: string[];

A list of the Availability Zone names available to the account.

interface GetBillingServiceAccountResult

A collection of values returned by getBillingServiceAccount.

property arn

arn: string;

The ARN of the AWS billing service account.

interface GetCallerIdentityResult

A collection of values returned by getCallerIdentity.

property accountId

accountId: string;

The AWS Account ID number of the account that owns or contains the calling entity.

property arn

arn: string;

The AWS ARN associated with the calling entity.

property userId

userId: string;

The unique identifier of the calling entity.

interface GetCanonicalUserIdResult

A collection of values returned by getCanonicalUserId.

property displayName

displayName: string;

The human-friendly name linked to the canonical user ID.

interface GetElasticIpArgs

A collection of arguments for invoking getElasticIp.

property id

id?: pulumi.Input<string>;

The allocation id of the specific EIP to retrieve.

property publicIp

publicIp?: pulumi.Input<string>;

The public IP of the specific EIP to retrieve.

interface GetElasticIpResult

A collection of values returned by getElasticIp.

property id

id: string;

property publicIp

publicIp: string;

interface GetIpRangesArgs

A collection of arguments for invoking getIpRanges.

property regions

regions?: pulumi.Input<pulumi.Input<string>[]>;

Filter IP ranges by regions (or include all regions, if omitted). Valid items are global (for cloudfront) as well as all AWS regions (e.g. eu-central-1)

property services

services: pulumi.Input<pulumi.Input<string>[]>;

Filter IP ranges by services. Valid items are amazon (for amazon.com), cloudfront, codebuild, ec2, route53, route53_healthchecks and S3.

interface GetIpRangesResult

A collection of values returned by getIpRanges.

property cidrBlocks

cidrBlocks: string[];

The lexically ordered list of CIDR blocks.

property createDate

createDate: string;

The publication time of the IP ranges (e.g. 2016-08-03-23-46-05).

property syncToken

syncToken: number;

The publication time of the IP ranges, in Unix epoch time format (e.g. 1470267965).

interface GetPartitionResult

A collection of values returned by getPartition.

property partition

partition: string;

interface GetPrefixListArgs

A collection of arguments for invoking getPrefixList.

property name

name?: pulumi.Input<string>;

The name of the prefix list to select.

property prefixListId

prefixListId?: pulumi.Input<string>;

The ID of the prefix list to select.

interface GetPrefixListResult

A collection of values returned by getPrefixList.

property cidrBlocks

cidrBlocks: string[];

The list of CIDR blocks for the AWS service associated with the prefix list.

property name

name: string;

The name of the selected prefix list.

interface GetRegionArgs

A collection of arguments for invoking getRegion.

property current

current?: pulumi.Input<boolean>;

property endpoint

endpoint?: pulumi.Input<string>;

The EC2 endpoint of the region to select.

property name

name?: pulumi.Input<string>;

The full name of the region to select.

interface GetRegionResult

A collection of values returned by getRegion.

property current

current: boolean;

true if the selected region is the one configured on the provider, or false otherwise.

property endpoint

endpoint: string;

The EC2 endpoint for the selected region.

property name

name: string;

The name of the selected region.

let APNortheast1Region

let APNortheast1Region: Region = "ap-northeast-1";

let APNortheast2Region

let APNortheast2Region: Region = "ap-northeast-2";

let APSouth1Region

let APSouth1Region: Region = "ap-south-1";

let APSouthEast2Region

let APSouthEast2Region: Region = "ap-southeast-2";

let APSoutheast1Region

let APSoutheast1Region: Region = "ap-southeast-1";

let CACentralRegion

let CACentralRegion: Region = "ca-central-1";

let EUCentral1Region

let EUCentral1Region: Region = "eu-central-1";

let EUWest1Region

let EUWest1Region: Region = "eu-west-1";

let EUWest2Region

let EUWest2Region: Region = "eu-west-2";

let EUWest3Region

let EUWest3Region: Region = "eu-west-3";

let SAEast1Region

let SAEast1Region: Region = "sa-east-1";

let USEast1Region

let USEast1Region: Region = "us-east-1";

let USEast2Region

let USEast2Region: Region = "us-east-2";

let USWest1Region

let USWest1Region: Region = "us-west-1";

let USWest2Region

let USWest2Region: Region = "us-west-2";

type ARN

type ARN = string;

An ARN is an Amazon Resource Name, and uniquely identifies a region globally across all accounts and regions.

type Region

type Region = ap-northeast-1 | ap-northeast-2 | ap-south-1 | ap-southeast-2 | ap-southeast-1 | ca-central-1 | eu-central-1 | eu-west-1 | eu-west-2 | eu-west-3 | sa-east-1 | us-east-1 | us-east-2 | us-west-1 | us-west-2;

A Region represents any valid Amazon region that may be targeted with deployments.