deleteServiceLinkedConfigurationRecorder method

Future<DeleteServiceLinkedConfigurationRecorderResponse> deleteServiceLinkedConfigurationRecorder({
  1. String? arn,
  2. String? servicePrincipal,
})

Deletes an existing service-linked configuration recorder.

This operation does not delete the configuration information that was previously recorded. You will be able to access the previously recorded information by using the GetResourceConfigHistory operation, but you will not be able to access this information in the Config console until you have created a new service-linked configuration recorder for the same service.

The recording scope is set by the service that is linked to the configuration recorder and determines whether you receive configuration items (CIs) in the delivery channel. If the recording scope is internal, you will not receive CIs in the delivery channel.

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

Parameter arn : The Amazon Resource Name (ARN) of the service-linked configuration recorder that you want to delete. For third-party service-linked configuration recorders, you must use Arn. You must specify exactly one of Arn or ServicePrincipal.

Parameter servicePrincipal : The service principal of the Amazon Web Services service for the service-linked configuration recorder that you want to delete. This field is only supported for Amazon Web Services service principals. For third-party service-linked configuration recorders, use Arn instead.

Implementation

Future<DeleteServiceLinkedConfigurationRecorderResponse>
    deleteServiceLinkedConfigurationRecorder({
  String? arn,
  String? servicePrincipal,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'StarlingDoveService.DeleteServiceLinkedConfigurationRecorder'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (arn != null) 'Arn': arn,
      if (servicePrincipal != null) 'ServicePrincipal': servicePrincipal,
    },
  );

  return DeleteServiceLinkedConfigurationRecorderResponse.fromJson(
      jsonResponse.body);
}