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,
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.ElasticLoadBalancing
Assembly: Pulumi.Aws.dll
Syntax
[Obsolete("aws.elasticloadbalancing.LoadBalancerPolicy has been deprecated in favor of aws.elb.LoadBalancerPolicy")]
public class LoadBalancerPolicy : CustomResource
Constructors
View SourceLoadBalancerPolicy(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 SourceLoadBalancerName
The load balancer on which the policy is defined.
Declaration
public Output<string> LoadBalancerName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
PolicyName
The name of the load balancer policy.
Declaration
public Output<string> PolicyName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PolicyTypeName
The policy type.
Declaration
public Output<string> PolicyTypeName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(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 |