Skip to main content

load_balancer_attributes

Creates, updates, deletes, gets or lists a load_balancer_attributes resource.

Overview

Nameload_balancer_attributes
TypeResource
Idaws.elb.load_balancer_attributes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
access_logstringIf enabled, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify. For more information, see Enable Access Logs in the Classic Load Balancers Guide.
additional_attributesstringAny additional attributes.
connection_drainingstringIf enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy instance. For more information, see Configure Connection Draining in the Classic Load Balancers Guide.
connection_settingsstringIf enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration. By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Classic Load Balancers Guide.
cross_zone_load_balancingstringIf enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones. For more information, see Configure Cross-Zone Load Balancing in the Classic Load Balancers Guide.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_load_balancer_attributesselectLoadBalancerName, regionDescribes the attributes for the specified load balancer.
modify_load_balancer_attributesupdateLoadBalancerName, LoadBalancerAttributes, regionModifies the attributes of the specified load balancer. You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, and CrossZoneLoadBalancing by either enabling or disabling them. Or, you can modify the load balancer attribute ConnectionSettings by specifying an idle connection timeout value for your load balancer. For more information, see the following in the Classic Load Balancers Guide: Cross-Zone Load Balancing Connection Draining Access Logs Idle Connection Timeout

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
LoadBalancerAttributesobjectThe attributes for the load balancer.
LoadBalancerNamestringThe name of the load balancer.
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the attributes for the specified load balancer.

SELECT
access_log,
additional_attributes,
connection_draining,
connection_settings,
cross_zone_load_balancing
FROM aws.elb.load_balancer_attributes
WHERE LoadBalancerName = '{{ LoadBalancerName }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Modifies the attributes of the specified load balancer. You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, and CrossZoneLoadBalancing by either enabling or disabling them. Or, you can modify the load balancer attribute ConnectionSettings by specifying an idle connection timeout value for your load balancer. For more information, see the following in the Classic Load Balancers Guide: Cross-Zone Load Balancing Connection Draining Access Logs Idle Connection Timeout

UPDATE aws.elb.load_balancer_attributes
SET
-- No updatable properties
WHERE
LoadBalancerName = '{{ LoadBalancerName }}' --required
AND LoadBalancerAttributes = '{{ LoadBalancerAttributes }}' --required
AND region = '{{ region }}' --required
RETURNING
access_log,
additional_attributes,
connection_draining,
connection_settings,
cross_zone_load_balancing;