libZSservicesZSamazonka-configZSamazonka-config
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Config.DescribeComplianceByResource

Description

Indicates whether the specified Amazon Web Services resources are compliant. If a resource is noncompliant, this action returns the number of Config rules that the resource does not comply with.

A resource is compliant if it complies with all the Config rules that evaluate it. It is noncompliant if it does not comply with one or more of these rules.

If Config has no current evaluation results for the resource, it returns INSUFFICIENT_DATA. This result might indicate one of the following conditions about the rules that evaluate the resource:

  • Config has never invoked an evaluation for the rule. To check whether it has, use the DescribeConfigRuleEvaluationStatus action to get the LastSuccessfulInvocationTime and LastFailedInvocationTime.
  • The rule's Lambda function is failing to send evaluation results to Config. Verify that the role that you assigned to your configuration recorder includes the config:PutEvaluations permission. If the rule is a custom rule, verify that the Lambda execution role includes the config:PutEvaluations permission.
  • The rule's Lambda function has returned NOT_APPLICABLE for all evaluation results. This can occur if the resources were deleted or removed from the rule's scope.

This operation returns paginated results.

Synopsis

Creating a Request

data DescribeComplianceByResource Source #

See: newDescribeComplianceByResource smart constructor.

Constructors

DescribeComplianceByResource' 

Fields

  • resourceId :: Maybe Text

    The ID of the Amazon Web Services resource for which you want compliance information. You can specify only one resource ID. If you specify a resource ID, you must also specify a type for ResourceType.

  • resourceType :: Maybe Text

    The types of Amazon Web Services resources for which you want compliance information (for example, AWS::EC2::Instance). For this action, you can specify that the resource type is an Amazon Web Services account by specifying AWS::::Account.

  • complianceTypes :: Maybe [ComplianceType]

    Filters the results by compliance.

    The allowed values are COMPLIANT, NON_COMPLIANT, and INSUFFICIENT_DATA.

  • nextToken :: Maybe Text

    The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.

  • limit :: Maybe Natural

    The maximum number of evaluation results returned on each page. The default is 10. You cannot specify a number greater than 100. If you specify 0, Config uses the default.

Instances

Instances details
Eq DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

Read DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

Show DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

Generic DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

Associated Types

type Rep DescribeComplianceByResource :: Type -> Type #

NFData DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

Hashable DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

ToJSON DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

AWSPager DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

AWSRequest DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

ToHeaders DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

ToPath DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

ToQuery DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

type Rep DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

type Rep DescribeComplianceByResource = D1 ('MetaData "DescribeComplianceByResource" "Amazonka.Config.DescribeComplianceByResource" "libZSservicesZSamazonka-configZSamazonka-config" 'False) (C1 ('MetaCons "DescribeComplianceByResource'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "resourceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "resourceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "complianceTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ComplianceType])) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))))))
type AWSResponse DescribeComplianceByResource Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

newDescribeComplianceByResource :: DescribeComplianceByResource Source #

Create a value of DescribeComplianceByResource 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:resourceId:DescribeComplianceByResource', describeComplianceByResource_resourceId - The ID of the Amazon Web Services resource for which you want compliance information. You can specify only one resource ID. If you specify a resource ID, you must also specify a type for ResourceType.

$sel:resourceType:DescribeComplianceByResource', describeComplianceByResource_resourceType - The types of Amazon Web Services resources for which you want compliance information (for example, AWS::EC2::Instance). For this action, you can specify that the resource type is an Amazon Web Services account by specifying AWS::::Account.

$sel:complianceTypes:DescribeComplianceByResource', describeComplianceByResource_complianceTypes - Filters the results by compliance.

The allowed values are COMPLIANT, NON_COMPLIANT, and INSUFFICIENT_DATA.

$sel:nextToken:DescribeComplianceByResource', describeComplianceByResource_nextToken - The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.

$sel:limit:DescribeComplianceByResource', describeComplianceByResource_limit - The maximum number of evaluation results returned on each page. The default is 10. You cannot specify a number greater than 100. If you specify 0, Config uses the default.

Request Lenses

describeComplianceByResource_resourceId :: Lens' DescribeComplianceByResource (Maybe Text) Source #

The ID of the Amazon Web Services resource for which you want compliance information. You can specify only one resource ID. If you specify a resource ID, you must also specify a type for ResourceType.

describeComplianceByResource_resourceType :: Lens' DescribeComplianceByResource (Maybe Text) Source #

The types of Amazon Web Services resources for which you want compliance information (for example, AWS::EC2::Instance). For this action, you can specify that the resource type is an Amazon Web Services account by specifying AWS::::Account.

describeComplianceByResource_complianceTypes :: Lens' DescribeComplianceByResource (Maybe [ComplianceType]) Source #

Filters the results by compliance.

The allowed values are COMPLIANT, NON_COMPLIANT, and INSUFFICIENT_DATA.

describeComplianceByResource_nextToken :: Lens' DescribeComplianceByResource (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.

describeComplianceByResource_limit :: Lens' DescribeComplianceByResource (Maybe Natural) Source #

The maximum number of evaluation results returned on each page. The default is 10. You cannot specify a number greater than 100. If you specify 0, Config uses the default.

Destructuring the Response

data DescribeComplianceByResourceResponse Source #

Constructors

DescribeComplianceByResourceResponse' 

Fields

Instances

Instances details
Eq DescribeComplianceByResourceResponse Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

Read DescribeComplianceByResourceResponse Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

Show DescribeComplianceByResourceResponse Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

Generic DescribeComplianceByResourceResponse Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

NFData DescribeComplianceByResourceResponse Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

type Rep DescribeComplianceByResourceResponse Source # 
Instance details

Defined in Amazonka.Config.DescribeComplianceByResource

type Rep DescribeComplianceByResourceResponse = D1 ('MetaData "DescribeComplianceByResourceResponse" "Amazonka.Config.DescribeComplianceByResource" "libZSservicesZSamazonka-configZSamazonka-config" 'False) (C1 ('MetaCons "DescribeComplianceByResourceResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "complianceByResources") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ComplianceByResource])) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newDescribeComplianceByResourceResponse Source #

Create a value of DescribeComplianceByResourceResponse 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:complianceByResources:DescribeComplianceByResourceResponse', describeComplianceByResourceResponse_complianceByResources - Indicates whether the specified Amazon Web Services resource complies with all of the Config rules that evaluate it.

$sel:nextToken:DescribeComplianceByResource', describeComplianceByResourceResponse_nextToken - The string that you use in a subsequent request to get the next page of results in a paginated response.

$sel:httpStatus:DescribeComplianceByResourceResponse', describeComplianceByResourceResponse_httpStatus - The response's http status code.

Response Lenses

describeComplianceByResourceResponse_complianceByResources :: Lens' DescribeComplianceByResourceResponse (Maybe [ComplianceByResource]) Source #

Indicates whether the specified Amazon Web Services resource complies with all of the Config rules that evaluate it.

describeComplianceByResourceResponse_nextToken :: Lens' DescribeComplianceByResourceResponse (Maybe Text) Source #

The string that you use in a subsequent request to get the next page of results in a paginated response.