deleteService method
Deletes a specified service and all associated service attributes. If the service still contains one or more registered instances, the request fails.
May throw InvalidInput.
May throw ResourceInUse.
May throw ServiceNotFound.
Parameter id :
The ID or Amazon Resource Name (ARN) of the service that you want to
delete. If the namespace associated with the service is shared with your
Amazon Web Services account, specify the service ARN. For more information
about shared namespaces, see Cross-account
Cloud Map namespace sharing.
Implementation
Future<void> deleteService({
required String id,
}) async {
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,
},
);
}