UNPKG

@pulumi/github

Version:

A Pulumi package for creating and managing github cloud resources.

82 lines 4.34 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.ActionsOrganizationSecret = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * ## Import * * This resource can be imported using an ID made up of the secret name: * * ```sh * $ pulumi import github:index/actionsOrganizationSecret:ActionsOrganizationSecret test_secret test_secret_name * ``` * NOTE: the implementation is limited in that it won't fetch the value of the * `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround. */ class ActionsOrganizationSecret extends pulumi.CustomResource { /** * Get an existing ActionsOrganizationSecret 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 ActionsOrganizationSecret(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ActionsOrganizationSecret. 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'] === ActionsOrganizationSecret.__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["plaintextValue"] = state ? state.plaintextValue : undefined; resourceInputs["secretName"] = state ? state.secretName : undefined; resourceInputs["selectedRepositoryIds"] = state ? state.selectedRepositoryIds : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; resourceInputs["visibility"] = state ? state.visibility : undefined; } else { const args = argsOrState; if ((!args || args.secretName === undefined) && !opts.urn) { throw new Error("Missing required property 'secretName'"); } if ((!args || args.visibility === undefined) && !opts.urn) { throw new Error("Missing required property 'visibility'"); } resourceInputs["encryptedValue"] = (args === null || args === void 0 ? void 0 : args.encryptedValue) ? pulumi.secret(args.encryptedValue) : undefined; resourceInputs["plaintextValue"] = (args === null || args === void 0 ? void 0 : args.plaintextValue) ? pulumi.secret(args.plaintextValue) : undefined; resourceInputs["secretName"] = args ? args.secretName : undefined; resourceInputs["selectedRepositoryIds"] = args ? args.selectedRepositoryIds : undefined; resourceInputs["visibility"] = args ? args.visibility : 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(ActionsOrganizationSecret.__pulumiType, name, resourceInputs, opts); } } exports.ActionsOrganizationSecret = ActionsOrganizationSecret; /** @internal */ ActionsOrganizationSecret.__pulumiType = 'github:index/actionsOrganizationSecret:ActionsOrganizationSecret'; //# sourceMappingURL=actionsOrganizationSecret.js.map