ListControls - AWS Control Catalog

ListControls

Returns a paginated list of all available controls in the AWS Control Catalog library. Allows you to discover available controls. The list of controls is given as structures of type controlSummary. The ARN is returned in the global controlcatalog format, as shown in the examples.

Request Syntax

POST /list-controls?maxResults=MaxResults&nextToken=NextToken HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

MaxResults

The maximum number of results on a page or for an API request call.

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

NextToken

The pagination token that's used to fetch the next set of results.

Length Constraints: Minimum length of 0. Maximum length of 1024.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Controls": [ { "Arn": "string", "Description": "string", "Name": "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.

Controls

Returns a list of controls, given as structures of type controlSummary.

Type: Array of ControlSummary objects

NextToken

The pagination token that's used to fetch the next set of results.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Errors

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

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

InternalServerException

An internal service error occurred during the processing of your request. Try again later.

HTTP Status Code: 500

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 429

ValidationException

The request has invalid or missing parameters.

HTTP Status Code: 400

Examples

Retrieve a list of controls

Use this operation to retrieve a paginated list of available controls, by Region.

Sample Request

aws controlcatalog list-controls --max-result 2 --region us-east-1

Sample Response

{ "Controls": [ { "Arn": "arn:aws:controlcatalog:::control/4b0nsxnd47747up54ytdqesxi", "Name": "Require any AWS CodeBuild project environment to have logging configured", "Description": "This control checks whether AWS CodeBuild projects environment has at least one logging option enabled." }, { "Arn": "arn:aws:controlcatalog:::control/7rrde1yjxvdp8hyfina89c07z", "Name": "ECS containers should run as non-privileged", "Description": "This control checks if the privileged parameter in the container definition of Amazon ECS task definitions is set to 'true'. This control fails if this parameter is equal to 'true'." } ], "NextToken": "..." }

See Also

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