ListTargetGroups - Amazon VPC Lattice


Lists your target groups. You can narrow your search by using the filters below in your request.

Request Syntax

GET /targetgroups?maxResults=maxResults&nextToken=nextToken&targetGroupType=targetGroupType&vpcIdentifier=vpcIdentifier HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.


The maximum number of results to return.

Valid Range: Minimum value of 1. Maximum value of 100.


A pagination token for the next page of results.

Length Constraints: Minimum length of 1. Maximum length of 2048.


The target group type.

Valid Values: IP | LAMBDA | INSTANCE | ALB


The ID or Amazon Resource Name (ARN) of the VPC.

Length Constraints: Minimum length of 5. Maximum length of 50.

Pattern: ^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "items": [ { "arn": "string", "createdAt": "string", "id": "string", "ipAddressType": "string", "lambdaEventStructureVersion": "string", "lastUpdatedAt": "string", "name": "string", "port": number, "protocol": "string", "serviceArns": [ "string" ], "status": "string", "type": "string", "vpcIdentifier": "string" } ], "nextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


Information about the target groups.

Type: Array of TargetGroupSummary objects


If there are additional results, a pagination token for the next page of results.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.


For information about the errors that are common to all actions, see Common Errors.


The user does not have sufficient access to perform this action.

HTTP Status Code: 403


An unexpected error occurred while processing the request.

HTTP Status Code: 500


The limit on the number of requests per second was exceeded.

HTTP Status Code: 429


The input does not satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: