View a markdown version of this page

ListCustomDetectionRules - Amazon GuardDuty

ListCustomDetectionRules

Returns all available custom detection rules in GuardDuty. You can filter the results by data source, severity, tactic, technique, and service.

Request Syntax

POST /custom-detection-rule/rule HTTP/1.1 Content-type: application/json { "filters": [ { "condition": "string", "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

filters

A list of filter criteria to apply when listing custom detection rules.

Type: Array of DetectionRuleFilter objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

Required: No

maxResults

The maximum number of results to return in a single page. Minimum value of 1, maximum value of 100.

Type: Integer

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

Required: No

nextToken

A pagination token from a previous response. Use this token to retrieve the next page of results.

Type: String

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "nextToken": "string", "rules": [ { "arn": "string", "createdAt": number, "dataSource": "string", "description": "string", "language": "string", "name": "string", "ruleId": "string", "schema": "string", "service": "string", "severity": "string", "tactic": "string", "technique": "string", "updatedAt": number } ] }

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

A pagination token to retrieve the next page of results. If this field is empty, there are no additional results.

Type: String

rules

A list of custom detection rule summaries.

Type: Array of RuleSummary objects

Errors

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

AccessDeniedException

An access denied exception object.

Message

The error message.

Type

The error type.

HTTP Status Code: 403

BadRequestException

A bad request exception object.

Message

The error message.

Type

The error type.

HTTP Status Code: 400

InternalServerErrorException

An internal server error exception object.

Message

The error message.

Type

The error type.

HTTP Status Code: 500

See Also

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