UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

109 lines 5.68 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.KeystoresAliasesKeyCertFile = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * An alias from a key/certificate pair. * * To get more information about KeystoresAliasesKeyCertFile, see: * * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keystores.aliases) * * How-to Guides * * [Keystores Aliases](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keystores.aliases) * * ## Import * * KeystoresAliasesKeyCertFile can be imported using any of these accepted formats: * * * `organizations/{{org_id}}/environments/{{environment}}/keystores/{{keystore}}/aliases/{{alias}}` * * * `{{org_id}}/{{environment}}/{{keystore}}/{{alias}}` * * When using the `pulumi import` command, KeystoresAliasesKeyCertFile can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:apigee/keystoresAliasesKeyCertFile:KeystoresAliasesKeyCertFile default organizations/{{org_id}}/environments/{{environment}}/keystores/{{keystore}}/aliases/{{alias}} * ``` * * ```sh * $ pulumi import gcp:apigee/keystoresAliasesKeyCertFile:KeystoresAliasesKeyCertFile default {{org_id}}/{{environment}}/{{keystore}}/{{alias}} * ``` */ class KeystoresAliasesKeyCertFile extends pulumi.CustomResource { /** * Get an existing KeystoresAliasesKeyCertFile 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 KeystoresAliasesKeyCertFile(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of KeystoresAliasesKeyCertFile. 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'] === KeystoresAliasesKeyCertFile.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["alias"] = state ? state.alias : undefined; resourceInputs["cert"] = state ? state.cert : undefined; resourceInputs["certsInfo"] = state ? state.certsInfo : undefined; resourceInputs["environment"] = state ? state.environment : undefined; resourceInputs["key"] = state ? state.key : undefined; resourceInputs["keystore"] = state ? state.keystore : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["password"] = state ? state.password : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.alias === undefined) && !opts.urn) { throw new Error("Missing required property 'alias'"); } if ((!args || args.cert === undefined) && !opts.urn) { throw new Error("Missing required property 'cert'"); } if ((!args || args.environment === undefined) && !opts.urn) { throw new Error("Missing required property 'environment'"); } if ((!args || args.keystore === undefined) && !opts.urn) { throw new Error("Missing required property 'keystore'"); } if ((!args || args.orgId === undefined) && !opts.urn) { throw new Error("Missing required property 'orgId'"); } resourceInputs["alias"] = args ? args.alias : undefined; resourceInputs["cert"] = args ? args.cert : undefined; resourceInputs["certsInfo"] = args ? args.certsInfo : undefined; resourceInputs["environment"] = args ? args.environment : undefined; resourceInputs["key"] = (args === null || args === void 0 ? void 0 : args.key) ? pulumi.secret(args.key) : undefined; resourceInputs["keystore"] = args ? args.keystore : undefined; resourceInputs["orgId"] = args ? args.orgId : undefined; resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["key", "password"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(KeystoresAliasesKeyCertFile.__pulumiType, name, resourceInputs, opts); } } exports.KeystoresAliasesKeyCertFile = KeystoresAliasesKeyCertFile; /** @internal */ KeystoresAliasesKeyCertFile.__pulumiType = 'gcp:apigee/keystoresAliasesKeyCertFile:KeystoresAliasesKeyCertFile'; //# sourceMappingURL=keystoresAliasesKeyCertFile.js.map