Menu
AWS Shield Advanced
AWS Shield Advanced API Reference (API Version 2016-06-02)

ListProtections

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.

MaxResults

The maximum number of Protection objects to be returned. If this is left blank the first 20 results will be returned.

Type: Integer

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

Required: No

NextToken

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.

Required: No

Response Syntax

{ "NextToken": "string", "Protections": [ { "Id": "string", "Name": "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.

NextToken

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.

Type: String

Length Constraints: Minimum length of 1.

Protections

The array of enabled Protection objects.

Type: Array of Protection 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

ResourceNotFoundException

Exception indicating the specified resource does not exist.

HTTP Status Code: 400

See Also

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