UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

100 lines 4.43 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.Tag = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage cr tag * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * // Tag cannot be created,please import by command `terraform import volcengine_cr_tag.default registry:namespace:repository:tag` * const _default = new volcengine.cr.Tag("default", { * namespace: "langyu", * registry: "enterprise-1", * repository: "repo", * }); * ``` * * ## Import * * CR tags can be imported using the registry:namespace:repository:tag, e.g. * * ```sh * $ pulumi import volcengine:cr/tag:Tag default cr-basic:namespace-1:repo-1:v1 * ``` */ class Tag extends pulumi.CustomResource { /** * Get an existing Tag 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 Tag(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Tag. 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'] === Tag.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["chartAttributes"] = state ? state.chartAttributes : undefined; resourceInputs["digest"] = state ? state.digest : undefined; resourceInputs["imageAttributes"] = state ? state.imageAttributes : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["namespace"] = state ? state.namespace : undefined; resourceInputs["pushTime"] = state ? state.pushTime : undefined; resourceInputs["registry"] = state ? state.registry : undefined; resourceInputs["repository"] = state ? state.repository : undefined; resourceInputs["size"] = state ? state.size : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.namespace === undefined) && !opts.urn) { throw new Error("Missing required property 'namespace'"); } if ((!args || args.registry === undefined) && !opts.urn) { throw new Error("Missing required property 'registry'"); } if ((!args || args.repository === undefined) && !opts.urn) { throw new Error("Missing required property 'repository'"); } resourceInputs["name"] = args ? args.name : undefined; resourceInputs["namespace"] = args ? args.namespace : undefined; resourceInputs["registry"] = args ? args.registry : undefined; resourceInputs["repository"] = args ? args.repository : undefined; resourceInputs["chartAttributes"] = undefined /*out*/; resourceInputs["digest"] = undefined /*out*/; resourceInputs["imageAttributes"] = undefined /*out*/; resourceInputs["pushTime"] = undefined /*out*/; resourceInputs["size"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Tag.__pulumiType, name, resourceInputs, opts); } } exports.Tag = Tag; /** @internal */ Tag.__pulumiType = 'volcengine:cr/tag:Tag'; //# sourceMappingURL=tag.js.map