describeRemediationExecutionStatus method

Future<DescribeRemediationExecutionStatusResponse> describeRemediationExecutionStatus({
  1. required String configRuleName,
  2. int? limit,
  3. String? nextToken,
  4. List<ResourceKey>? resourceKeys,
})

Provides a detailed view of a Remediation Execution for a set of resources including state, timestamps for when steps for the remediation execution occur, and any error messages for steps that have failed. When you specify the limit and the next token, you receive a paginated response.

May throw NoSuchRemediationConfigurationException. May throw InvalidNextTokenException.

Parameter configRuleName : A list of AWS Config rule names.

Parameter limit : The maximum number of RemediationExecutionStatuses returned on each page. The default is maximum. If you specify 0, AWS Config uses the default.

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 resourceKeys : A list of resource keys to be processed with the current request. Each element in the list consists of the resource type and resource ID.

Implementation

Future<DescribeRemediationExecutionStatusResponse>
    describeRemediationExecutionStatus({
  required String configRuleName,
  int? limit,
  String? nextToken,
  List<ResourceKey>? resourceKeys,
}) async {
  ArgumentError.checkNotNull(configRuleName, 'configRuleName');
  _s.validateStringLength(
    'configRuleName',
    configRuleName,
    1,
    128,
    isRequired: true,
  );
  _s.validateNumRange(
    'limit',
    limit,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.DescribeRemediationExecutionStatus'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConfigRuleName': configRuleName,
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
      if (resourceKeys != null) 'ResourceKeys': resourceKeys,
    },
  );

  return DescribeRemediationExecutionStatusResponse.fromJson(
      jsonResponse.body);
}