deleteService method

Future<void> deleteService({
  1. required String id,
})

Deletes a specified service. If the service still contains one or more registered instances, the request fails.

May throw InvalidInput. May throw ServiceNotFound. May throw ResourceInUse.

Parameter id : The ID of the service that you want to delete.

Implementation

Future<void> deleteService({
  required String id,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  _s.validateStringLength(
    'id',
    id,
    0,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53AutoNaming_v20170314.DeleteService'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
    },
  );
}