deleteDeliveryChannel method

Future<void> deleteDeliveryChannel({
  1. required String deliveryChannelName,
})

Deletes the delivery channel.

Before you can delete the delivery channel, you must stop the configuration recorder by using the StopConfigurationRecorder action.

May throw NoSuchDeliveryChannelException. May throw LastDeliveryChannelDeleteFailedException.

Parameter deliveryChannelName : The name of the delivery channel to delete.

Implementation

Future<void> deleteDeliveryChannel({
  required String deliveryChannelName,
}) async {
  ArgumentError.checkNotNull(deliveryChannelName, 'deliveryChannelName');
  _s.validateStringLength(
    'deliveryChannelName',
    deliveryChannelName,
    1,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.DeleteDeliveryChannel'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DeliveryChannelName': deliveryChannelName,
    },
  );
}