ElasticLoadBalancing / Client / describe_load_balancer_policy_types
describe_load_balancer_policy_types#
- ElasticLoadBalancing.Client.describe_load_balancer_policy_types(**kwargs)#
Describes the specified load balancer policy types or all load balancer policy types.
The description of each type indicates how it can be used. For example, some policies can be used only with layer 7 listeners, some policies can be used only with layer 4 listeners, and some policies can be used only with your EC2 instances.
You can use CreateLoadBalancerPolicy to create a policy configuration for any of these policy types. Then, depending on the policy type, use either SetLoadBalancerPoliciesOfListener or SetLoadBalancerPoliciesForBackendServer to set the policy.
See also: AWS API Documentation
Request Syntax
response = client.describe_load_balancer_policy_types( PolicyTypeNames=[ 'string', ] )
- Parameters:
PolicyTypeNames (list) –
The names of the policy types. If no names are specified, describes all policy types defined by Elastic Load Balancing.
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'PolicyTypeDescriptions': [ { 'PolicyTypeName': 'string', 'Description': 'string', 'PolicyAttributeTypeDescriptions': [ { 'AttributeName': 'string', 'AttributeType': 'string', 'Description': 'string', 'DefaultValue': 'string', 'Cardinality': 'string' }, ] }, ] }
Response Structure
(dict) –
Contains the output of DescribeLoadBalancerPolicyTypes.
PolicyTypeDescriptions (list) –
Information about the policy types.
(dict) –
Information about a policy type.
PolicyTypeName (string) –
The name of the policy type.
Description (string) –
A description of the policy type.
PolicyAttributeTypeDescriptions (list) –
The description of the policy attributes associated with the policies defined by Elastic Load Balancing.
(dict) –
Information about a policy attribute type.
AttributeName (string) –
The name of the attribute.
AttributeType (string) –
The type of the attribute. For example,
Boolean
orInteger
.Description (string) –
A description of the attribute.
DefaultValue (string) –
The default value of the attribute, if applicable.
Cardinality (string) –
The cardinality of the attribute.
Valid values:
ONE(1) : Single value required
ZERO_OR_ONE(0..1) : Up to one value is allowed
ZERO_OR_MORE(0..*) : Optional. Multiple values are allowed
ONE_OR_MORE(1..*0) : Required. Multiple values are allowed
Exceptions
ElasticLoadBalancing.Client.exceptions.PolicyTypeNotFoundException
Examples
This example describes the specified load balancer policy type.
response = client.describe_load_balancer_policy_types( PolicyTypeNames=[ 'ProxyProtocolPolicyType', ], ) print(response)
Expected Output:
{ 'PolicyTypeDescriptions': [ { 'Description': 'Policy that controls whether to include the IP address and port of the originating request for TCP messages. This policy operates on TCP listeners only.', 'PolicyAttributeTypeDescriptions': [ { 'AttributeName': 'ProxyProtocol', 'AttributeType': 'Boolean', 'Cardinality': 'ONE', }, ], 'PolicyTypeName': 'ProxyProtocolPolicyType', }, ], 'ResponseMetadata': { '...': '...', }, }