Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Adds the specified instances to the specified load balancer.
The instance must be a running instance in the same network as the load balancer (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic instances to that VPC and then register the linked EC2-Classic instances with the load balancer in the VPC.
Note that RegisterInstanceWithLoadBalancer
completes when the request
has been registered. Instance registration takes a little time to
complete. To check the state of the registered instances, use
DescribeLoadBalancers or DescribeInstanceHealth.
After the instance is registered, it starts receiving traffic and
requests from the load balancer. Any instance that is not in one of the
Availability Zones registered for the load balancer is moved to the
OutOfService
state. If an Availability Zone is added to the load
balancer later, any instances registered with the load balancer move to
the InService
state.
To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer.
For more information, see Register or De-Register EC2 Instances in the Classic Load Balancers Guide.
Synopsis
- data RegisterInstancesWithLoadBalancer = RegisterInstancesWithLoadBalancer' {
- loadBalancerName :: Text
- instances :: [Instance]
- newRegisterInstancesWithLoadBalancer :: Text -> RegisterInstancesWithLoadBalancer
- registerInstancesWithLoadBalancer_loadBalancerName :: Lens' RegisterInstancesWithLoadBalancer Text
- registerInstancesWithLoadBalancer_instances :: Lens' RegisterInstancesWithLoadBalancer [Instance]
- data RegisterInstancesWithLoadBalancerResponse = RegisterInstancesWithLoadBalancerResponse' {
- instances :: Maybe [Instance]
- httpStatus :: Int
- newRegisterInstancesWithLoadBalancerResponse :: Int -> RegisterInstancesWithLoadBalancerResponse
- registerInstancesWithLoadBalancerResponse_instances :: Lens' RegisterInstancesWithLoadBalancerResponse (Maybe [Instance])
- registerInstancesWithLoadBalancerResponse_httpStatus :: Lens' RegisterInstancesWithLoadBalancerResponse Int
Creating a Request
data RegisterInstancesWithLoadBalancer Source #
Contains the parameters for RegisterInstancesWithLoadBalancer.
See: newRegisterInstancesWithLoadBalancer
smart constructor.
RegisterInstancesWithLoadBalancer' | |
|
Instances
newRegisterInstancesWithLoadBalancer Source #
Create a value of RegisterInstancesWithLoadBalancer
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:loadBalancerName:RegisterInstancesWithLoadBalancer'
, registerInstancesWithLoadBalancer_loadBalancerName
- The name of the load balancer.
$sel:instances:RegisterInstancesWithLoadBalancer'
, registerInstancesWithLoadBalancer_instances
- The IDs of the instances.
Request Lenses
registerInstancesWithLoadBalancer_loadBalancerName :: Lens' RegisterInstancesWithLoadBalancer Text Source #
The name of the load balancer.
registerInstancesWithLoadBalancer_instances :: Lens' RegisterInstancesWithLoadBalancer [Instance] Source #
The IDs of the instances.
Destructuring the Response
data RegisterInstancesWithLoadBalancerResponse Source #
Contains the output of RegisterInstancesWithLoadBalancer.
See: newRegisterInstancesWithLoadBalancerResponse
smart constructor.
RegisterInstancesWithLoadBalancerResponse' | |
|
Instances
newRegisterInstancesWithLoadBalancerResponse Source #
Create a value of RegisterInstancesWithLoadBalancerResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:instances:RegisterInstancesWithLoadBalancer'
, registerInstancesWithLoadBalancerResponse_instances
- The updated list of instances for the load balancer.
$sel:httpStatus:RegisterInstancesWithLoadBalancerResponse'
, registerInstancesWithLoadBalancerResponse_httpStatus
- The response's http status code.
Response Lenses
registerInstancesWithLoadBalancerResponse_instances :: Lens' RegisterInstancesWithLoadBalancerResponse (Maybe [Instance]) Source #
The updated list of instances for the load balancer.
registerInstancesWithLoadBalancerResponse_httpStatus :: Lens' RegisterInstancesWithLoadBalancerResponse Int Source #
The response's http status code.