import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * The `scaleway.ObjectBucket` resource allows you to create and manage buckets for [Scaleway Object storage](https://www.scaleway.com/en/docs/storage/object/). * * Refer to the [dedicated documentation](https://www.scaleway.com/en/docs/storage/object/how-to/create-a-bucket/) for more information on Object Storage buckets. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const someBucket = new scaleway.ObjectBucket("someBucket", {tags: { * key: "value", * }}); * ``` * * ### Creating the bucket in a specific project * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const someBucket = new scaleway.ObjectBucket("someBucket", {projectId: "11111111-1111-1111-1111-111111111111"}); * ``` * * ### Using object lifecycle * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const main = new scaleway.ObjectBucket("main", { * lifecycleRules: [ * { * enabled: true, * expiration: { * days: 365, * }, * id: "id1", * prefix: "path1/", * transitions: [{ * days: 120, * storageClass: "GLACIER", * }], * }, * { * enabled: true, * expiration: { * days: 50, * }, * id: "id2", * prefix: "path2/", * }, * { * enabled: false, * expiration: { * days: 1, * }, * id: "id3", * prefix: "path3/", * tags: { * tagKey: "tagValue", * terraform: "hashicorp", * }, * }, * { * enabled: true, * id: "id4", * tags: { * tag1: "value1", * }, * transitions: [{ * days: 1, * storageClass: "GLACIER", * }], * }, * { * abortIncompleteMultipartUploadDays: 30, * enabled: true, * }, * ], * region: "fr-par", * }); * ``` * * ## Import * * Buckets can be imported using the `{region}/{bucketName}` identifier, as shown below: * * bash * * ```sh * $ pulumi import scaleway:index/objectBucket:ObjectBucket some_bucket fr-par/some-bucket * ``` * * ~> **Important:** The `project_id` attribute has a particular behavior with s3 products because the s3 API is scoped by project. * * If you are using a project different from the default one, you have to specify the project ID at the end of the import command. * * bash * * ```sh * $ pulumi import scaleway:index/objectBucket:ObjectBucket some_bucket fr-par/some-bucket@11111111-1111-1111-1111-111111111111 * ``` */ export declare class ObjectBucket extends pulumi.CustomResource { /** * Get an existing ObjectBucket 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, state?: ObjectBucketState, opts?: pulumi.CustomResourceOptions): ObjectBucket; /** * Returns true if the given object is an instance of ObjectBucket. 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 ObjectBucket; /** * (Deprecated) The canned ACL you want to apply to the bucket. * * > **Note:** The `acl` attribute is deprecated. See scaleway.ObjectBucketAcl resource documentation. Refer to the [official canned ACL documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) for more information on the different roles. * * @deprecated ACL attribute is deprecated. Please use the resource scaleway.ObjectBucketAcl instead. */ readonly acl: pulumi.Output; /** * API URL of the bucket */ readonly apiEndpoint: pulumi.Output; readonly corsRules: pulumi.Output; /** * The endpoint URL of the bucket. */ readonly endpoint: pulumi.Output; /** * Whether to allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has object lock enabled. */ readonly forceDestroy: pulumi.Output; /** * Lifecycle configuration is a set of rules that define actions that Scaleway Object Storage applies to a group of objects */ readonly lifecycleRules: pulumi.Output; /** * The name of the bucket. */ readonly name: pulumi.Output; /** * Enable object lock */ readonly objectLockEnabled: pulumi.Output; /** * `projectId`) The ID of the project the bucket is associated with. */ readonly projectId: pulumi.Output; /** * The [region](https://www.scaleway.com/en/developers/api/#region-definition) in which the bucket will be created. */ readonly region: pulumi.Output; /** * A list of tags (key/value) for the bucket. * * * > **Important:** The Scaleway console does not support `key/value` tags yet, so only the tags' values will be displayed. * If you make any change to your bucket's tags using the console, it will overwrite them with the format `value/value`. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Allow multiple versions of an object in the same bucket */ readonly versioning: pulumi.Output; /** * Create a ObjectBucket 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?: ObjectBucketArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ObjectBucket resources. */ export interface ObjectBucketState { /** * (Deprecated) The canned ACL you want to apply to the bucket. * * > **Note:** The `acl` attribute is deprecated. See scaleway.ObjectBucketAcl resource documentation. Refer to the [official canned ACL documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) for more information on the different roles. * * @deprecated ACL attribute is deprecated. Please use the resource scaleway.ObjectBucketAcl instead. */ acl?: pulumi.Input; /** * API URL of the bucket */ apiEndpoint?: pulumi.Input; corsRules?: pulumi.Input[]>; /** * The endpoint URL of the bucket. */ endpoint?: pulumi.Input; /** * Whether to allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has object lock enabled. */ forceDestroy?: pulumi.Input; /** * Lifecycle configuration is a set of rules that define actions that Scaleway Object Storage applies to a group of objects */ lifecycleRules?: pulumi.Input[]>; /** * The name of the bucket. */ name?: pulumi.Input; /** * Enable object lock */ objectLockEnabled?: pulumi.Input; /** * `projectId`) The ID of the project the bucket is associated with. */ projectId?: pulumi.Input; /** * The [region](https://www.scaleway.com/en/developers/api/#region-definition) in which the bucket will be created. */ region?: pulumi.Input; /** * A list of tags (key/value) for the bucket. * * * > **Important:** The Scaleway console does not support `key/value` tags yet, so only the tags' values will be displayed. * If you make any change to your bucket's tags using the console, it will overwrite them with the format `value/value`. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Allow multiple versions of an object in the same bucket */ versioning?: pulumi.Input; } /** * The set of arguments for constructing a ObjectBucket resource. */ export interface ObjectBucketArgs { /** * (Deprecated) The canned ACL you want to apply to the bucket. * * > **Note:** The `acl` attribute is deprecated. See scaleway.ObjectBucketAcl resource documentation. Refer to the [official canned ACL documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl_overview.html#canned-acl) for more information on the different roles. * * @deprecated ACL attribute is deprecated. Please use the resource scaleway.ObjectBucketAcl instead. */ acl?: pulumi.Input; corsRules?: pulumi.Input[]>; /** * Whether to allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has object lock enabled. */ forceDestroy?: pulumi.Input; /** * Lifecycle configuration is a set of rules that define actions that Scaleway Object Storage applies to a group of objects */ lifecycleRules?: pulumi.Input[]>; /** * The name of the bucket. */ name?: pulumi.Input; /** * Enable object lock */ objectLockEnabled?: pulumi.Input; /** * `projectId`) The ID of the project the bucket is associated with. */ projectId?: pulumi.Input; /** * The [region](https://www.scaleway.com/en/developers/api/#region-definition) in which the bucket will be created. */ region?: pulumi.Input; /** * A list of tags (key/value) for the bucket. * * * > **Important:** The Scaleway console does not support `key/value` tags yet, so only the tags' values will be displayed. * If you make any change to your bucket's tags using the console, it will overwrite them with the format `value/value`. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Allow multiple versions of an object in the same bucket */ versioning?: pulumi.Input; }