ListProtections - AWS Shield Advanced


Lists all Protection 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.


The maximum number of Protection 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


The ListProtectionsRequest.NextToken value from a previous call to ListProtections. 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", "Protections": [ { "HealthCheckIds": [ "string" ], "Id": "string", "Name": "string", "ProtectionArn": "string", "ResourceArn": "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.


If you specify a value for MaxResults and you have more Protections than the value of MaxResults, AWS Shield Advanced returns a NextToken value in the response that allows you to list another group of Protections. For the second and subsequent ListProtections requests, specify the value of NextToken from the previous response to get information about another batch of Protections.

Shield Advanced might return the list of Protection objects in batches smaller than the number specified by MaxResults. If there are more Protection objects to return, Shield Advanced will always also return a NextToken.

Type: String

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

Pattern: ^.*$


The array of enabled Protection objects.

Type: Array of Protection objects


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


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

HTTP Status Code: 500


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


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: