UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

276 lines 11.5 kB
import * as pulumi from "@pulumi/pulumi"; /** * The `scaleway.object.Item` resource allows you to create and manage objects for [Scaleway Object storage](https://www.scaleway.com/en/docs/object-storage/). * * Refer to the [dedicated documentation](https://www.scaleway.com/en/docs/object-storage/how-to/upload-files-into-a-bucket/) for more information on Object Storage objects. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * import * as std from "@pulumi/std"; * * const someBucket = new scaleway.object.Bucket("some_bucket", {name: "some-unique-name"}); * const someFile = new scaleway.object.Item("some_file", { * bucket: someBucket.id, * key: "object_path", * file: "myfile", * hash: std.filemd5({ * input: "myfile", * }).result, * }); * ``` * * ## Import * * Objects can be imported using the `{region}/{bucketName}/{objectKey}` identifier, as shown below: * * ```sh * $ pulumi import scaleway:index/objectItem:ObjectItem some_object fr-par/some-bucket/some-file * ``` * * > **Important:** The `projectId` 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. * * ```sh * $ pulumi import scaleway:index/objectItem:ObjectItem some_object fr-par/some-bucket/some-file@xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx * ``` * * @deprecated scaleway.index/objectitem.ObjectItem has been deprecated in favor of scaleway.object/item.Item */ export declare class ObjectItem extends pulumi.CustomResource { /** * Get an existing ObjectItem 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?: ObjectItemState, opts?: pulumi.CustomResourceOptions): ObjectItem; /** * Returns true if the given object is an instance of ObjectItem. 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 ObjectItem; /** * The name of the bucket, or its Terraform ID. */ readonly bucket: pulumi.Output<string>; /** * The content of the file to upload. Only one of `file`, `content` or `contentBase64` can be defined. */ readonly content: pulumi.Output<string | undefined>; /** * The base64-encoded content of the file to upload. Only one of `file`, `content` or `contentBase64` can be defined. * * > **Note:** Only one of `file`, `content` or `contentBase64` can be defined. */ readonly contentBase64: pulumi.Output<string | undefined>; /** * The standard MIME type of the object's content (e.g., 'application/json', 'text/plain'). This specifies how the object should be interpreted by clients. See RFC 9110: <https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type> */ readonly contentType: pulumi.Output<string>; /** * The name of the file to upload, defaults to an empty file. */ readonly file: pulumi.Output<string | undefined>; /** * Hash of the file, used to trigger the upload on file change. */ readonly hash: pulumi.Output<string | undefined>; /** * The path to the object. */ readonly key: pulumi.Output<string>; /** * Map of metadata used for the object (keys must be lowercase). */ readonly metadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * `projectId`) The ID of the project the bucket is associated with. * * > **Important:** The `projectId` 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 `projectId` for every child resource of the bucket, * like objects. Otherwise, Terraform will try to create the child resource with the default project ID and you will get a 403 error. */ readonly projectId: pulumi.Output<string>; /** * The Scaleway region the bucket resides in. */ readonly region: pulumi.Output<string | undefined>; /** * Customer's encryption keys to encrypt data (SSE-C) */ readonly sseCustomerKey: pulumi.Output<string | undefined>; /** * Specifies the Scaleway [storage class](https://www.scaleway.com/en/docs/object-storage/concepts/#storage-class) (`STANDARD`, `GLACIER`, or `ONEZONE_IA`) used to store the object. */ readonly storageClass: pulumi.Output<string | undefined>; /** * Map of tags. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Visibility of the object, `public-read` or `private`. */ readonly visibility: pulumi.Output<string>; /** * Create a ObjectItem 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. */ /** @deprecated scaleway.index/objectitem.ObjectItem has been deprecated in favor of scaleway.object/item.Item */ constructor(name: string, args: ObjectItemArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ObjectItem resources. */ export interface ObjectItemState { /** * The name of the bucket, or its Terraform ID. */ bucket?: pulumi.Input<string | undefined>; /** * The content of the file to upload. Only one of `file`, `content` or `contentBase64` can be defined. */ content?: pulumi.Input<string | undefined>; /** * The base64-encoded content of the file to upload. Only one of `file`, `content` or `contentBase64` can be defined. * * > **Note:** Only one of `file`, `content` or `contentBase64` can be defined. */ contentBase64?: pulumi.Input<string | undefined>; /** * The standard MIME type of the object's content (e.g., 'application/json', 'text/plain'). This specifies how the object should be interpreted by clients. See RFC 9110: <https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type> */ contentType?: pulumi.Input<string | undefined>; /** * The name of the file to upload, defaults to an empty file. */ file?: pulumi.Input<string | undefined>; /** * Hash of the file, used to trigger the upload on file change. */ hash?: pulumi.Input<string | undefined>; /** * The path to the object. */ key?: pulumi.Input<string | undefined>; /** * Map of metadata used for the object (keys must be lowercase). */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; } | undefined>; /** * `projectId`) The ID of the project the bucket is associated with. * * > **Important:** The `projectId` 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 `projectId` for every child resource of the bucket, * like objects. Otherwise, Terraform will try to create the child resource with the default project ID and you will get a 403 error. */ projectId?: pulumi.Input<string | undefined>; /** * The Scaleway region the bucket resides in. */ region?: pulumi.Input<string | undefined>; /** * Customer's encryption keys to encrypt data (SSE-C) */ sseCustomerKey?: pulumi.Input<string | undefined>; /** * Specifies the Scaleway [storage class](https://www.scaleway.com/en/docs/object-storage/concepts/#storage-class) (`STANDARD`, `GLACIER`, or `ONEZONE_IA`) used to store the object. */ storageClass?: pulumi.Input<string | undefined>; /** * Map of tags. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; } | undefined>; /** * Visibility of the object, `public-read` or `private`. */ visibility?: pulumi.Input<string | undefined>; } /** * The set of arguments for constructing a ObjectItem resource. */ export interface ObjectItemArgs { /** * The name of the bucket, or its Terraform ID. */ bucket: pulumi.Input<string>; /** * The content of the file to upload. Only one of `file`, `content` or `contentBase64` can be defined. */ content?: pulumi.Input<string | undefined>; /** * The base64-encoded content of the file to upload. Only one of `file`, `content` or `contentBase64` can be defined. * * > **Note:** Only one of `file`, `content` or `contentBase64` can be defined. */ contentBase64?: pulumi.Input<string | undefined>; /** * The standard MIME type of the object's content (e.g., 'application/json', 'text/plain'). This specifies how the object should be interpreted by clients. See RFC 9110: <https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type> */ contentType?: pulumi.Input<string | undefined>; /** * The name of the file to upload, defaults to an empty file. */ file?: pulumi.Input<string | undefined>; /** * Hash of the file, used to trigger the upload on file change. */ hash?: pulumi.Input<string | undefined>; /** * The path to the object. */ key: pulumi.Input<string>; /** * Map of metadata used for the object (keys must be lowercase). */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; } | undefined>; /** * `projectId`) The ID of the project the bucket is associated with. * * > **Important:** The `projectId` 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 `projectId` for every child resource of the bucket, * like objects. Otherwise, Terraform will try to create the child resource with the default project ID and you will get a 403 error. */ projectId?: pulumi.Input<string | undefined>; /** * The Scaleway region the bucket resides in. */ region?: pulumi.Input<string | undefined>; /** * Customer's encryption keys to encrypt data (SSE-C) */ sseCustomerKey?: pulumi.Input<string | undefined>; /** * Specifies the Scaleway [storage class](https://www.scaleway.com/en/docs/object-storage/concepts/#storage-class) (`STANDARD`, `GLACIER`, or `ONEZONE_IA`) used to store the object. */ storageClass?: pulumi.Input<string | undefined>; /** * Map of tags. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; } | undefined>; /** * Visibility of the object, `public-read` or `private`. */ visibility?: pulumi.Input<string | undefined>; } //# sourceMappingURL=objectItem.d.ts.map