delete_service_attributes
async
¶
delete_service_attributes(
service_id: Arn,
attributes: ServiceAttributeKeyList,
*,
config_overrides: Optional[AsyncServiceDiscoveryClientConfig] = None,
) -> DeleteServiceAttributesResponse
Deletes specific attributes associated with a service.
Parameters:
-
service_id(Arn) –The ID or Amazon Resource Name (ARN) of the service from which the attributes will be deleted. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
-
attributes(ServiceAttributeKeyList) –A list of keys corresponding to each attribute that you want to delete.
Raises:
-
InvalidInput–One or more specified values aren't valid. For example, a required value might be missing, a numeric value might be outside the allowed range, or a string value might exceed length constraints.
-
ServiceNotFound–No service exists with the specified ID.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
DeleteServiceAttributes example Example: Delete service attribute by providing attribute key and service ID
>>> await client.delete_service_attributes(attributes=['port'], service_id='srv-e4anhexample0004')
Delete service attributes using service ARN
Deletes service attributes using a service ARN instead of service ID, useful for cross-account scenarios or when working with shared namespaces.
>>> await client.delete_service_attributes(service_id='arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678', attributes=['Port'])