UNPKG

@pulumi/github

Version:

A Pulumi package for creating and managing github cloud resources.

75 lines 4.02 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ActionsEnvironmentSecret = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage */ class ActionsEnvironmentSecret extends pulumi.CustomResource { /** * Get an existing ActionsEnvironmentSecret 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 ActionsEnvironmentSecret(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ActionsEnvironmentSecret. 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'] === ActionsEnvironmentSecret.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["encryptedValue"] = state ? state.encryptedValue : undefined; resourceInputs["environment"] = state ? state.environment : undefined; resourceInputs["plaintextValue"] = state ? state.plaintextValue : undefined; resourceInputs["repository"] = state ? state.repository : undefined; resourceInputs["secretName"] = state ? state.secretName : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; } else { const args = argsOrState; if ((!args || args.environment === undefined) && !opts.urn) { throw new Error("Missing required property 'environment'"); } if ((!args || args.repository === undefined) && !opts.urn) { throw new Error("Missing required property 'repository'"); } if ((!args || args.secretName === undefined) && !opts.urn) { throw new Error("Missing required property 'secretName'"); } resourceInputs["encryptedValue"] = (args === null || args === void 0 ? void 0 : args.encryptedValue) ? pulumi.secret(args.encryptedValue) : undefined; resourceInputs["environment"] = args ? args.environment : undefined; resourceInputs["plaintextValue"] = (args === null || args === void 0 ? void 0 : args.plaintextValue) ? pulumi.secret(args.plaintextValue) : undefined; resourceInputs["repository"] = args ? args.repository : undefined; resourceInputs["secretName"] = args ? args.secretName : undefined; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["encryptedValue", "plaintextValue"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(ActionsEnvironmentSecret.__pulumiType, name, resourceInputs, opts); } } exports.ActionsEnvironmentSecret = ActionsEnvironmentSecret; /** @internal */ ActionsEnvironmentSecret.__pulumiType = 'github:index/actionsEnvironmentSecret:ActionsEnvironmentSecret'; //# sourceMappingURL=actionsEnvironmentSecret.js.map