AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

TargetDescription

import "github.com/aws/aws-sdk-go/service/elbv2"

type TargetDescription struct { AvailabilityZone *string `type:"string"` Id *string `type:"string" required:"true"` Port *int64 `min:"1" type:"integer"` }

Information about a target.

AvailabilityZone

Type: *string

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.

Id

Type: *string

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.

Id is a required field

Port

Type: *int64

The port on which the target is listening.

Method

GoString

func (s TargetDescription) GoString() string

GoString returns the string representation

SetAvailabilityZone

func (s *TargetDescription) SetAvailabilityZone(v string) *TargetDescription

SetAvailabilityZone sets the AvailabilityZone field's value.

SetId

func (s *TargetDescription) SetId(v string) *TargetDescription

SetId sets the Id field's value.

SetPort

func (s *TargetDescription) SetPort(v int64) *TargetDescription

SetPort sets the Port field's value.

String

func (s TargetDescription) String() string

String returns the string representation

Validate

func (s *TargetDescription) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: