deleteServiceAttributes

Deletes specific attributes associated with a service.

Samples


fun main() { 
   //sampleStart 
   // Example Delete service attribute by providing attribute key and service ID
val resp = serviceDiscoveryClient.deleteServiceAttributes {
    attributes = listOf<String>(
        "port"
    )
    serviceId = "srv-e4anhexample0004"
} 
   //sampleEnd
}

fun main() { 
   //sampleStart 
   // Deletes service attributes using a service ARN instead of service ID, useful for cross account
// scenarios or when working with shared namespaces.
val resp = serviceDiscoveryClient.deleteServiceAttributes {
    serviceId = "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678"
    attributes = listOf<String>(
        "Port"
    )
} 
   //sampleEnd
}