UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

94 lines (93 loc) 3.55 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a resource to manage tos bucket policy * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const _default = new volcengine.tos.BucketPolicy("default", { * bucketName: "tf-acc-test-bucket", * policy: JSON.stringify({ * Statement: [{ * Sid: "test", * Effect: "Allow", * Principal: ["AccountId/subUserName"], * Action: ["tos:List*"], * Resource: ["trn:tos:::tf-acc-test-bucket"], * }], * }), * }); * ``` * * ## Import * * Tos Bucket can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:tos/bucketPolicy:BucketPolicy default bucketName:policy * ``` */ export declare class BucketPolicy extends pulumi.CustomResource { /** * Get an existing BucketPolicy 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?: BucketPolicyState, opts?: pulumi.CustomResourceOptions): BucketPolicy; /** * Returns true if the given object is an instance of BucketPolicy. 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 BucketPolicy; /** * The name of the bucket. */ readonly bucketName: pulumi.Output<string>; /** * The policy document. This is a JSON formatted string. For more information about building Volcengine IAM policy * documents with Terraform, see the [Volcengine IAM Policy Document Guide](https://www.volcengine.com/docs/6349/102127). */ readonly policy: pulumi.Output<string>; /** * Create a BucketPolicy 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: BucketPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering BucketPolicy resources. */ export interface BucketPolicyState { /** * The name of the bucket. */ bucketName?: pulumi.Input<string>; /** * The policy document. This is a JSON formatted string. For more information about building Volcengine IAM policy * documents with Terraform, see the [Volcengine IAM Policy Document Guide](https://www.volcengine.com/docs/6349/102127). */ policy?: pulumi.Input<string>; } /** * The set of arguments for constructing a BucketPolicy resource. */ export interface BucketPolicyArgs { /** * The name of the bucket. */ bucketName: pulumi.Input<string>; /** * The policy document. This is a JSON formatted string. For more information about building Volcengine IAM policy * documents with Terraform, see the [Volcengine IAM Policy Document Guide](https://www.volcengine.com/docs/6349/102127). */ policy: pulumi.Input<string>; }