Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

delete_service

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'
)
Parameters
Id (string) --

[REQUIRED]

The ID of the service that you want to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • ServiceDiscovery.Client.exceptions.InvalidInput
  • ServiceDiscovery.Client.exceptions.ServiceNotFound
  • ServiceDiscovery.Client.exceptions.ResourceInUse

Examples

Example: Delete service

response = client.delete_service(
    Id='srv-p5zdwlg5uvvzjita',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}