ConfigService / Client / get_compliance_summary_by_resource_type

get_compliance_summary_by_resource_type#

ConfigService.Client.get_compliance_summary_by_resource_type(**kwargs)#

Returns the number of resources that are compliant and the number that are noncompliant. You can specify one or more resource types to get these numbers for each resource type. The maximum number returned is 100.

See also: AWS API Documentation

Request Syntax

response = client.get_compliance_summary_by_resource_type(
    ResourceTypes=[
        'string',
    ]
)
Parameters:

ResourceTypes (list) –

Specify one or more resource types to get the number of resources that are compliant and the number that are noncompliant for each resource type.

For this request, you can specify an Amazon Web Services resource type such as AWS::EC2::Instance. You can specify that the resource type is an Amazon Web Services account by specifying AWS::::Account.

  • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'ComplianceSummariesByResourceType': [
        {
            'ResourceType': 'string',
            'ComplianceSummary': {
                'CompliantResourceCount': {
                    'CappedCount': 123,
                    'CapExceeded': True|False
                },
                'NonCompliantResourceCount': {
                    'CappedCount': 123,
                    'CapExceeded': True|False
                },
                'ComplianceSummaryTimestamp': datetime(2015, 1, 1)
            }
        },
    ]
}

Response Structure

  • (dict) –

    • ComplianceSummariesByResourceType (list) –

      The number of resources that are compliant and the number that are noncompliant. If one or more resource types were provided with the request, the numbers are returned for each resource type. The maximum number returned is 100.

      • (dict) –

        The number of Amazon Web Services resources of a specific type that are compliant or noncompliant, up to a maximum of 100 for each.

        • ResourceType (string) –

          The type of Amazon Web Services resource.

        • ComplianceSummary (dict) –

          The number of Amazon Web Services resources that are compliant or noncompliant, up to a maximum of 100 for each.

          • CompliantResourceCount (dict) –

            The number of Config rules or Amazon Web Services resources that are compliant, up to a maximum of 25 for rules and 100 for resources.

            • 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.

          • NonCompliantResourceCount (dict) –

            The number of Config rules or Amazon Web Services resources that are noncompliant, up to a maximum of 25 for rules and 100 for resources.

            • 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.

          • ComplianceSummaryTimestamp (datetime) –

            The time that Config created the compliance summary.

Exceptions