UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

94 lines 4.93 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.Certificate = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Import * * Certificates can be imported using the `id`, e.g. * * ```sh * $ pulumi import huaweicloud:Scm/certificate:Certificate certificate_1 scs1627959834994 * ``` */ class Certificate extends pulumi.CustomResource { /** * Get an existing Certificate 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 Certificate(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Certificate. 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'] === Certificate.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authentifications"] = state ? state.authentifications : undefined; resourceInputs["certificate"] = state ? state.certificate : undefined; resourceInputs["certificateChain"] = state ? state.certificateChain : undefined; resourceInputs["domain"] = state ? state.domain : undefined; resourceInputs["domainCount"] = state ? state.domainCount : undefined; resourceInputs["encCertificate"] = state ? state.encCertificate : undefined; resourceInputs["encPrivateKey"] = state ? state.encPrivateKey : undefined; resourceInputs["enterpriseProjectId"] = state ? state.enterpriseProjectId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["notAfter"] = state ? state.notAfter : undefined; resourceInputs["notBefore"] = state ? state.notBefore : undefined; resourceInputs["privateKey"] = state ? state.privateKey : undefined; resourceInputs["pushSupport"] = state ? state.pushSupport : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["targets"] = state ? state.targets : undefined; } else { const args = argsOrState; if ((!args || args.certificate === undefined) && !opts.urn) { throw new Error("Missing required property 'certificate'"); } if ((!args || args.privateKey === undefined) && !opts.urn) { throw new Error("Missing required property 'privateKey'"); } resourceInputs["certificate"] = args ? args.certificate : undefined; resourceInputs["certificateChain"] = args ? args.certificateChain : undefined; resourceInputs["encCertificate"] = args ? args.encCertificate : undefined; resourceInputs["encPrivateKey"] = args ? args.encPrivateKey : undefined; resourceInputs["enterpriseProjectId"] = args ? args.enterpriseProjectId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["privateKey"] = args ? args.privateKey : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["targets"] = args ? args.targets : undefined; resourceInputs["authentifications"] = undefined /*out*/; resourceInputs["domain"] = undefined /*out*/; resourceInputs["domainCount"] = undefined /*out*/; resourceInputs["notAfter"] = undefined /*out*/; resourceInputs["notBefore"] = undefined /*out*/; resourceInputs["pushSupport"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Certificate.__pulumiType, name, resourceInputs, opts); } } exports.Certificate = Certificate; /** @internal */ Certificate.__pulumiType = 'huaweicloud:Scm/certificate:Certificate'; //# sourceMappingURL=certificate.js.map