UNPKG

@pulumi/gcp

Version:

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

93 lines 4.07 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.EnvReferences = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * An `Environment Reference` in Apigee. * * To get more information about EnvReferences, see: * * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.references/create) * * How-to Guides * * [Creating an environment](https://cloud.google.com/apigee/docs/api-platform/get-started/create-environment) * * ## Import * * EnvReferences can be imported using any of these accepted formats: * * * `{{env_id}}/references/{{name}}` * * * `{{env_id}}/{{name}}` * * When using the `pulumi import` command, EnvReferences can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:apigee/envReferences:EnvReferences default {{env_id}}/references/{{name}} * ``` * * ```sh * $ pulumi import gcp:apigee/envReferences:EnvReferences default {{env_id}}/{{name}} * ``` */ class EnvReferences extends pulumi.CustomResource { /** * Get an existing EnvReferences 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 EnvReferences(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of EnvReferences. 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'] === EnvReferences.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["envId"] = state ? state.envId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["refers"] = state ? state.refers : undefined; resourceInputs["resourceType"] = state ? state.resourceType : undefined; } else { const args = argsOrState; if ((!args || args.envId === undefined) && !opts.urn) { throw new Error("Missing required property 'envId'"); } if ((!args || args.refers === undefined) && !opts.urn) { throw new Error("Missing required property 'refers'"); } if ((!args || args.resourceType === undefined) && !opts.urn) { throw new Error("Missing required property 'resourceType'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["envId"] = args ? args.envId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["refers"] = args ? args.refers : undefined; resourceInputs["resourceType"] = args ? args.resourceType : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EnvReferences.__pulumiType, name, resourceInputs, opts); } } exports.EnvReferences = EnvReferences; /** @internal */ EnvReferences.__pulumiType = 'gcp:apigee/envReferences:EnvReferences'; //# sourceMappingURL=envReferences.js.map