Fork me on GitHub

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 provider.ts region.ts tags.ts utilities.ts utils.ts

Modules

class Provider

The provider type for the aws package

constructor

new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)

Create a Provider resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

function getAmi

getAmi(args?: GetAmiArgs, opts?: pulumi.InvokeOptions): Promise<GetAmiResult>

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

function getAmiIds

getAmiIds(args?: GetAmiIdsArgs, opts?: pulumi.InvokeOptions): Promise<GetAmiIdsResult>

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

function getArn

getArn(args: GetArnArgs, opts?: pulumi.InvokeOptions): Promise<GetArnResult>

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

function getAutoscalingGroups

getAutoscalingGroups(args?: GetAutoscalingGroupsArgs, opts?: pulumi.InvokeOptions): 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, opts?: pulumi.InvokeOptions): 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, opts?: pulumi.InvokeOptions): 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(opts?: pulumi.InvokeOptions): 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(opts?: pulumi.InvokeOptions): 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(opts?: pulumi.InvokeOptions): 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, opts?: pulumi.InvokeOptions): 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 getEnv

getEnv(vars: string[]): string | undefined

function getEnvBoolean

getEnvBoolean(vars: string[]): boolean | undefined

function getEnvNumber

getEnvNumber(vars: string[]): number | undefined

function getIpRanges

getIpRanges(args: GetIpRangesArgs, opts?: pulumi.InvokeOptions): Promise<GetIpRangesResult>

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

function getPartition

getPartition(opts?: pulumi.InvokeOptions): Promise<GetPartitionResult>

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

function getPrefixList

getPrefixList(args?: GetPrefixListArgs, opts?: pulumi.InvokeOptions): 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, opts?: pulumi.InvokeOptions): 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.

function requireWithDefault

requireWithDefault<T>(req: { ... }, def: T | undefined): T

function unwrap

unwrap(val: pulumi.Input<any>): pulumi.Output<any>

interface GetAmiArgs

A collection of arguments for invoking getAmi.

property executableUsers

executableUsers?: string[];

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

property filters

filters?: { ... }[];

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?: boolean;

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

property nameRegex

nameRegex?: 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?: string[];

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

property tags

tags?: { ... };

interface GetAmiIdsArgs

A collection of arguments for invoking getAmiIds.

property executableUsers

executableUsers?: string[];

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

property filters

filters?: { ... }[];

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?: 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?: 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 id

id: string;

id is the provider-assigned unique ID for this managed resource.

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 id

id: string;

id is the provider-assigned unique ID for this managed resource.

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: 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 id

id: string;

id is the provider-assigned unique ID for this managed resource.

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?: { ... }[];

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

interface GetAutoscalingGroupsResult

A collection of values returned by getAutoscalingGroups.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

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?: string;

The full name of the availability zone to select.

property state

state?: 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 id

id: string;

id is the provider-assigned unique ID for this managed resource.

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?: 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 id

id: string;

id is the provider-assigned unique ID for this managed resource.

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.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

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 id

id: string;

id is the provider-assigned unique ID for this managed resource.

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.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

interface GetElasticIpArgs

A collection of arguments for invoking getElasticIp.

property id

id?: string;

The allocation id of the specific EIP to retrieve.

property publicIp

publicIp?: 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?: 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: 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 id

id: string;

id is the provider-assigned unique ID for this managed resource.

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 id

id: string;

id is the provider-assigned unique ID for this managed resource.

property partition

partition: string;

interface GetPrefixListArgs

A collection of arguments for invoking getPrefixList.

property name

name?: string;

The name of the prefix list to select.

property prefixListId

prefixListId?: 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 id

id: string;

id is the provider-assigned unique ID for this managed resource.

property name

name: string;

The name of the selected prefix list.

interface GetRegionArgs

A collection of arguments for invoking getRegion.

property current

current?: boolean;

property endpoint

endpoint?: string;

The EC2 endpoint of the region to select.

property name

name?: 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 description

description: string;

The region’s description in this format: “Location (Region name)”.

property endpoint

endpoint: string;

The EC2 endpoint for the selected region.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property name

name: string;

The name of the selected region.

interface ProviderArgs

The set of arguments for constructing a Provider resource.

property accessKey

accessKey?: pulumi.Input<string>;

The access key for API operations. You can retrieve this from the ‘Security & Credentials’ section of the AWS console.

property allowedAccountIds

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

property assumeRole

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

property endpoints

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

property forbiddenAccountIds

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

property insecure

insecure?: pulumi.Input<boolean>;

Explicitly allow the provider to perform “insecure” SSL requests. If omitted,default value is false

property maxRetries

maxRetries?: pulumi.Input<number>;

The maximum number of times an AWS API request is being executed. If the API request still fails, an error is thrown.

property profile

profile?: pulumi.Input<string>;

The profile for API operations. If not set, the default profile created with aws configure will be used.

property region

region?: pulumi.Input<Region>;

The region where AWS operations will take place. Examples are us-east-1, us-west-2, etc.

property s3ForcePathStyle

s3ForcePathStyle?: pulumi.Input<boolean>;

Set this to true to force the request to use path-style addressing, i.e., http://s3.amazonaws.com/BUCKET/KEY. By default, the S3 client will use virtual hosted bucket addressing when possible (http://BUCKET.s3.amazonaws.com/KEY). Specific to the Amazon S3 service.

property secretKey

secretKey?: pulumi.Input<string>;

The secret key for API operations. You can retrieve this from the ‘Security & Credentials’ section of the AWS console.

property sharedCredentialsFile

sharedCredentialsFile?: pulumi.Input<string>;

The path to the shared credentials file. If not set this defaults to ~/.aws/credentials.

property skipCredentialsValidation

skipCredentialsValidation?: pulumi.Input<boolean>;

Skip the credentials validation via STS API. Used for AWS API implementations that do not have STS available/implemented.

property skipGetEc2Platforms

skipGetEc2Platforms?: pulumi.Input<boolean>;

Skip getting the supported EC2 platforms. Used by users that don’t have ec2:DescribeAccountAttributes permissions.

property skipMetadataApiCheck

skipMetadataApiCheck?: pulumi.Input<boolean>;

property skipRegionValidation

skipRegionValidation?: pulumi.Input<boolean>;

Skip static validation of region name. Used by users of alternative AWS-like APIs or users w/ access to regions that are not public (yet).

property skipRequestingAccountId

skipRequestingAccountId?: pulumi.Input<boolean>;

Skip requesting the account ID. Used for AWS API implementations that do not have IAM/STS API and/or metadata API.

property token

token?: pulumi.Input<string>;

session token. A session token is only required if you are using temporary security credentials.

interface Tags

Tags represents a set of key-value string pairs to which can be applied to an AWS resource.

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 Overwrite

type Overwrite = Pick<T, Diff<keyof T, keyof U>> & U;

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.