UNPKG

@pulumi/gcp

Version:

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

148 lines 6.09 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.AppGateway = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway to a remote application. It creates * all the necessary GCP components needed for creating a BeyondCorp protected AppGateway. Multiple connectors can be * authorised for a single AppGateway. * * To get more information about AppGateway, see: * * * [API documentation](https://cloud.google.com/beyondcorp/docs/reference/rest#rest-resource:-v1.projects.locations.appgateways) * * How-to Guides * * [Official Documentation](https://cloud.google.com/beyondcorp-enterprise/docs/enable-app-connector) * * ## Example Usage * * ### Beyondcorp App Gateway Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const appGateway = new gcp.beyondcorp.AppGateway("app_gateway", { * name: "my-app-gateway", * type: "TCP_PROXY", * region: "us-central1", * hostType: "GCP_REGIONAL_MIG", * }); * ``` * ### Beyondcorp App Gateway Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const appGateway = new gcp.beyondcorp.AppGateway("app_gateway", { * name: "my-app-gateway", * type: "TCP_PROXY", * region: "us-central1", * displayName: "some display name", * labels: { * foo: "bar", * bar: "baz", * }, * hostType: "GCP_REGIONAL_MIG", * }); * ``` * * ## Import * * AppGateway can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{region}}/appGateways/{{name}}` * * * `{{project}}/{{region}}/{{name}}` * * * `{{region}}/{{name}}` * * * `{{name}}` * * When using the `pulumi import` command, AppGateway can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:beyondcorp/appGateway:AppGateway default projects/{{project}}/locations/{{region}}/appGateways/{{name}} * ``` * * ```sh * $ pulumi import gcp:beyondcorp/appGateway:AppGateway default {{project}}/{{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:beyondcorp/appGateway:AppGateway default {{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:beyondcorp/appGateway:AppGateway default {{name}} * ``` */ class AppGateway extends pulumi.CustomResource { /** * Get an existing AppGateway 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 AppGateway(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AppGateway. 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'] === AppGateway.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allocatedConnections"] = state ? state.allocatedConnections : undefined; resourceInputs["displayName"] = state ? state.displayName : undefined; resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined; resourceInputs["hostType"] = state ? state.hostType : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["uri"] = state ? state.uri : undefined; } else { const args = argsOrState; resourceInputs["displayName"] = args ? args.displayName : undefined; resourceInputs["hostType"] = args ? args.hostType : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["allocatedConnections"] = undefined /*out*/; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["pulumiLabels"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["uri"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(AppGateway.__pulumiType, name, resourceInputs, opts); } } exports.AppGateway = AppGateway; /** @internal */ AppGateway.__pulumiType = 'gcp:beyondcorp/appGateway:AppGateway'; //# sourceMappingURL=appGateway.js.map