UNPKG

@pulumi/aws

Version:

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

143 lines (142 loc) 6.37 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage an S3 Multi-Region Access Point access control policy. * * ## Example Usage * * ### Basic Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as std from "@pulumi/std"; * * const current = aws.getCallerIdentity({}); * const currentGetPartition = aws.getPartition({}); * const fooBucket = new aws.s3.Bucket("foo_bucket", {bucket: "example-bucket-foo"}); * const example = new aws.s3control.MultiRegionAccessPoint("example", {details: { * name: "example", * regions: [{ * bucket: fooBucket.id, * }], * }}); * const exampleMultiRegionAccessPointPolicy = new aws.s3control.MultiRegionAccessPointPolicy("example", {details: { * name: std.splitOutput({ * separator: ":", * text: example.id, * }).apply(invoke => invoke.result)[1], * policy: pulumi.jsonStringify({ * Version: "2012-10-17", * Statement: [{ * Sid: "Example", * Effect: "Allow", * Principal: { * AWS: current.then(current => current.accountId), * }, * Action: [ * "s3:GetObject", * "s3:PutObject", * ], * Resource: pulumi.all([currentGetPartition, current, example.alias]).apply(([currentGetPartition, current, alias]) => `arn:${currentGetPartition.partition}:s3::${current.accountId}:accesspoint/${alias}/object/*`), * }], * }), * }}); * ``` * * ## Import * * Using `pulumi import`, import Multi-Region Access Point Policies using the `account_id` and `name` of the Multi-Region Access Point separated by a colon (`:`). For example: * * ```sh * $ pulumi import aws:s3control/multiRegionAccessPointPolicy:MultiRegionAccessPointPolicy example 123456789012:example * ``` */ export declare class MultiRegionAccessPointPolicy extends pulumi.CustomResource { /** * Get an existing MultiRegionAccessPointPolicy 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?: MultiRegionAccessPointPolicyState, opts?: pulumi.CustomResourceOptions): MultiRegionAccessPointPolicy; /** * Returns true if the given object is an instance of MultiRegionAccessPointPolicy. 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 MultiRegionAccessPointPolicy; /** * The AWS account ID for the owner of the Multi-Region Access Point. Defaults to automatically determined account ID of the AWS provider. */ readonly accountId: pulumi.Output<string>; /** * A configuration block containing details about the policy for the Multi-Region Access Point. See Details Configuration Block below for more details */ readonly details: pulumi.Output<outputs.s3control.MultiRegionAccessPointPolicyDetails>; /** * The last established policy for the Multi-Region Access Point. */ readonly established: pulumi.Output<string>; /** * The proposed policy for the Multi-Region Access Point. */ readonly proposed: 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 MultiRegionAccessPointPolicy 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: MultiRegionAccessPointPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MultiRegionAccessPointPolicy resources. */ export interface MultiRegionAccessPointPolicyState { /** * The AWS account ID for the owner of the Multi-Region Access Point. Defaults to automatically determined account ID of the AWS provider. */ accountId?: pulumi.Input<string>; /** * A configuration block containing details about the policy for the Multi-Region Access Point. See Details Configuration Block below for more details */ details?: pulumi.Input<inputs.s3control.MultiRegionAccessPointPolicyDetails>; /** * The last established policy for the Multi-Region Access Point. */ established?: pulumi.Input<string>; /** * The proposed policy for the Multi-Region Access Point. */ proposed?: 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 MultiRegionAccessPointPolicy resource. */ export interface MultiRegionAccessPointPolicyArgs { /** * The AWS account ID for the owner of the Multi-Region Access Point. Defaults to automatically determined account ID of the AWS provider. */ accountId?: pulumi.Input<string>; /** * A configuration block containing details about the policy for the Multi-Region Access Point. See Details Configuration Block below for more details */ details: pulumi.Input<inputs.s3control.MultiRegionAccessPointPolicyDetails>; /** * 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>; }