describeOrganizationConfigRuleStatuses method

Future<DescribeOrganizationConfigRuleStatusesResponse> describeOrganizationConfigRuleStatuses({
  1. int? limit,
  2. String? nextToken,
  3. List<String>? organizationConfigRuleNames,
})

Provides organization config rule deployment status for an organization.

When you specify the limit and the next token, you receive a paginated response. Limit and next token are not applicable if you specify organization config rule names. It is only applicable, when you request all the organization config rules.

May throw NoSuchOrganizationConfigRuleException. May throw InvalidLimitException. May throw InvalidNextTokenException. May throw OrganizationAccessDeniedException.

Parameter limit : The maximum number of OrganizationConfigRuleStatuses returned on each page. If you do no specify a number, AWS Config uses the default. The default is 100.

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

Parameter organizationConfigRuleNames : The names of organization config rules for which you want status details. If you do not specify any names, AWS Config returns details for all your organization AWS Confg rules.

Implementation

Future<DescribeOrganizationConfigRuleStatusesResponse>
    describeOrganizationConfigRuleStatuses({
  int? limit,
  String? nextToken,
  List<String>? organizationConfigRuleNames,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'StarlingDoveService.DescribeOrganizationConfigRuleStatuses'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
      if (organizationConfigRuleNames != null)
        'OrganizationConfigRuleNames': organizationConfigRuleNames,
    },
  );

  return DescribeOrganizationConfigRuleStatusesResponse.fromJson(
      jsonResponse.body);
}