UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

120 lines 5.39 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.BucketObject = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage tos object * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const _default = new volcengine.tos.BucketObject("default", { * accountAcls: [ * { * accountId: "1", * permission: "READ", * }, * { * accountId: "2001", * permission: "WRITE_ACP", * }, * ], * bucketName: "tf-acc-test-bucket", * encryption: "AES256", * filePath: "/Users/bytedance/Work/Go/build/test.txt", * objectName: "tf-acc-test-object", * publicAcl: "private", * tags: [{ * key: "k1", * value: "v1", * }], * }); * ``` * * ## Import * * TOS Object can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:tos/bucketObject:BucketObject default bucketName:objectName * ``` */ class BucketObject extends pulumi.CustomResource { /** * Get an existing BucketObject 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 BucketObject(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BucketObject. 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'] === BucketObject.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountAcls"] = state ? state.accountAcls : undefined; resourceInputs["bucketName"] = state ? state.bucketName : undefined; resourceInputs["content"] = state ? state.content : undefined; resourceInputs["contentMd5"] = state ? state.contentMd5 : undefined; resourceInputs["contentType"] = state ? state.contentType : undefined; resourceInputs["enableVersion"] = state ? state.enableVersion : undefined; resourceInputs["encryption"] = state ? state.encryption : undefined; resourceInputs["filePath"] = state ? state.filePath : undefined; resourceInputs["isDefault"] = state ? state.isDefault : undefined; resourceInputs["objectName"] = state ? state.objectName : undefined; resourceInputs["publicAcl"] = state ? state.publicAcl : undefined; resourceInputs["storageClass"] = state ? state.storageClass : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["versionIds"] = state ? state.versionIds : undefined; } else { const args = argsOrState; if ((!args || args.bucketName === undefined) && !opts.urn) { throw new Error("Missing required property 'bucketName'"); } if ((!args || args.objectName === undefined) && !opts.urn) { throw new Error("Missing required property 'objectName'"); } resourceInputs["accountAcls"] = args ? args.accountAcls : undefined; resourceInputs["bucketName"] = args ? args.bucketName : undefined; resourceInputs["content"] = args ? args.content : undefined; resourceInputs["contentMd5"] = args ? args.contentMd5 : undefined; resourceInputs["contentType"] = args ? args.contentType : undefined; resourceInputs["encryption"] = args ? args.encryption : undefined; resourceInputs["filePath"] = args ? args.filePath : undefined; resourceInputs["objectName"] = args ? args.objectName : undefined; resourceInputs["publicAcl"] = args ? args.publicAcl : undefined; resourceInputs["storageClass"] = args ? args.storageClass : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["enableVersion"] = undefined /*out*/; resourceInputs["isDefault"] = undefined /*out*/; resourceInputs["versionIds"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BucketObject.__pulumiType, name, resourceInputs, opts); } } exports.BucketObject = BucketObject; /** @internal */ BucketObject.__pulumiType = 'volcengine:tos/bucketObject:BucketObject'; //# sourceMappingURL=bucketObject.js.map