/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace AutoScaling { namespace Model { /** *

Describes the state of a Classic Load Balancer.

If you specify a load * balancer when creating the Auto Scaling group, the state of the load balancer is * InService.

If you attach a load balancer to an existing Auto * Scaling group, the initial state is Adding. The state transitions * to Added after all instances in the group are registered with the * load balancer. If Elastic Load Balancing health checks are enabled for the load * balancer, the state transitions to InService after at least one * instance in the group passes the health check. If EC2 health checks are enabled * instead, the load balancer remains in the Added * state.

See Also:

AWS * API Reference

*/ class AWS_AUTOSCALING_API LoadBalancerState { public: LoadBalancerState(); LoadBalancerState(const Aws::Utils::Xml::XmlNode& xmlNode); LoadBalancerState& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The name of the load balancer.

*/ inline const Aws::String& GetLoadBalancerName() const{ return m_loadBalancerName; } /** *

The name of the load balancer.

*/ inline bool LoadBalancerNameHasBeenSet() const { return m_loadBalancerNameHasBeenSet; } /** *

The name of the load balancer.

*/ inline void SetLoadBalancerName(const Aws::String& value) { m_loadBalancerNameHasBeenSet = true; m_loadBalancerName = value; } /** *

The name of the load balancer.

*/ inline void SetLoadBalancerName(Aws::String&& value) { m_loadBalancerNameHasBeenSet = true; m_loadBalancerName = std::move(value); } /** *

The name of the load balancer.

*/ inline void SetLoadBalancerName(const char* value) { m_loadBalancerNameHasBeenSet = true; m_loadBalancerName.assign(value); } /** *

The name of the load balancer.

*/ inline LoadBalancerState& WithLoadBalancerName(const Aws::String& value) { SetLoadBalancerName(value); return *this;} /** *

The name of the load balancer.

*/ inline LoadBalancerState& WithLoadBalancerName(Aws::String&& value) { SetLoadBalancerName(std::move(value)); return *this;} /** *

The name of the load balancer.

*/ inline LoadBalancerState& WithLoadBalancerName(const char* value) { SetLoadBalancerName(value); return *this;} /** *

One of the following load balancer states:

  • * Adding - The instances in the group are being registered with the * load balancer.

  • Added - All instances in the * group are registered with the load balancer.

  • * InService - At least one instance in the group passed an ELB health * check.

  • Removing - The instances in the group are * being deregistered from the load balancer. If connection draining is enabled, * Elastic Load Balancing waits for in-flight requests to complete before * deregistering the instances.

  • Removed - All * instances in the group are deregistered from the load balancer.

*/ inline const Aws::String& GetState() const{ return m_state; } /** *

One of the following load balancer states:

  • * Adding - The instances in the group are being registered with the * load balancer.

  • Added - All instances in the * group are registered with the load balancer.

  • * InService - At least one instance in the group passed an ELB health * check.

  • Removing - The instances in the group are * being deregistered from the load balancer. If connection draining is enabled, * Elastic Load Balancing waits for in-flight requests to complete before * deregistering the instances.

  • Removed - All * instances in the group are deregistered from the load balancer.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

One of the following load balancer states:

  • * Adding - The instances in the group are being registered with the * load balancer.

  • Added - All instances in the * group are registered with the load balancer.

  • * InService - At least one instance in the group passed an ELB health * check.

  • Removing - The instances in the group are * being deregistered from the load balancer. If connection draining is enabled, * Elastic Load Balancing waits for in-flight requests to complete before * deregistering the instances.

  • Removed - All * instances in the group are deregistered from the load balancer.

*/ inline void SetState(const Aws::String& value) { m_stateHasBeenSet = true; m_state = value; } /** *

One of the following load balancer states:

  • * Adding - The instances in the group are being registered with the * load balancer.

  • Added - All instances in the * group are registered with the load balancer.

  • * InService - At least one instance in the group passed an ELB health * check.

  • Removing - The instances in the group are * being deregistered from the load balancer. If connection draining is enabled, * Elastic Load Balancing waits for in-flight requests to complete before * deregistering the instances.

  • Removed - All * instances in the group are deregistered from the load balancer.

*/ inline void SetState(Aws::String&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

One of the following load balancer states:

  • * Adding - The instances in the group are being registered with the * load balancer.

  • Added - All instances in the * group are registered with the load balancer.

  • * InService - At least one instance in the group passed an ELB health * check.

  • Removing - The instances in the group are * being deregistered from the load balancer. If connection draining is enabled, * Elastic Load Balancing waits for in-flight requests to complete before * deregistering the instances.

  • Removed - All * instances in the group are deregistered from the load balancer.

*/ inline void SetState(const char* value) { m_stateHasBeenSet = true; m_state.assign(value); } /** *

One of the following load balancer states:

  • * Adding - The instances in the group are being registered with the * load balancer.

  • Added - All instances in the * group are registered with the load balancer.

  • * InService - At least one instance in the group passed an ELB health * check.

  • Removing - The instances in the group are * being deregistered from the load balancer. If connection draining is enabled, * Elastic Load Balancing waits for in-flight requests to complete before * deregistering the instances.

  • Removed - All * instances in the group are deregistered from the load balancer.

*/ inline LoadBalancerState& WithState(const Aws::String& value) { SetState(value); return *this;} /** *

One of the following load balancer states:

  • * Adding - The instances in the group are being registered with the * load balancer.

  • Added - All instances in the * group are registered with the load balancer.

  • * InService - At least one instance in the group passed an ELB health * check.

  • Removing - The instances in the group are * being deregistered from the load balancer. If connection draining is enabled, * Elastic Load Balancing waits for in-flight requests to complete before * deregistering the instances.

  • Removed - All * instances in the group are deregistered from the load balancer.

*/ inline LoadBalancerState& WithState(Aws::String&& value) { SetState(std::move(value)); return *this;} /** *

One of the following load balancer states:

  • * Adding - The instances in the group are being registered with the * load balancer.

  • Added - All instances in the * group are registered with the load balancer.

  • * InService - At least one instance in the group passed an ELB health * check.

  • Removing - The instances in the group are * being deregistered from the load balancer. If connection draining is enabled, * Elastic Load Balancing waits for in-flight requests to complete before * deregistering the instances.

  • Removed - All * instances in the group are deregistered from the load balancer.

*/ inline LoadBalancerState& WithState(const char* value) { SetState(value); return *this;} private: Aws::String m_loadBalancerName; bool m_loadBalancerNameHasBeenSet; Aws::String m_state; bool m_stateHasBeenSet; }; } // namespace Model } // namespace AutoScaling } // namespace Aws