UNPKG

@pulumi/aws

Version:

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

103 lines (102 loc) 4.32 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage S3 Bucket Ownership Controls. For more information, see the [S3 Developer Guide](https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html). * * > This resource cannot be used with S3 directory buckets. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.s3.Bucket("example", {bucket: "example"}); * const exampleBucketOwnershipControls = new aws.s3.BucketOwnershipControls("example", { * bucket: example.id, * rule: { * objectOwnership: "BucketOwnerPreferred", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import S3 Bucket Ownership Controls using S3 Bucket name. For example: * * ```sh * $ pulumi import aws:s3/bucketOwnershipControls:BucketOwnershipControls example my-bucket * ``` */ export declare class BucketOwnershipControls extends pulumi.CustomResource { /** * Get an existing BucketOwnershipControls 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?: BucketOwnershipControlsState, opts?: pulumi.CustomResourceOptions): BucketOwnershipControls; /** * Returns true if the given object is an instance of BucketOwnershipControls. 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 BucketOwnershipControls; /** * Name of the bucket that you want to associate this access point with. */ readonly bucket: 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>; /** * Configuration block(s) with Ownership Controls rules. Detailed below. */ readonly rule: pulumi.Output<outputs.s3.BucketOwnershipControlsRule>; /** * Create a BucketOwnershipControls 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: BucketOwnershipControlsArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering BucketOwnershipControls resources. */ export interface BucketOwnershipControlsState { /** * Name of the bucket that you want to associate this access point with. */ 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>; /** * Configuration block(s) with Ownership Controls rules. Detailed below. */ rule?: pulumi.Input<inputs.s3.BucketOwnershipControlsRule>; } /** * The set of arguments for constructing a BucketOwnershipControls resource. */ export interface BucketOwnershipControlsArgs { /** * Name of the bucket that you want to associate this access point with. */ 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>; /** * Configuration block(s) with Ownership Controls rules. Detailed below. */ rule: pulumi.Input<inputs.s3.BucketOwnershipControlsRule>; }