ConfigService / Paginator / DescribeComplianceByResource

DescribeComplianceByResource#

class ConfigService.Paginator.DescribeComplianceByResource#
paginator = client.get_paginator('describe_compliance_by_resource')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from ConfigService.Client.describe_compliance_by_resource().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ResourceType='string',
    ResourceId='string',
    ComplianceTypes=[
        'COMPLIANT'|'NON_COMPLIANT'|'NOT_APPLICABLE'|'INSUFFICIENT_DATA',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • ResourceType (string) – 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.

  • ResourceId (string) – 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.

  • ComplianceTypes (list) –

    Filters the results by compliance.

    • (string) –

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'ComplianceByResources': [
        {
            'ResourceType': 'string',
            'ResourceId': 'string',
            'Compliance': {
                'ComplianceType': 'COMPLIANT'|'NON_COMPLIANT'|'NOT_APPLICABLE'|'INSUFFICIENT_DATA',
                'ComplianceContributorCount': {
                    'CappedCount': 123,
                    'CapExceeded': True|False
                }
            }
        },
    ],

}

Response Structure

  • (dict) –

    • ComplianceByResources (list) –

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

      • (dict) –

        Indicates whether an Amazon Web Services resource that is evaluated according to one or more Config rules is compliant. A resource is compliant if it complies with all of the rules that evaluate it. A resource is noncompliant if it does not comply with one or more of these rules.

        • ResourceType (string) –

          The type of the Amazon Web Services resource that was evaluated.

        • ResourceId (string) –

          The ID of the Amazon Web Services resource that was evaluated.

        • Compliance (dict) –

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

          • ComplianceType (string) –

            Indicates whether an Amazon Web Services resource or Config rule is compliant.

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

            A rule is compliant if all of the resources that the rule evaluates comply with it. A rule is noncompliant if any of these resources do not comply.

            Config returns the INSUFFICIENT_DATA value when no evaluation results are available for the Amazon Web Services resource or Config rule.

            For the Compliance data type, Config supports only COMPLIANT, NON_COMPLIANT, and INSUFFICIENT_DATA values. Config does not support the NOT_APPLICABLE value for the Compliance data type.

          • ComplianceContributorCount (dict) –

            The number of Amazon Web Services resources or Config rules that cause a result of NON_COMPLIANT, up to a maximum number.

            • CappedCount (integer) –

              The number of Amazon Web Services resources or Config rules responsible for the current compliance of the item.

            • CapExceeded (boolean) –

              Indicates whether the maximum count is reached.