UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

64 lines 2.09 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getPartitionOutput = exports.getPartition = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * 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`], * }], * })); * ``` */ function getPartition(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:index/getPartition:getPartition", { "id": args.id, }, opts); } exports.getPartition = getPartition; /** * 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`], * }], * })); * ``` */ function getPartitionOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:index/getPartition:getPartition", { "id": args.id, }, opts); } exports.getPartitionOutput = getPartitionOutput; //# sourceMappingURL=getPartition.js.map