Skip to content
v2.278.0

TargetProperty Struct ​

Describes a target.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_vpclattice as vpclattice } from 'aws-cdk-lib';
const targetProperty: vpclattice.CfnTargetGroup.TargetProperty = {
  id: 'id',

  // the properties below are optional
  port: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_vpclattice as vpclattice

target_property = vpclattice.CfnTargetGroup.TargetProperty(
    id="id",

    # the properties below are optional
    port=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.vpclattice.*;

TargetProperty targetProperty = TargetProperty.builder()
        .id("id")

        // the properties below are optional
        .port(123)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.VpcLattice;

var targetProperty = new TargetProperty {
    Id = "id",

    // the properties below are optional
    Port = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

targetProperty := &TargetProperty{
	Id: jsii.String("id"),

	// the properties below are optional
	Port: jsii.Number(123),
}

Properties ​

idstringidstridStringIdstringId*string required #
The ID of the target.
notes

If the target group type is INSTANCE , this is an instance ID. If the target group type is IP , this is an IP address. If the target group type is LAMBDA , this is the ARN of a Lambda function. If the target group type is ALB , this is the ARN of an Application Load Balancer.

portoptionalnumberportoptionalint | floatportoptionalNumberPortoptionaldoublePortoptional*float64 #
The port on which the target is listening.

For HTTP, the default is 80. For HTTPS, the default is 443.