UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

233 lines (232 loc) 7.64 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage tos bucket * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * // create tos bucket * const fooBucket = new volcengine.tos.Bucket("fooBucket", { * bucketName: "tf-acc-test-bucket", * publicAcl: "private", * azRedundancy: "multi-az", * enableVersion: true, * bucketAclDelivered: true, * accountAcls: [ * { * accountId: "1", * permission: "READ", * }, * { * accountId: "2001", * permission: "WRITE_ACP", * }, * ], * projectName: "default", * tags: [{ * key: "k1", * value: "v1", * }], * }); * // create tos bucket policy * const fooBucketPolicy = new volcengine.tos.BucketPolicy("fooBucketPolicy", { * bucketName: fooBucket.id, * policy: pulumi.jsonStringify({ * Statement: [{ * Sid: "test", * Effect: "Allow", * Principal: ["AccountId/subUserName"], * Action: ["tos:List*"], * Resource: [pulumi.interpolate`trn:tos:::${fooBucket.id}`], * }], * }), * }); * ``` * * ## Import * * Tos Bucket can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:tos/bucket:Bucket default bucketName * ``` */ export declare class Bucket extends pulumi.CustomResource { /** * Get an existing Bucket 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?: BucketState, opts?: pulumi.CustomResourceOptions): Bucket; /** * Returns true if the given object is an instance of Bucket. 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 Bucket; /** * The user set of grant full control. */ readonly accountAcls: pulumi.Output<outputs.tos.BucketAccountAcl[] | undefined>; /** * The AZ redundancy of the Tos Bucket. Default is `single-az`. Valid values: `single-az`, `multi-az`. */ readonly azRedundancy: pulumi.Output<string | undefined>; /** * Whether to enable the default inheritance bucket ACL function for objects. Default is false. */ readonly bucketAclDelivered: pulumi.Output<boolean>; /** * The name of the bucket. */ readonly bucketName: pulumi.Output<string>; /** * The create date of the TOS bucket. */ readonly creationDate: pulumi.Output<string>; /** * The flag of enable tos version. */ readonly enableVersion: pulumi.Output<boolean | undefined>; /** * The extranet endpoint of the TOS bucket. */ readonly extranetEndpoint: pulumi.Output<string>; /** * The intranet endpoint the TOS bucket. */ readonly intranetEndpoint: pulumi.Output<string>; /** * The location of the TOS bucket. */ readonly location: pulumi.Output<string>; /** * The ProjectName of the Tos Bucket. Default is `default`. */ readonly projectName: pulumi.Output<string | undefined>; /** * The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read. */ readonly publicAcl: pulumi.Output<string | undefined>; /** * The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD. */ readonly storageClass: pulumi.Output<string | undefined>; /** * Tos Bucket Tags. */ readonly tags: pulumi.Output<outputs.tos.BucketTag[] | undefined>; /** * Create a Bucket 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: BucketArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Bucket resources. */ export interface BucketState { /** * The user set of grant full control. */ accountAcls?: pulumi.Input<pulumi.Input<inputs.tos.BucketAccountAcl>[]>; /** * The AZ redundancy of the Tos Bucket. Default is `single-az`. Valid values: `single-az`, `multi-az`. */ azRedundancy?: pulumi.Input<string>; /** * Whether to enable the default inheritance bucket ACL function for objects. Default is false. */ bucketAclDelivered?: pulumi.Input<boolean>; /** * The name of the bucket. */ bucketName?: pulumi.Input<string>; /** * The create date of the TOS bucket. */ creationDate?: pulumi.Input<string>; /** * The flag of enable tos version. */ enableVersion?: pulumi.Input<boolean>; /** * The extranet endpoint of the TOS bucket. */ extranetEndpoint?: pulumi.Input<string>; /** * The intranet endpoint the TOS bucket. */ intranetEndpoint?: pulumi.Input<string>; /** * The location of the TOS bucket. */ location?: pulumi.Input<string>; /** * The ProjectName of the Tos Bucket. Default is `default`. */ projectName?: pulumi.Input<string>; /** * The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read. */ publicAcl?: pulumi.Input<string>; /** * The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD. */ storageClass?: pulumi.Input<string>; /** * Tos Bucket Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.tos.BucketTag>[]>; } /** * The set of arguments for constructing a Bucket resource. */ export interface BucketArgs { /** * The user set of grant full control. */ accountAcls?: pulumi.Input<pulumi.Input<inputs.tos.BucketAccountAcl>[]>; /** * The AZ redundancy of the Tos Bucket. Default is `single-az`. Valid values: `single-az`, `multi-az`. */ azRedundancy?: pulumi.Input<string>; /** * Whether to enable the default inheritance bucket ACL function for objects. Default is false. */ bucketAclDelivered?: pulumi.Input<boolean>; /** * The name of the bucket. */ bucketName: pulumi.Input<string>; /** * The flag of enable tos version. */ enableVersion?: pulumi.Input<boolean>; /** * The ProjectName of the Tos Bucket. Default is `default`. */ projectName?: pulumi.Input<string>; /** * The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read. */ publicAcl?: pulumi.Input<string>; /** * The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD. */ storageClass?: pulumi.Input<string>; /** * Tos Bucket Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.tos.BucketTag>[]>; }