UNPKG

@pulumi/aws

Version:

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

103 lines (102 loc) 4.24 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a resource to manage an S3 Access Grants instance resource policy. * Use a resource policy to manage cross-account access to your S3 Access Grants instance. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.s3control.AccessGrantsInstance("example", {}); * const exampleAccessGrantsInstanceResourcePolicy = new aws.s3control.AccessGrantsInstanceResourcePolicy("example", {policy: pulumi.interpolate`{ * \"Version\": \"2012-10-17\", * \"Id\": \"S3AccessGrantsPolicy\", * \"Statement\": [{ * \"Sid\": \"AllowAccessToS3AccessGrants\", * \"Effect\": \"Allow\", * \"Principal\": { * \"AWS\": \"123456789456\" * }, * \"Action\": [ * \"s3:ListAccessGrants\", * \"s3:ListAccessGrantsLocations\", * \"s3:GetDataAccess\" * ], * \"Resource\": \"${example.accessGrantsInstanceArn}\" * }] * } * `}); * ``` * * ## Import * * Using `pulumi import`, import S3 Access Grants instance resource policies using the `account_id`. For example: * * ```sh * $ pulumi import aws:s3control/accessGrantsInstanceResourcePolicy:AccessGrantsInstanceResourcePolicy example 123456789012 * ``` */ export declare class AccessGrantsInstanceResourcePolicy extends pulumi.CustomResource { /** * Get an existing AccessGrantsInstanceResourcePolicy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AccessGrantsInstanceResourcePolicyState, opts?: pulumi.CustomResourceOptions): AccessGrantsInstanceResourcePolicy; /** * Returns true if the given object is an instance of AccessGrantsInstanceResourcePolicy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AccessGrantsInstanceResourcePolicy; readonly accountId: pulumi.Output<string>; /** * The policy document. */ readonly policy: pulumi.Output<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. */ readonly region: pulumi.Output<string>; /** * Create a AccessGrantsInstanceResourcePolicy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AccessGrantsInstanceResourcePolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AccessGrantsInstanceResourcePolicy resources. */ export interface AccessGrantsInstanceResourcePolicyState { accountId?: pulumi.Input<string>; /** * The policy document. */ policy?: 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>; } /** * The set of arguments for constructing a AccessGrantsInstanceResourcePolicy resource. */ export interface AccessGrantsInstanceResourcePolicyArgs { accountId?: pulumi.Input<string>; /** * The policy document. */ policy: 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>; }