@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
58 lines • 1.96 kB
JavaScript
// *** 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.getBucketPolicyOutput = exports.getBucketPolicy = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The bucket policy data source returns IAM policy of an S3 bucket.
*
* ## Example Usage
*
* The following example retrieves IAM policy of a specified S3 bucket.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.s3.getBucketPolicy({
* bucket: "example-bucket-name",
* });
* export const foo = example.then(example => example.policy);
* ```
*/
function getBucketPolicy(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:s3/getBucketPolicy:getBucketPolicy", {
"bucket": args.bucket,
"region": args.region,
}, opts);
}
exports.getBucketPolicy = getBucketPolicy;
/**
* The bucket policy data source returns IAM policy of an S3 bucket.
*
* ## Example Usage
*
* The following example retrieves IAM policy of a specified S3 bucket.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.s3.getBucketPolicy({
* bucket: "example-bucket-name",
* });
* export const foo = example.then(example => example.policy);
* ```
*/
function getBucketPolicyOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:s3/getBucketPolicy:getBucketPolicy", {
"bucket": args.bucket,
"region": args.region,
}, opts);
}
exports.getBucketPolicyOutput = getBucketPolicyOutput;
//# sourceMappingURL=getBucketPolicy.js.map
;