/** * 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 ElasticLoadBalancingv2 { namespace Model { /** *

Information about a target.

See Also:

AWS * API Reference

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

The ID of the target. If the target type of the target group is * instance, specify an instance ID. If the target type is * ip, specify an IP address. If the target type is * lambda, specify the ARN of the Lambda function. If the target type * is alb, specify the ARN of the Application Load Balancer target. *

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The ID of the target. If the target type of the target group is * instance, specify an instance ID. If the target type is * ip, specify an IP address. If the target type is * lambda, specify the ARN of the Lambda function. If the target type * is alb, specify the ARN of the Application Load Balancer target. *

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The ID of the target. If the target type of the target group is * instance, specify an instance ID. If the target type is * ip, specify an IP address. If the target type is * lambda, specify the ARN of the Lambda function. If the target type * is alb, specify the ARN of the Application Load Balancer target. *

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The ID of the target. If the target type of the target group is * instance, specify an instance ID. If the target type is * ip, specify an IP address. If the target type is * lambda, specify the ARN of the Lambda function. If the target type * is alb, specify the ARN of the Application Load Balancer target. *

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The ID of the target. If the target type of the target group is * instance, specify an instance ID. If the target type is * ip, specify an IP address. If the target type is * lambda, specify the ARN of the Lambda function. If the target type * is alb, specify the ARN of the Application Load Balancer target. *

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The ID of the target. If the target type of the target group is * instance, specify an instance ID. If the target type is * ip, specify an IP address. If the target type is * lambda, specify the ARN of the Lambda function. If the target type * is alb, specify the ARN of the Application Load Balancer target. *

*/ inline TargetDescription& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The ID of the target. If the target type of the target group is * instance, specify an instance ID. If the target type is * ip, specify an IP address. If the target type is * lambda, specify the ARN of the Lambda function. If the target type * is alb, specify the ARN of the Application Load Balancer target. *

*/ inline TargetDescription& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The ID of the target. If the target type of the target group is * instance, specify an instance ID. If the target type is * ip, specify an IP address. If the target type is * lambda, specify the ARN of the Lambda function. If the target type * is alb, specify the ARN of the Application Load Balancer target. *

*/ inline TargetDescription& WithId(const char* value) { SetId(value); return *this;} /** *

The port on which the target is listening. If the target group protocol is * GENEVE, the supported port is 6081. If the target type is alb, the * targeted Application Load Balancer must have at least one listener whose port * matches the target group port. Not used if the target is a Lambda function.

*/ inline int GetPort() const{ return m_port; } /** *

The port on which the target is listening. If the target group protocol is * GENEVE, the supported port is 6081. If the target type is alb, the * targeted Application Load Balancer must have at least one listener whose port * matches the target group port. Not used if the target is a Lambda function.

*/ inline bool PortHasBeenSet() const { return m_portHasBeenSet; } /** *

The port on which the target is listening. If the target group protocol is * GENEVE, the supported port is 6081. If the target type is alb, the * targeted Application Load Balancer must have at least one listener whose port * matches the target group port. Not used if the target is a Lambda function.

*/ inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; } /** *

The port on which the target is listening. If the target group protocol is * GENEVE, the supported port is 6081. If the target type is alb, the * targeted Application Load Balancer must have at least one listener whose port * matches the target group port. Not used if the target is a Lambda function.

*/ inline TargetDescription& WithPort(int value) { SetPort(value); return *this;} /** *

An Availability Zone or all. This determines whether the target * receives traffic from the load balancer nodes in the specified Availability Zone * or from all enabled Availability Zones for the load balancer.

For * Application Load Balancer target groups, the specified Availability Zone value * is only applicable when cross-zone load balancing is off. Otherwise the * parameter is ignored and treated as all.

This parameter is * not supported if the target type of the target group is instance or * alb.

If the target type is ip and the IP * address is in a subnet of the VPC for the target group, the Availability Zone is * automatically detected and this parameter is optional. If the IP address is * outside the VPC, this parameter is required.

For Application Load * Balancer target groups with cross-zone load balancing off, if the target type is * ip and the IP address is outside of the VPC for the target group, * this should be an Availability Zone inside the VPC for the target group.

*

If the target type is lambda, this parameter is optional and the * only supported value is all.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

An Availability Zone or all. This determines whether the target * receives traffic from the load balancer nodes in the specified Availability Zone * or from all enabled Availability Zones for the load balancer.

For * Application Load Balancer target groups, the specified Availability Zone value * is only applicable when cross-zone load balancing is off. Otherwise the * parameter is ignored and treated as all.

This parameter is * not supported if the target type of the target group is instance or * alb.

If the target type is ip and the IP * address is in a subnet of the VPC for the target group, the Availability Zone is * automatically detected and this parameter is optional. If the IP address is * outside the VPC, this parameter is required.

For Application Load * Balancer target groups with cross-zone load balancing off, if the target type is * ip and the IP address is outside of the VPC for the target group, * this should be an Availability Zone inside the VPC for the target group.

*

If the target type is lambda, this parameter is optional and the * only supported value is all.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

An Availability Zone or all. This determines whether the target * receives traffic from the load balancer nodes in the specified Availability Zone * or from all enabled Availability Zones for the load balancer.

For * Application Load Balancer target groups, the specified Availability Zone value * is only applicable when cross-zone load balancing is off. Otherwise the * parameter is ignored and treated as all.

This parameter is * not supported if the target type of the target group is instance or * alb.

If the target type is ip and the IP * address is in a subnet of the VPC for the target group, the Availability Zone is * automatically detected and this parameter is optional. If the IP address is * outside the VPC, this parameter is required.

For Application Load * Balancer target groups with cross-zone load balancing off, if the target type is * ip and the IP address is outside of the VPC for the target group, * this should be an Availability Zone inside the VPC for the target group.

*

If the target type is lambda, this parameter is optional and the * only supported value is all.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

An Availability Zone or all. This determines whether the target * receives traffic from the load balancer nodes in the specified Availability Zone * or from all enabled Availability Zones for the load balancer.

For * Application Load Balancer target groups, the specified Availability Zone value * is only applicable when cross-zone load balancing is off. Otherwise the * parameter is ignored and treated as all.

This parameter is * not supported if the target type of the target group is instance or * alb.

If the target type is ip and the IP * address is in a subnet of the VPC for the target group, the Availability Zone is * automatically detected and this parameter is optional. If the IP address is * outside the VPC, this parameter is required.

For Application Load * Balancer target groups with cross-zone load balancing off, if the target type is * ip and the IP address is outside of the VPC for the target group, * this should be an Availability Zone inside the VPC for the target group.

*

If the target type is lambda, this parameter is optional and the * only supported value is all.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

An Availability Zone or all. This determines whether the target * receives traffic from the load balancer nodes in the specified Availability Zone * or from all enabled Availability Zones for the load balancer.

For * Application Load Balancer target groups, the specified Availability Zone value * is only applicable when cross-zone load balancing is off. Otherwise the * parameter is ignored and treated as all.

This parameter is * not supported if the target type of the target group is instance or * alb.

If the target type is ip and the IP * address is in a subnet of the VPC for the target group, the Availability Zone is * automatically detected and this parameter is optional. If the IP address is * outside the VPC, this parameter is required.

For Application Load * Balancer target groups with cross-zone load balancing off, if the target type is * ip and the IP address is outside of the VPC for the target group, * this should be an Availability Zone inside the VPC for the target group.

*

If the target type is lambda, this parameter is optional and the * only supported value is all.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

An Availability Zone or all. This determines whether the target * receives traffic from the load balancer nodes in the specified Availability Zone * or from all enabled Availability Zones for the load balancer.

For * Application Load Balancer target groups, the specified Availability Zone value * is only applicable when cross-zone load balancing is off. Otherwise the * parameter is ignored and treated as all.

This parameter is * not supported if the target type of the target group is instance or * alb.

If the target type is ip and the IP * address is in a subnet of the VPC for the target group, the Availability Zone is * automatically detected and this parameter is optional. If the IP address is * outside the VPC, this parameter is required.

For Application Load * Balancer target groups with cross-zone load balancing off, if the target type is * ip and the IP address is outside of the VPC for the target group, * this should be an Availability Zone inside the VPC for the target group.

*

If the target type is lambda, this parameter is optional and the * only supported value is all.

*/ inline TargetDescription& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

An Availability Zone or all. This determines whether the target * receives traffic from the load balancer nodes in the specified Availability Zone * or from all enabled Availability Zones for the load balancer.

For * Application Load Balancer target groups, the specified Availability Zone value * is only applicable when cross-zone load balancing is off. Otherwise the * parameter is ignored and treated as all.

This parameter is * not supported if the target type of the target group is instance or * alb.

If the target type is ip and the IP * address is in a subnet of the VPC for the target group, the Availability Zone is * automatically detected and this parameter is optional. If the IP address is * outside the VPC, this parameter is required.

For Application Load * Balancer target groups with cross-zone load balancing off, if the target type is * ip and the IP address is outside of the VPC for the target group, * this should be an Availability Zone inside the VPC for the target group.

*

If the target type is lambda, this parameter is optional and the * only supported value is all.

*/ inline TargetDescription& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

An Availability Zone or all. This determines whether the target * receives traffic from the load balancer nodes in the specified Availability Zone * or from all enabled Availability Zones for the load balancer.

For * Application Load Balancer target groups, the specified Availability Zone value * is only applicable when cross-zone load balancing is off. Otherwise the * parameter is ignored and treated as all.

This parameter is * not supported if the target type of the target group is instance or * alb.

If the target type is ip and the IP * address is in a subnet of the VPC for the target group, the Availability Zone is * automatically detected and this parameter is optional. If the IP address is * outside the VPC, this parameter is required.

For Application Load * Balancer target groups with cross-zone load balancing off, if the target type is * ip and the IP address is outside of the VPC for the target group, * this should be an Availability Zone inside the VPC for the target group.

*

If the target type is lambda, this parameter is optional and the * only supported value is all.

*/ inline TargetDescription& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; int m_port; bool m_portHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; }; } // namespace Model } // namespace ElasticLoadBalancingv2 } // namespace Aws