Show / Hide Table of Contents

Class LoadBalancerPolicy

Provides a load balancer policy, which can be attached to an ELB listener or backend server.

Example Usage

using System.IO;
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var wu_tang = new Aws.Elb.LoadBalancer("wu-tang", new Aws.Elb.LoadBalancerArgs
    {
        AvailabilityZones = 
        {
            "us-east-1a",
        },
        Listeners = 
        {
            new Aws.Elb.Inputs.LoadBalancerListenerArgs
            {
                InstancePort = 443,
                InstanceProtocol = "http",
                LbPort = 443,
                LbProtocol = "https",
                SslCertificateId = "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
            },
        },
        Tags = 
        {
            { "Name", "wu-tang" },
        },
    });
    var wu_tang_ca_pubkey_policy = new Aws.Elb.LoadBalancerPolicy("wu-tang-ca-pubkey-policy", new Aws.Elb.LoadBalancerPolicyArgs
    {
        LoadBalancerName = wu_tang.Name,
        PolicyAttributes = 
        {
            new Aws.Elb.Inputs.LoadBalancerPolicyPolicyAttributeArgs
            {
                Name = "PublicKey",
                Value = File.ReadAllText("wu-tang-pubkey"),
            },
        },
        PolicyName = "wu-tang-ca-pubkey-policy",
        PolicyTypeName = "PublicKeyPolicyType",
    });
    var wu_tang_root_ca_backend_auth_policy = new Aws.Elb.LoadBalancerPolicy("wu-tang-root-ca-backend-auth-policy", new Aws.Elb.LoadBalancerPolicyArgs
    {
        LoadBalancerName = wu_tang.Name,
        PolicyAttributes = 
        {
            new Aws.Elb.Inputs.LoadBalancerPolicyPolicyAttributeArgs
            {
                Name = "PublicKeyPolicyName",
                Value = aws_load_balancer_policy.Wu_tang_root_ca_pubkey_policy.Policy_name,
            },
        },
        PolicyName = "wu-tang-root-ca-backend-auth-policy",
        PolicyTypeName = "BackendServerAuthenticationPolicyType",
    });
    var wu_tang_ssl = new Aws.Elb.LoadBalancerPolicy("wu-tang-ssl", new Aws.Elb.LoadBalancerPolicyArgs
    {
        LoadBalancerName = wu_tang.Name,
        PolicyAttributes = 
        {
            new Aws.Elb.Inputs.LoadBalancerPolicyPolicyAttributeArgs
            {
                Name = "ECDHE-ECDSA-AES128-GCM-SHA256",
                Value = "true",
            },
            new Aws.Elb.Inputs.LoadBalancerPolicyPolicyAttributeArgs
            {
                Name = "Protocol-TLSv1.2",
                Value = "true",
            },
        },
        PolicyName = "wu-tang-ssl",
        PolicyTypeName = "SSLNegotiationPolicyType",
    });
    var wu_tang_ssl_tls_1_1 = new Aws.Elb.LoadBalancerPolicy("wu-tang-ssl-tls-1-1", new Aws.Elb.LoadBalancerPolicyArgs
    {
        LoadBalancerName = wu_tang.Name,
        PolicyAttributes = 
        {
            new Aws.Elb.Inputs.LoadBalancerPolicyPolicyAttributeArgs
            {
                Name = "Reference-Security-Policy",
                Value = "ELBSecurityPolicy-TLS-1-1-2017-01",
            },
        },
        PolicyName = "wu-tang-ssl",
        PolicyTypeName = "SSLNegotiationPolicyType",
    });
    var wu_tang_backend_auth_policies_443 = new Aws.Elb.LoadBalancerBackendServerPolicy("wu-tang-backend-auth-policies-443", new Aws.Elb.LoadBalancerBackendServerPolicyArgs
    {
        InstancePort = 443,
        LoadBalancerName = wu_tang.Name,
        PolicyNames = 
        {
            wu_tang_root_ca_backend_auth_policy.PolicyName,
        },
    });
    var wu_tang_listener_policies_443 = new Aws.Elb.ListenerPolicy("wu-tang-listener-policies-443", new Aws.Elb.ListenerPolicyArgs
    {
        LoadBalancerName = wu_tang.Name,
        LoadBalancerPort = 443,
        PolicyNames = 
        {
            wu_tang_ssl.PolicyName,
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
LoadBalancerPolicy
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Elb
Assembly: Pulumi.Aws.dll
Syntax
public class LoadBalancerPolicy : CustomResource

Constructors

View Source

LoadBalancerPolicy(String, LoadBalancerPolicyArgs, CustomResourceOptions)

Create a LoadBalancerPolicy resource with the given unique name, arguments, and options.

Declaration
public LoadBalancerPolicy(string name, LoadBalancerPolicyArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

LoadBalancerPolicyArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

LoadBalancerName

The load balancer on which the policy is defined.

Declaration
public Output<string> LoadBalancerName { get; }
Property Value
Type Description
Output<System.String>
View Source

PolicyAttributes

Policy attribute to apply to the policy.

Declaration
public Output<ImmutableArray<LoadBalancerPolicyPolicyAttribute>> PolicyAttributes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<LoadBalancerPolicyPolicyAttribute>>
View Source

PolicyName

The name of the load balancer policy.

Declaration
public Output<string> PolicyName { get; }
Property Value
Type Description
Output<System.String>
View Source

PolicyTypeName

The policy type.

Declaration
public Output<string> PolicyTypeName { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, LoadBalancerPolicyState, CustomResourceOptions)

Get an existing LoadBalancerPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static LoadBalancerPolicy Get(string name, Input<string> id, LoadBalancerPolicyState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

LoadBalancerPolicyState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
LoadBalancerPolicy
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.