getComplianceSummaryByResourceType method

Future<GetComplianceSummaryByResourceTypeResponse> getComplianceSummaryByResourceType({
  1. List<String>? resourceTypes,
})

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.

May throw InvalidParameterValueException.

Parameter 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 specifying AWS::::Account.

Implementation

Future<GetComplianceSummaryByResourceTypeResponse>
    getComplianceSummaryByResourceType({
  List<String>? resourceTypes,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.GetComplianceSummaryByResourceType'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (resourceTypes != null) 'ResourceTypes': resourceTypes,
    },
  );

  return GetComplianceSummaryByResourceTypeResponse.fromJson(
      jsonResponse.body);
}