UNPKG

@pulumi/gcp

Version:

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

113 lines 5.75 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.LbTrafficExtension = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * LbTrafficExtension is a resource that lets the extension service modify the headers and payloads of both requests and responses without impacting the choice of backend services or any other security policies associated with the backend service. * * To get more information about LbTrafficExtension, see: * * * [API documentation](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.lbTrafficExtensions) * * How-to Guides * * [Configure a traffic extension](https://cloud.google.com/service-extensions/docs/configure-callout#configure_a_traffic_extension) * * ## Example Usage * * ## Import * * LbTrafficExtension can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/lbTrafficExtensions/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, LbTrafficExtension can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:networkservices/lbTrafficExtension:LbTrafficExtension default projects/{{project}}/locations/{{location}}/lbTrafficExtensions/{{name}} * ``` * * ```sh * $ pulumi import gcp:networkservices/lbTrafficExtension:LbTrafficExtension default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:networkservices/lbTrafficExtension:LbTrafficExtension default {{location}}/{{name}} * ``` */ class LbTrafficExtension extends pulumi.CustomResource { /** * Get an existing LbTrafficExtension 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 LbTrafficExtension(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of LbTrafficExtension. 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'] === LbTrafficExtension.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined; resourceInputs["extensionChains"] = state ? state.extensionChains : undefined; resourceInputs["forwardingRules"] = state ? state.forwardingRules : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["loadBalancingScheme"] = state ? state.loadBalancingScheme : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined; } else { const args = argsOrState; if ((!args || args.extensionChains === undefined) && !opts.urn) { throw new Error("Missing required property 'extensionChains'"); } if ((!args || args.forwardingRules === undefined) && !opts.urn) { throw new Error("Missing required property 'forwardingRules'"); } if ((!args || args.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["extensionChains"] = args ? args.extensionChains : undefined; resourceInputs["forwardingRules"] = args ? args.forwardingRules : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["loadBalancingScheme"] = args ? args.loadBalancingScheme : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["pulumiLabels"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(LbTrafficExtension.__pulumiType, name, resourceInputs, opts); } } exports.LbTrafficExtension = LbTrafficExtension; /** @internal */ LbTrafficExtension.__pulumiType = 'gcp:networkservices/lbTrafficExtension:LbTrafficExtension'; //# sourceMappingURL=lbTrafficExtension.js.map