| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.Config.DescribeComplianceByConfigRule
Description
Indicates whether the specified Config rules are compliant. If a rule is noncompliant, this action returns the number of Amazon Web Services resources that do not comply with the rule.
A rule is compliant if all of the evaluated resources comply with it. It is noncompliant if any of these resources do not comply.
If Config has no current evaluation results for the rule, it returns
INSUFFICIENT_DATA. This result might indicate one of the following
conditions:
- Config has never invoked an evaluation for the rule. To check
whether it has, use the
DescribeConfigRuleEvaluationStatusaction to get theLastSuccessfulInvocationTimeandLastFailedInvocationTime. - The rule's Lambda function is failing to send evaluation results to
Config. Verify that the role you assigned to your configuration
recorder includes the
config:PutEvaluationspermission. If the rule is a custom rule, verify that the Lambda execution role includes theconfig:PutEvaluationspermission. - The rule's Lambda function has returned
NOT_APPLICABLEfor all evaluation results. This can occur if the resources were deleted or removed from the rule's scope.
This operation returns paginated results.
Synopsis
- data DescribeComplianceByConfigRule = DescribeComplianceByConfigRule' {
- complianceTypes :: Maybe [ComplianceType]
- configRuleNames :: Maybe [Text]
- nextToken :: Maybe Text
- newDescribeComplianceByConfigRule :: DescribeComplianceByConfigRule
- describeComplianceByConfigRule_complianceTypes :: Lens' DescribeComplianceByConfigRule (Maybe [ComplianceType])
- describeComplianceByConfigRule_configRuleNames :: Lens' DescribeComplianceByConfigRule (Maybe [Text])
- describeComplianceByConfigRule_nextToken :: Lens' DescribeComplianceByConfigRule (Maybe Text)
- data DescribeComplianceByConfigRuleResponse = DescribeComplianceByConfigRuleResponse' {}
- newDescribeComplianceByConfigRuleResponse :: Int -> DescribeComplianceByConfigRuleResponse
- describeComplianceByConfigRuleResponse_complianceByConfigRules :: Lens' DescribeComplianceByConfigRuleResponse (Maybe [ComplianceByConfigRule])
- describeComplianceByConfigRuleResponse_nextToken :: Lens' DescribeComplianceByConfigRuleResponse (Maybe Text)
- describeComplianceByConfigRuleResponse_httpStatus :: Lens' DescribeComplianceByConfigRuleResponse Int
Creating a Request
data DescribeComplianceByConfigRule Source #
See: newDescribeComplianceByConfigRule smart constructor.
Constructors
| DescribeComplianceByConfigRule' | |
Fields
| |
Instances
newDescribeComplianceByConfigRule :: DescribeComplianceByConfigRule Source #
Create a value of DescribeComplianceByConfigRule 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:complianceTypes:DescribeComplianceByConfigRule', describeComplianceByConfigRule_complianceTypes - Filters the results by compliance.
The allowed values are COMPLIANT and NON_COMPLIANT.
DescribeComplianceByConfigRule, describeComplianceByConfigRule_configRuleNames - Specify one or more Config rule names to filter the results by rule.
DescribeComplianceByConfigRule, describeComplianceByConfigRule_nextToken - The nextToken string returned on a previous page that you use to get
the next page of results in a paginated response.
Request Lenses
describeComplianceByConfigRule_complianceTypes :: Lens' DescribeComplianceByConfigRule (Maybe [ComplianceType]) Source #
Filters the results by compliance.
The allowed values are COMPLIANT and NON_COMPLIANT.
describeComplianceByConfigRule_configRuleNames :: Lens' DescribeComplianceByConfigRule (Maybe [Text]) Source #
Specify one or more Config rule names to filter the results by rule.
describeComplianceByConfigRule_nextToken :: Lens' DescribeComplianceByConfigRule (Maybe Text) Source #
The nextToken string returned on a previous page that you use to get
the next page of results in a paginated response.
Destructuring the Response
data DescribeComplianceByConfigRuleResponse Source #
See: newDescribeComplianceByConfigRuleResponse smart constructor.
Constructors
| DescribeComplianceByConfigRuleResponse' | |
Fields
| |
Instances
newDescribeComplianceByConfigRuleResponse Source #
Arguments
| :: Int | |
| -> DescribeComplianceByConfigRuleResponse |
Create a value of DescribeComplianceByConfigRuleResponse 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:complianceByConfigRules:DescribeComplianceByConfigRuleResponse', describeComplianceByConfigRuleResponse_complianceByConfigRules - Indicates whether each of the specified Config rules is compliant.
DescribeComplianceByConfigRule, describeComplianceByConfigRuleResponse_nextToken - The string that you use in a subsequent request to get the next page of
results in a paginated response.
$sel:httpStatus:DescribeComplianceByConfigRuleResponse', describeComplianceByConfigRuleResponse_httpStatus - The response's http status code.
Response Lenses
describeComplianceByConfigRuleResponse_complianceByConfigRules :: Lens' DescribeComplianceByConfigRuleResponse (Maybe [ComplianceByConfigRule]) Source #
Indicates whether each of the specified Config rules is compliant.
describeComplianceByConfigRuleResponse_nextToken :: Lens' DescribeComplianceByConfigRuleResponse (Maybe Text) Source #
The string that you use in a subsequent request to get the next page of results in a paginated response.
describeComplianceByConfigRuleResponse_httpStatus :: Lens' DescribeComplianceByConfigRuleResponse Int Source #
The response's http status code.