:doc:`ElasticLoadBalancing <../../elb>` / Client / describe_load_balancer_attributes

*********************************
describe_load_balancer_attributes
*********************************



.. py:method:: ElasticLoadBalancing.Client.describe_load_balancer_attributes(**kwargs)

  

  Describes the attributes for the specified load balancer.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerAttributes>`_  


  **Request Syntax**
  ::

    response = client.describe_load_balancer_attributes(
        LoadBalancerName='string'
    )
    
  :type LoadBalancerName: string
  :param LoadBalancerName: **[REQUIRED]** 

    The name of the load balancer.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'LoadBalancerAttributes': {
              'CrossZoneLoadBalancing': {
                  'Enabled': True|False
              },
              'AccessLog': {
                  'Enabled': True|False,
                  'S3BucketName': 'string',
                  'EmitInterval': 123,
                  'S3BucketPrefix': 'string'
              },
              'ConnectionDraining': {
                  'Enabled': True|False,
                  'Timeout': 123
              },
              'ConnectionSettings': {
                  'IdleTimeout': 123
              },
              'AdditionalAttributes': [
                  {
                      'Key': 'string',
                      'Value': 'string'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the output of DescribeLoadBalancerAttributes.

      
      

      - **LoadBalancerAttributes** *(dict) --* 

        Information about the load balancer attributes.

        
        

        - **CrossZoneLoadBalancing** *(dict) --* 

          If 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 <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html>`__ in the *Classic Load Balancers Guide*.

          
          

          - **Enabled** *(boolean) --* 

            Specifies whether cross-zone load balancing is enabled for the load balancer.

            
      
        

        - **AccessLog** *(dict) --* 

          If 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 <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html>`__ in the *Classic Load Balancers Guide*.

          
          

          - **Enabled** *(boolean) --* 

            Specifies whether access logs are enabled for the load balancer.

            
          

          - **S3BucketName** *(string) --* 

            The name of the Amazon S3 bucket where the access logs are stored.

            
          

          - **EmitInterval** *(integer) --* 

            The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

             

            Default: 60 minutes

            
          

          - **S3BucketPrefix** *(string) --* 

            The logical hierarchy you created for your Amazon S3 bucket, for example ``my-bucket-prefix/prod``. If the prefix is not provided, the log is placed at the root level of the bucket.

            
      
        

        - **ConnectionDraining** *(dict) --* 

          If 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 <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html>`__ in the *Classic Load Balancers Guide*.

          
          

          - **Enabled** *(boolean) --* 

            Specifies whether connection draining is enabled for the load balancer.

            
          

          - **Timeout** *(integer) --* 

            The maximum time, in seconds, to keep the existing connections open before deregistering the instances.

            
      
        

        - **ConnectionSettings** *(dict) --* 

          If 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 <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html>`__ in the *Classic Load Balancers Guide*.

          
          

          - **IdleTimeout** *(integer) --* 

            The time, in seconds, that the connection is allowed to be idle (no data has been sent over the connection) before it is closed by the load balancer.

            
      
        

        - **AdditionalAttributes** *(list) --* 

          Any additional attributes.

          
          

          - *(dict) --* 

            Information about additional load balancer attributes.

            
            

            - **Key** *(string) --* 

              The name of the attribute.

               

              The following attribute is supported.

               

              
              * ``elb.http.desyncmitigationmode`` - Determines how the load balancer handles requests that might pose a security risk to your application. The possible values are ``monitor``, ``defensive``, and ``strictest``. The default is ``defensive``.
              

              
            

            - **Value** *(string) --* 

              This value of the attribute.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`ElasticLoadBalancing.Client.exceptions.AccessPointNotFoundException`

  
  *   :py:class:`ElasticLoadBalancing.Client.exceptions.LoadBalancerAttributeNotFoundException`

  

  **Examples**

  This example describes the attributes of the specified load balancer.
  ::

    response = client.describe_load_balancer_attributes(
        LoadBalancerName='my-load-balancer',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'LoadBalancerAttributes': {
            'AccessLog': {
                'Enabled': False,
            },
            'ConnectionDraining': {
                'Enabled': False,
                'Timeout': 300,
            },
            'ConnectionSettings': {
                'IdleTimeout': 60,
            },
            'CrossZoneLoadBalancing': {
                'Enabled': False,
            },
        },
        'ResponseMetadata': {
            '...': '...',
        },
    }

  