OpsWorks / Client / attach_elastic_load_balancer

attach_elastic_load_balancer#

OpsWorks.Client.attach_elastic_load_balancer(**kwargs)#

Attaches an Elastic Load Balancing load balancer to a specified layer. OpsWorks Stacks does not support Application Load Balancer. You can only use Classic Load Balancer with OpsWorks Stacks. For more information, see Elastic Load Balancing.

Note

You must create the Elastic Load Balancing instance separately, by using the Elastic Load Balancing console, API, or CLI. For more information, see the Elastic Load Balancing Developer Guide.

Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

See also: AWS API Documentation

Request Syntax

response = client.attach_elastic_load_balancer(
    ElasticLoadBalancerName='string',
    LayerId='string'
)
Parameters:
  • ElasticLoadBalancerName (string) –

    [REQUIRED]

    The Elastic Load Balancing instance’s name.

  • LayerId (string) –

    [REQUIRED]

    The ID of the layer to which the Elastic Load Balancing instance is to be attached.

Returns:

None

Exceptions

  • OpsWorks.Client.exceptions.ValidationException

  • OpsWorks.Client.exceptions.ResourceNotFoundException