UNPKG

@pulumi/gcp

Version:

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

159 lines 6.56 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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Client = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * Application Integration Client. * * To get more information about Client, see: * * * [API documentation](https://cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.clients) * * How-to Guides * * [Official Documentation](https://cloud.google.com/application-integration/docs/overview) * * [Set up Application Integration](https://cloud.google.com/application-integration/docs/setup-application-integration) * * ## Example Usage * * ### Integrations Client Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const example = new gcp.applicationintegration.Client("example", {location: "us-central1"}); * ``` * ### Integrations Client Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as std from "@pulumi/std"; * * const _default = gcp.organizations.getProject({}); * const keyring = gcp.kms.getKMSKeyRing({ * name: "my-keyring", * location: "us-east1", * }); * const cryptokey = keyring.then(keyring => gcp.kms.getKMSCryptoKey({ * name: "my-crypto-key", * keyRing: keyring.id, * })); * const testKey = cryptokey.then(cryptokey => gcp.kms.getKMSCryptoKeyVersion({ * cryptoKey: cryptokey.id, * })); * const example = new gcp.applicationintegration.Client("example", { * location: "us-east1", * createSampleIntegrations: true, * cloudKmsConfig: { * kmsLocation: "us-east1", * kmsRing: keyring.then(keyring => std.basename({ * input: keyring.id, * })).then(invoke => invoke.result), * key: cryptokey.then(cryptokey => std.basename({ * input: cryptokey.id, * })).then(invoke => invoke.result), * keyVersion: testKey.then(testKey => std.basename({ * input: testKey.id, * })).then(invoke => invoke.result), * kmsProjectId: _default.then(_default => _default.projectId), * }, * }); * ``` * * ## Import * * Client can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/clients` * * `{{project}}/{{location}}` * * `{{location}}` * * When using the `pulumi import` command, Client can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:applicationintegration/client:Client default projects/{{project}}/locations/{{location}}/clients * $ pulumi import gcp:applicationintegration/client:Client default {{project}}/{{location}} * $ pulumi import gcp:applicationintegration/client:Client default {{location}} * ``` */ class Client extends pulumi.CustomResource { /** * Get an existing Client 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 Client(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:applicationintegration/client:Client'; /** * Returns true if the given object is an instance of Client. 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'] === Client.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["cloudKmsConfig"] = state?.cloudKmsConfig; resourceInputs["createSampleIntegrations"] = state?.createSampleIntegrations; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["location"] = state?.location; resourceInputs["project"] = state?.project; resourceInputs["runAsServiceAccount"] = state?.runAsServiceAccount; } else { const args = argsOrState; if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } resourceInputs["cloudKmsConfig"] = args?.cloudKmsConfig; resourceInputs["createSampleIntegrations"] = args?.createSampleIntegrations; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["location"] = args?.location; resourceInputs["project"] = args?.project; resourceInputs["runAsServiceAccount"] = args?.runAsServiceAccount; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Client.__pulumiType, name, resourceInputs, opts); } } exports.Client = Client; //# sourceMappingURL=client.js.map