UNPKG

@lbrlabs/pulumi-scaleway

Version:

A Pulumi package for creating and managing scaleway cloud resources.

89 lines 4.42 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ObjectItem = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Creates and manages Scaleway object storage objects. * For more information, see [the documentation](https://www.scaleway.com/en/docs/object-storage-feature/). * * ## Import * * Objects can be imported using the `{region}/{bucketName}/{objectKey}` identifier, e.g. bash * * ```sh * $ pulumi import scaleway:index/objectItem:ObjectItem some_object fr-par/some-bucket/some-file * ``` */ 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, id, state, opts) { return new ObjectItem(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ObjectItem.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["bucket"] = state ? state.bucket : undefined; resourceInputs["content"] = state ? state.content : undefined; resourceInputs["contentBase64"] = state ? state.contentBase64 : undefined; resourceInputs["file"] = state ? state.file : undefined; resourceInputs["hash"] = state ? state.hash : undefined; resourceInputs["key"] = state ? state.key : undefined; resourceInputs["metadata"] = state ? state.metadata : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["storageClass"] = state ? state.storageClass : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["visibility"] = state ? state.visibility : undefined; } else { const args = argsOrState; if ((!args || args.bucket === undefined) && !opts.urn) { throw new Error("Missing required property 'bucket'"); } if ((!args || args.key === undefined) && !opts.urn) { throw new Error("Missing required property 'key'"); } resourceInputs["bucket"] = args ? args.bucket : undefined; resourceInputs["content"] = args ? args.content : undefined; resourceInputs["contentBase64"] = args ? args.contentBase64 : undefined; resourceInputs["file"] = args ? args.file : undefined; resourceInputs["hash"] = args ? args.hash : undefined; resourceInputs["key"] = args ? args.key : undefined; resourceInputs["metadata"] = args ? args.metadata : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["storageClass"] = args ? args.storageClass : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["visibility"] = args ? args.visibility : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ObjectItem.__pulumiType, name, resourceInputs, opts); } } exports.ObjectItem = ObjectItem; /** @internal */ ObjectItem.__pulumiType = 'scaleway:index/objectItem:ObjectItem'; //# sourceMappingURL=objectItem.js.map