Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Get all rules for a detector (paginated) if ruleId
and ruleVersion
are not specified. Gets all rules for the detector and the ruleId
if
present (paginated). Gets a specific rule if both the ruleId
and the
ruleVersion
are specified.
This is a paginated API. Providing null maxResults results in retrieving maximum of 100 records per page. If you provide maxResults the value must be between 50 and 100. To get the next page result, a provide a pagination token from GetRulesResult as part of your request. Null pagination token fetches the records from the beginning.
Synopsis
- data GetRules = GetRules' {
- ruleVersion :: Maybe Text
- ruleId :: Maybe Text
- nextToken :: Maybe Text
- maxResults :: Maybe Natural
- detectorId :: Text
- newGetRules :: Text -> GetRules
- getRules_ruleVersion :: Lens' GetRules (Maybe Text)
- getRules_ruleId :: Lens' GetRules (Maybe Text)
- getRules_nextToken :: Lens' GetRules (Maybe Text)
- getRules_maxResults :: Lens' GetRules (Maybe Natural)
- getRules_detectorId :: Lens' GetRules Text
- data GetRulesResponse = GetRulesResponse' {
- ruleDetails :: Maybe [RuleDetail]
- nextToken :: Maybe Text
- httpStatus :: Int
- newGetRulesResponse :: Int -> GetRulesResponse
- getRulesResponse_ruleDetails :: Lens' GetRulesResponse (Maybe [RuleDetail])
- getRulesResponse_nextToken :: Lens' GetRulesResponse (Maybe Text)
- getRulesResponse_httpStatus :: Lens' GetRulesResponse Int
Creating a Request
See: newGetRules
smart constructor.
GetRules' | |
|
Instances
Create a value of GetRules
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:ruleVersion:GetRules'
, getRules_ruleVersion
- The rule version.
$sel:ruleId:GetRules'
, getRules_ruleId
- The rule ID.
$sel:nextToken:GetRules'
, getRules_nextToken
- The next page token.
$sel:maxResults:GetRules'
, getRules_maxResults
- The maximum number of rules to return for the request.
$sel:detectorId:GetRules'
, getRules_detectorId
- The detector ID.
Request Lenses
getRules_maxResults :: Lens' GetRules (Maybe Natural) Source #
The maximum number of rules to return for the request.
Destructuring the Response
data GetRulesResponse Source #
See: newGetRulesResponse
smart constructor.
GetRulesResponse' | |
|
Instances
Create a value of GetRulesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:ruleDetails:GetRulesResponse'
, getRulesResponse_ruleDetails
- The details of the requested rule.
$sel:nextToken:GetRules'
, getRulesResponse_nextToken
- The next page token to be used in subsequent requests.
$sel:httpStatus:GetRulesResponse'
, getRulesResponse_httpStatus
- The response's http status code.
Response Lenses
getRulesResponse_ruleDetails :: Lens' GetRulesResponse (Maybe [RuleDetail]) Source #
The details of the requested rule.
getRulesResponse_nextToken :: Lens' GetRulesResponse (Maybe Text) Source #
The next page token to be used in subsequent requests.
getRulesResponse_httpStatus :: Lens' GetRulesResponse Int Source #
The response's http status code.