@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
83 lines (82 loc) • 2.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this data source to lookup information about the current AWS partition in
* which the provider is working.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const current = aws.getPartition({});
* const s3Policy = current.then(current => aws.iam.getPolicyDocument({
* statements: [{
* sid: "1",
* actions: ["s3:ListBucket"],
* resources: [`arn:${current.partition}:s3:::my-bucket`],
* }],
* }));
* ```
*/
export declare function getPartition(args?: GetPartitionArgs, opts?: pulumi.InvokeOptions): Promise<GetPartitionResult>;
/**
* A collection of arguments for invoking getPartition.
*/
export interface GetPartitionArgs {
/**
* Identifier of the current partition (e.g., `aws` in AWS Commercial, `aws-cn` in AWS China).
*/
id?: string;
}
/**
* A collection of values returned by getPartition.
*/
export interface GetPartitionResult {
/**
* Base DNS domain name for the current partition (e.g., `amazonaws.com` in AWS Commercial, `amazonaws.com.cn` in AWS China).
*/
readonly dnsSuffix: string;
/**
* Identifier of the current partition (e.g., `aws` in AWS Commercial, `aws-cn` in AWS China).
*/
readonly id: string;
/**
* Identifier of the current partition (e.g., `aws` in AWS Commercial, `aws-cn` in AWS China).
*/
readonly partition: string;
/**
* Prefix of service names (e.g., `com.amazonaws` in AWS Commercial, `cn.com.amazonaws` in AWS China).
*/
readonly reverseDnsPrefix: string;
}
/**
* Use this data source to lookup information about the current AWS partition in
* which the provider is working.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const current = aws.getPartition({});
* const s3Policy = current.then(current => aws.iam.getPolicyDocument({
* statements: [{
* sid: "1",
* actions: ["s3:ListBucket"],
* resources: [`arn:${current.partition}:s3:::my-bucket`],
* }],
* }));
* ```
*/
export declare function getPartitionOutput(args?: GetPartitionOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetPartitionResult>;
/**
* A collection of arguments for invoking getPartition.
*/
export interface GetPartitionOutputArgs {
/**
* Identifier of the current partition (e.g., `aws` in AWS Commercial, `aws-cn` in AWS China).
*/
id?: pulumi.Input<string>;
}