disassociateResourceTypes method

Future<DisassociateResourceTypesResponse> disassociateResourceTypes({
  1. required String configurationRecorderArn,
  2. required List<ResourceType> resourceTypes,
})

Removes all resource types specified in the ResourceTypes list from the RecordingGroup of configuration recorder and excludes these resource types when recording.

For this operation, the configuration recorder must use a RecordingStrategy that is either INCLUSION_BY_RESOURCE_TYPES or EXCLUSION_BY_RESOURCE_TYPES.

May throw ConflictException. May throw NoSuchConfigurationRecorderException. May throw ValidationException.

Parameter configurationRecorderArn : The Amazon Resource Name (ARN) of the specified configuration recorder.

Parameter resourceTypes : The list of resource types you want to remove from the recording group of the specified configuration recorder.

Implementation

Future<DisassociateResourceTypesResponse> disassociateResourceTypes({
  required String configurationRecorderArn,
  required List<ResourceType> resourceTypes,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.DisassociateResourceTypes'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConfigurationRecorderArn': configurationRecorderArn,
      'ResourceTypes': resourceTypes.map((e) => e.value).toList(),
    },
  );

  return DisassociateResourceTypesResponse.fromJson(jsonResponse.body);
}