GetComplianceSummaryByResourceType
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.
Request Syntax
{
"ResourceTypes": [ "string
" ]
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- ResourceTypes
-
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 AWS resource type such as
AWS::EC2::Instance
. You can specify that the resource type is an AWS account by specifyingAWS::::Account
.Type: Array of strings
Array Members: Minimum number of 0 items. Maximum number of 20 items.
Length Constraints: Minimum length of 1. Maximum length of 256.
Required: No
Response Syntax
{
"ComplianceSummariesByResourceType": [
{
"ComplianceSummary": {
"ComplianceSummaryTimestamp": number,
"CompliantResourceCount": {
"CapExceeded": boolean,
"CappedCount": number
},
"NonCompliantResourceCount": {
"CapExceeded": boolean,
"CappedCount": number
}
},
"ResourceType": "string"
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- ComplianceSummariesByResourceType
-
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.
Type: Array of ComplianceSummaryByResourceType objects
Errors
For information about the errors that are common to all actions, see Common Errors.
- InvalidParameterValueException
-
One or more of the specified parameters are not valid. Verify that your parameters are valid and try again.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: