Skip to content

Create Load Balancer Policy

elb_create_load_balancer_policy R Documentation

Creates a policy with the specified attributes for the specified load balancer

Description

Creates a policy with the specified attributes for the specified load balancer.

Policies are settings that are saved for your load balancer and that can be applied to the listener or the application server, depending on the policy type.

Usage

elb_create_load_balancer_policy(LoadBalancerName, PolicyName,
  PolicyTypeName, PolicyAttributes)

Arguments

LoadBalancerName

[required] The name of the load balancer.

PolicyName

[required] The name of the load balancer policy to be created. This name must be unique within the set of policies for this load balancer.

PolicyTypeName

[required] The name of the base policy type. To get the list of policy types, use describe_load_balancer_policy_types.

PolicyAttributes

The policy attributes.

Value

An empty list.

Request syntax

svc$create_load_balancer_policy(
  LoadBalancerName = "string",
  PolicyName = "string",
  PolicyTypeName = "string",
  PolicyAttributes = list(
    list(
      AttributeName = "string",
      AttributeValue = "string"
    )
  )
)

Examples

## Not run: 
# This example creates a policy that enables Proxy Protocol on the
# specified load balancer.
svc$create_load_balancer_policy(
  LoadBalancerName = "my-load-balancer",
  PolicyAttributes = list(
    list(
      AttributeName = "ProxyProtocol",
      AttributeValue = "true"
    )
  ),
  PolicyName = "my-ProxyProtocol-policy",
  PolicyTypeName = "ProxyProtocolPolicyType"
)

# This example creates a public key policy.
svc$create_load_balancer_policy(
  LoadBalancerName = "my-load-balancer",
  PolicyAttributes = list(
    list(
      AttributeName = "PublicKey",
      AttributeValue = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwAYUjnf..."
    )
  ),
  PolicyName = "my-PublicKey-policy",
  PolicyTypeName = "PublicKeyPolicyType"
)

# This example creates a backend server authentication policy that enables
# authentication on your backend instance using a public key policy.
svc$create_load_balancer_policy(
  LoadBalancerName = "my-load-balancer",
  PolicyAttributes = list(
    list(
      AttributeName = "PublicKeyPolicyName",
      AttributeValue = "my-PublicKey-policy"
    )
  ),
  PolicyName = "my-authentication-policy",
  PolicyTypeName = "BackendServerAuthenticationPolicyType"
)

## End(Not run)