UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

95 lines 3.57 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! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ProxyProtocolPolicy = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a proxy protocol policy, which allows an ELB to carry a client connection information to a backend. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const lb = new aws.elb.LoadBalancer("lb", { * name: "test-lb", * availabilityZones: ["us-east-1a"], * listeners: [ * { * instancePort: 25, * instanceProtocol: "tcp", * lbPort: 25, * lbProtocol: "tcp", * }, * { * instancePort: 587, * instanceProtocol: "tcp", * lbPort: 587, * lbProtocol: "tcp", * }, * ], * }); * const smtp = new aws.ec2.ProxyProtocolPolicy("smtp", { * loadBalancer: lb.name, * instancePorts: [ * "25", * "587", * ], * }); * ``` */ class ProxyProtocolPolicy extends pulumi.CustomResource { /** * Get an existing ProxyProtocolPolicy 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 ProxyProtocolPolicy(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ProxyProtocolPolicy. 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'] === ProxyProtocolPolicy.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["instancePorts"] = state?.instancePorts; resourceInputs["loadBalancer"] = state?.loadBalancer; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.instancePorts === undefined && !opts.urn) { throw new Error("Missing required property 'instancePorts'"); } if (args?.loadBalancer === undefined && !opts.urn) { throw new Error("Missing required property 'loadBalancer'"); } resourceInputs["instancePorts"] = args?.instancePorts; resourceInputs["loadBalancer"] = args?.loadBalancer; resourceInputs["region"] = args?.region; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ProxyProtocolPolicy.__pulumiType, name, resourceInputs, opts); } } exports.ProxyProtocolPolicy = ProxyProtocolPolicy; /** @internal */ ProxyProtocolPolicy.__pulumiType = 'aws:ec2/proxyProtocolPolicy:ProxyProtocolPolicy'; //# sourceMappingURL=proxyProtocolPolicy.js.map