Package @pulumi/alicloud

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-alicloud repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-alicloud repo.

var alicloud = require("@pulumi/alicloud");
import * as alicloud from "@pulumi/alicloud";

Modules

Resources

Functions

Others

Resources

Resource Provider

class Provider extends ProviderResource

The provider type for the alicloud package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

This content is derived from https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/website/docs/index.html.markdown.

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

public static isInstance(obj: any): obj is Provider

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

method register

static register(provider: ProviderResource | undefined): Promise<string | undefined>

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.

Functions

Function getAccount

getAccount(opts?: pulumi.InvokeOptions): Promise<GetAccountResult>

This data source provides information about the current account.

Example Usage

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

const current = pulumi.output(alicloud.getAccount({ async: true }));

export const currentAccountId = current.id;

This content is derived from https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/website/docs/d/account.html.markdown.

Function getCallerIdentity

getCallerIdentity(opts?: pulumi.InvokeOptions): Promise<GetCallerIdentityResult>

This data source provides the identity of the current user.

NOTE: Available in 1.65.0+.

Example Usage

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

const current = pulumi.output(alicloud.getCallerIdentity({ async: true }));

export const currentUserArn = current.id;

This content is derived from https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/website/docs/d/caller_identity.markdown.

Function getFileCrc64Checksum

getFileCrc64Checksum(args: GetFileCrc64ChecksumArgs, opts?: pulumi.InvokeOptions): Promise<GetFileCrc64ChecksumResult>

This data source compute file crc64 checksum.

NOTE: Available in 1.59.0+.

Example Usage

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

const defaultFileCrc64Checksum = pulumi.output(alicloud.getFileCrc64Checksum({
    filename: "exampleFileName",
}, { async: true }));

export const fileCrc64Checksum = alicloud_file_crc64_checksum_defualt.checksum;

This content is derived from https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/website/docs/d/file_crc64_checksum.html.markdown.

Function getRegions

getRegions(args?: GetRegionsArgs, opts?: pulumi.InvokeOptions): Promise<GetRegionsResult>

This data source provides Alibaba Cloud regions.

Example Usage

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

const currentRegionDs = pulumi.output(alicloud.getRegions({
    current: true,
}, { async: true }));

export const currentRegionId = currentRegionDs.regions[0].id;

This content is derived from https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/website/docs/d/regions.html.markdown.

Function getZones

getZones(args?: GetZonesArgs, opts?: pulumi.InvokeOptions): Promise<GetZonesResult>

This data source provides availability zones that can be accessed by an Alibaba Cloud account within the region configured in the provider.

NOTE: If one zone is sold out, it will not be exported.

Example Usage

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

// Declare the data source
const zonesDs = pulumi.output(alicloud.getZones({
    availableDiskCategory: "cloudSsd",
    availableInstanceType: "ecs.n4.large",
}, { async: true }));
// Create an ECS instance with the first matched zone
const instance = new alicloud.ecs.Instance("instance", {
    availabilityZone: zonesDs.zones[0].id,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-alicloud/blob/master/website/docs/d/zones.html.markdown.

Others

interface GetAccountResult

interface GetAccountResult

A collection of values returned by getAccount.

property id

id: string;

Account ID (e.g. “1239306421830812”). It can be used to construct an ARN.

interface GetCallerIdentityResult

interface GetCallerIdentityResult

A collection of values returned by getCallerIdentity.

property accountId

accountId: string;

Account ID.

property arn

arn: string;

The Alibaba Cloud Resource Name (ARN) of the user making the call.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property identityType

identityType: string;

The type of the princiapal. RAMUser for users.

function getEnv

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

function getEnvBoolean

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

function getEnvNumber

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

interface GetFileCrc64ChecksumArgs

interface GetFileCrc64ChecksumArgs

A collection of arguments for invoking getFileCrc64Checksum.

property filename

filename: string;

The name of the file to be computed crc64 checksum.

property outputFile

outputFile?: undefined | string;

interface GetFileCrc64ChecksumResult

interface GetFileCrc64ChecksumResult

A collection of values returned by getFileCrc64Checksum.

property checksum

checksum: string;

the file checksum of crc64.

property filename

filename: string;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property outputFile

outputFile?: undefined | string;

interface GetRegionsArgs

interface GetRegionsArgs

A collection of arguments for invoking getRegions.

property current

current?: undefined | false | true;

Set to true to match only the region configured in the provider.

property name

name?: undefined | string;

The name of the region to select, such as eu-central-1.

property outputFile

outputFile?: undefined | string;

interface GetRegionsResult

interface GetRegionsResult

A collection of values returned by getRegions.

property current

current: boolean;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of region IDs.

property name

name: string;

property outputFile

outputFile?: undefined | string;

property regions

regions: GetRegionsRegion[];

A list of regions. Each element contains the following attributes:

function getVersion

getVersion(): string

interface GetZonesArgs

interface GetZonesArgs

A collection of arguments for invoking getZones.

property availableDiskCategory

availableDiskCategory?: undefined | string;

Filter the results by a specific disk category. Can be either cloud, cloudEfficiency, cloudSsd, ephemeralSsd.

property availableInstanceType

availableInstanceType?: undefined | string;

Filter the results by a specific instance type.

property availableResourceCreation

availableResourceCreation?: undefined | string;

Filter the results by a specific resource type. Valid values: Instance, Disk, VSwitch, Rds, KVStore, FunctionCompute, Elasticsearch, Slb.

property availableSlbAddressIpVersion

availableSlbAddressIpVersion?: undefined | string;

Filter the results by a slb instance address version. Can be either ipv4, or ipv6. > NOTE: The disk category cloud has been outdated and can only be used by non-I/O Optimized ECS instances. Many availability zones don’t support it. It is recommended to use cloudEfficiency or cloudSsd.

property availableSlbAddressType

availableSlbAddressType?: undefined | string;

Filter the results by a slb instance address type. Can be either Vpc, classicInternet or classicIntranet

property enableDetails

enableDetails?: undefined | false | true;

Default to false and only output id in the zones block. Set it to true can output more details.

property instanceChargeType

instanceChargeType?: undefined | string;

Filter the results by a specific ECS instance charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.

property multi

multi?: undefined | false | true;

Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch RDS instances.

property networkType

networkType?: undefined | string;

Filter the results by a specific network type. Valid values: Classic and Vpc.

property outputFile

outputFile?: undefined | string;

property spotStrategy

spotStrategy?: undefined | string;
  • (Optional) Filter the results by a specific ECS spot type. Valid values: NoSpot, SpotWithPriceLimit and SpotAsPriceGo. Default to NoSpot.

interface GetZonesResult

interface GetZonesResult

A collection of values returned by getZones.

property availableDiskCategory

availableDiskCategory?: undefined | string;

property availableInstanceType

availableInstanceType?: undefined | string;

property availableResourceCreation

availableResourceCreation?: undefined | string;

Type of resources that can be created.

property availableSlbAddressIpVersion

availableSlbAddressIpVersion?: undefined | string;

property availableSlbAddressType

availableSlbAddressType?: undefined | string;

property enableDetails

enableDetails?: undefined | false | true;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of zone IDs.

property instanceChargeType

instanceChargeType?: undefined | string;

property multi

multi?: undefined | false | true;

property networkType

networkType?: undefined | string;

property outputFile

outputFile?: undefined | string;

property spotStrategy

spotStrategy?: undefined | string;

property zones

zones: GetZonesZone[];

A list of availability zones. Each element contains the following attributes:

interface ProviderArgs

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 Management’ section of the Alibaba Cloud console.

property accountId

accountId?: pulumi.Input<string>;

The account ID for some service API operations. You can retrieve this from the ‘Security Settings’ section of the Alibaba Cloud console.

property assumeRole

assumeRole?: pulumi.Input<ProviderAssumeRole>;

property configurationSource

configurationSource?: pulumi.Input<string>;

Use this to mark a terraform configuration file source.

property ecsRoleName

ecsRoleName?: pulumi.Input<string>;

The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the ‘Access Control’ section of the Alibaba Cloud console.

property endpoints

endpoints?: pulumi.Input<pulumi.Input<ProviderEndpoint>[]>;

property fc

fc?: pulumi.Input<string>;

property logEndpoint

logEndpoint?: pulumi.Input<string>;

property mnsEndpoint

mnsEndpoint?: pulumi.Input<string>;

property otsInstanceName

otsInstanceName?: pulumi.Input<string>;

property profile

profile?: pulumi.Input<string>;

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

property protocol

protocol?: pulumi.Input<string>;

property region

region?: pulumi.Input<string>;

The region where Alibaba Cloud operations will take place. Examples are cn-beijing, cn-hangzhou, eu-central-1, etc.

property secretKey

secretKey?: pulumi.Input<string>;

The secret key for API operations. You can retrieve this from the ‘Security Management’ section of the Alibaba Cloud console.

property securityToken

securityToken?: pulumi.Input<string>;

security token. A security token is only required if you are using Security Token Service.

property sharedCredentialsFile

sharedCredentialsFile?: pulumi.Input<string>;

The path to the shared credentials file. If not set this defaults to ~/.aliyun/config.json

property skipRegionValidation

skipRegionValidation?: pulumi.Input<boolean>;

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