Removes one or more tags from the specified load balancer.
Parameters:
-
load_balancer_names
(LoadBalancerNames)
–
The name of the load balancer. You can specify a maximum of one load balancer name.
-
tags
(TagKeyList)
–
The list of tag keys to remove.
Raises:
Examples:
To remove tags from a load balancer
This example removes the specified tag from the specified load balancer.
>>> client.remove_tags(load_balancer_names=['my-load-balancer'], tags=[{'Key': 'project'}])
Source code in docs_src/capo_elastic_load_balancing/_services/elastic_load_balancing.py
| def remove_tags(
self,
load_balancer_names: "capo_elastic_load_balancing.types.load_balancer_names.LoadBalancerNames",
tags: "capo_elastic_load_balancing.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[ElasticLoadBalancingClientConfig] = None,
) -> "capo_elastic_load_balancing.types.remove_tags_output.RemoveTagsOutput":
"""<p>Removes one or more tags from the specified load balancer.</p>
Args:
load_balancer_names: <p>The name of the load balancer. You can specify a maximum of one load balancer name.</p>
tags: <p>The list of tag keys to remove.</p>
Raises:
capo_elastic_load_balancing.errors.access_point_not_found_exception.AccessPointNotFoundException: <p>The specified load balancer does not exist.</p>
capo_elastic_load_balancing.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To remove tags from a load balancer
This example removes the specified tag from the specified load balancer.
>>> client.remove_tags(load_balancer_names=['my-load-balancer'], tags=[{'Key': 'project'}])
"""
def _handler(
req: "OperationRequest[capo_elastic_load_balancing.types.remove_tags_input.RemoveTagsInput]",
) -> OperationResponse[
"capo_elastic_load_balancing.types.remove_tags_output.RemoveTagsOutput"
]:
import capo_elastic_load_balancing._operations.elastic_load_balancing_v7.remove_tags
output, http_response = (
capo_elastic_load_balancing._operations.elastic_load_balancing_v7.remove_tags.remove_tags(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RemoveTags")
)
input_: capo_elastic_load_balancing.types.remove_tags_input.RemoveTagsInput = {
"load_balancer_names": load_balancer_names,
"tags": tags,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|