@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
190 lines (189 loc) • 6.78 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Attaches a load balancer policy to an ELB Listener.
*
* ## Example Usage
*
* ### Custom Policy
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const wu_tang = new aws.elb.LoadBalancer("wu-tang", {
* name: "wu-tang",
* availabilityZones: ["us-east-1a"],
* listeners: [{
* instancePort: 443,
* instanceProtocol: "http",
* lbPort: 443,
* lbProtocol: "https",
* sslCertificateId: "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
* }],
* tags: {
* Name: "wu-tang",
* },
* });
* const wu_tang_ssl = new aws.elb.LoadBalancerPolicy("wu-tang-ssl", {
* loadBalancerName: wu_tang.name,
* policyName: "wu-tang-ssl",
* policyTypeName: "SSLNegotiationPolicyType",
* policyAttributes: [
* {
* name: "ECDHE-ECDSA-AES128-GCM-SHA256",
* value: "true",
* },
* {
* name: "Protocol-TLSv1.2",
* value: "true",
* },
* ],
* });
* const wu_tang_listener_policies_443 = new aws.elb.ListenerPolicy("wu-tang-listener-policies-443", {
* loadBalancerName: wu_tang.name,
* loadBalancerPort: 443,
* policyNames: [wu_tang_ssl.policyName],
* });
* ```
*
* This example shows how to customize the TLS settings of an HTTPS listener.
*
* ### AWS Predefined Security Policy
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const wu_tang = new aws.elb.LoadBalancer("wu-tang", {
* name: "wu-tang",
* availabilityZones: ["us-east-1a"],
* listeners: [{
* instancePort: 443,
* instanceProtocol: "http",
* lbPort: 443,
* lbProtocol: "https",
* sslCertificateId: "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
* }],
* tags: {
* Name: "wu-tang",
* },
* });
* const wu_tang_ssl_tls_1_1 = new aws.elb.LoadBalancerPolicy("wu-tang-ssl-tls-1-1", {
* loadBalancerName: wu_tang.name,
* policyName: "wu-tang-ssl",
* policyTypeName: "SSLNegotiationPolicyType",
* policyAttributes: [{
* name: "Reference-Security-Policy",
* value: "ELBSecurityPolicy-TLS-1-1-2017-01",
* }],
* });
* const wu_tang_listener_policies_443 = new aws.elb.ListenerPolicy("wu-tang-listener-policies-443", {
* loadBalancerName: wu_tang.name,
* loadBalancerPort: 443,
* policyNames: [wu_tang_ssl_tls_1_1.policyName],
* });
* ```
*
* This example shows how to add a [Predefined Security Policy for ELBs](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html)
*/
export declare class ListenerPolicy extends pulumi.CustomResource {
/**
* Get an existing ListenerPolicy 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: string, id: pulumi.Input<pulumi.ID>, state?: ListenerPolicyState, opts?: pulumi.CustomResourceOptions): ListenerPolicy;
/**
* Returns true if the given object is an instance of ListenerPolicy. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ListenerPolicy;
/**
* The load balancer to attach the policy to.
*/
readonly loadBalancerName: pulumi.Output<string>;
/**
* The load balancer listener port to apply the policy to.
*/
readonly loadBalancerPort: pulumi.Output<number>;
/**
* List of Policy Names to apply to the backend server.
*/
readonly policyNames: pulumi.Output<string[] | undefined>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* Map of arbitrary keys and values that, when changed, will trigger an update.
*/
readonly triggers: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Create a ListenerPolicy resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ListenerPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ListenerPolicy resources.
*/
export interface ListenerPolicyState {
/**
* The load balancer to attach the policy to.
*/
loadBalancerName?: pulumi.Input<string>;
/**
* The load balancer listener port to apply the policy to.
*/
loadBalancerPort?: pulumi.Input<number>;
/**
* List of Policy Names to apply to the backend server.
*/
policyNames?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Map of arbitrary keys and values that, when changed, will trigger an update.
*/
triggers?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}
/**
* The set of arguments for constructing a ListenerPolicy resource.
*/
export interface ListenerPolicyArgs {
/**
* The load balancer to attach the policy to.
*/
loadBalancerName: pulumi.Input<string>;
/**
* The load balancer listener port to apply the policy to.
*/
loadBalancerPort: pulumi.Input<number>;
/**
* List of Policy Names to apply to the backend server.
*/
policyNames?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Map of arbitrary keys and values that, when changed, will trigger an update.
*/
triggers?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}