deleteService

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

Samples

// Example Delete service
val resp = serviceDiscoveryClient.deleteService {
    id = "srv-p5zdwlg5uvvzjita"
}
// Deletes a service using a service ARN instead of service ID, useful when working with shared
// namespaces.
val resp = serviceDiscoveryClient.deleteService {
    id = "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678"
}