ListProtectionGroups - AWS Shield Advanced

ListProtectionGroups

Retrieves the ProtectionGroup objects for the account.

Request Syntax

{ "MaxResults": number, "NextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

MaxResults

The maximum number of ProtectionGroup objects to return. If you leave this blank, Shield Advanced returns the first 20 results.

This is a maximum value. Shield Advanced might return the results in smaller batches. That is, the number of objects returned could be less than MaxResults, even if there are still more objects yet to return. If there are more objects to return, Shield Advanced returns a value in NextToken that you can use in your next request, to get the next batch of objects.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 10000.

Required: No

NextToken

The next token value from a previous call to ListProtectionGroups. Pass null if this is the first call.

Type: String

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

Pattern: ^.*$

Required: No

Response Syntax

{ "NextToken": "string", "ProtectionGroups": [ { "Aggregation": "string", "Members": [ "string" ], "Pattern": "string", "ProtectionGroupId": "string", "ResourceType": "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.

NextToken

If you specify a value for MaxResults and you have more protection groups than the value of MaxResults, AWS Shield Advanced returns this token that you can use in your next request, to get the next batch of objects.

Type: String

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

Pattern: ^.*$

ProtectionGroups

Type: Array of ProtectionGroup objects

Errors

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

InternalErrorException

Exception that indicates that a problem occurred with the service infrastructure. You can retry the request.

HTTP Status Code: 500

InvalidPaginationTokenException

Exception that indicates that the NextToken specified in the request is invalid. Submit the request using the NextToken value that was returned in the response.

HTTP Status Code: 400

ResourceNotFoundException

Exception indicating the specified resource does not exist. If available, this exception includes details in additional properties.

HTTP Status Code: 400

See Also

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