delete_service(**kwargs)¶Deletes a specified service. If the service still contains one or more registered instances, the request fails.
See also: AWS API Documentation
Request Syntax
response = client.delete_service(
Id='string'
)
[REQUIRED]
The ID of the service that you want to delete.
{}
Response Structure
Exceptions
ServiceDiscovery.Client.exceptions.InvalidInputServiceDiscovery.Client.exceptions.ServiceNotFoundServiceDiscovery.Client.exceptions.ResourceInUseServiceDiscovery.Client.exceptions.RequestLimitExceededExamples
Example: Delete service
response = client.delete_service(
Id='srv-p5zdwlg5uvvzjita',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}