/** * 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 AWS_ELASTICLOADBALANCINGV2_API TargetDescription { public: TargetDescription(); TargetDescription(const Aws::Utils::Xml::XmlNode& xmlNode); TargetDescription& 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 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

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

The port on which the target is listening. Not used if the target is a Lambda * function.

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

The port on which the target is listening. Not used if the target is a Lambda * function.

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

The port on which the target is listening. 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. 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.

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

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.

With an Application Load * Balancer, if the target type is ip and the IP address is outside * the VPC for the target group, the only supported value is all.

*

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.

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

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.

With an Application Load * Balancer, if the target type is ip and the IP address is outside * the VPC for the target group, the only supported value is all.

*

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.

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

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.

With an Application Load * Balancer, if the target type is ip and the IP address is outside * the VPC for the target group, the only supported value is all.

*

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.

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

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.

With an Application Load * Balancer, if the target type is ip and the IP address is outside * the VPC for the target group, the only supported value is all.

*

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.

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

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.

With an Application Load * Balancer, if the target type is ip and the IP address is outside * the VPC for the target group, the only supported value is all.

*

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.

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

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.

With an Application Load * Balancer, if the target type is ip and the IP address is outside * the VPC for the target group, the only supported value is all.

*

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.

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

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.

With an Application Load * Balancer, if the target type is ip and the IP address is outside * the VPC for the target group, the only supported value is all.

*

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.

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

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.

With an Application Load * Balancer, if the target type is ip and the IP address is outside * the VPC for the target group, the only supported value is all.

*

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; int m_port; bool m_portHasBeenSet; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet; }; } // namespace Model } // namespace ElasticLoadBalancingv2 } // namespace Aws