UNPKG

@pulumi/aws

Version:

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

79 lines (78 loc) 2.36 kB
import * as pulumi from "@pulumi/pulumi"; /** * 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); * ``` */ export declare function getBucketPolicy(args: GetBucketPolicyArgs, opts?: pulumi.InvokeOptions): Promise<GetBucketPolicyResult>; /** * A collection of arguments for invoking getBucketPolicy. */ export interface GetBucketPolicyArgs { /** * Bucket name. */ bucket: string; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: string; } /** * A collection of values returned by getBucketPolicy. */ export interface GetBucketPolicyResult { readonly bucket: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * IAM bucket policy. */ readonly policy: string; readonly region: string; } /** * 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); * ``` */ export declare function getBucketPolicyOutput(args: GetBucketPolicyOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetBucketPolicyResult>; /** * A collection of arguments for invoking getBucketPolicy. */ export interface GetBucketPolicyOutputArgs { /** * Bucket name. */ bucket: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; }