Skip to content

remove_tags async

remove_tags(
    load_balancer_names: LoadBalancerNames,
    tags: TagKeyList,
    *,
    config_overrides: Optional[AsyncElasticLoadBalancingClientConfig] = None,
) -> RemoveTagsOutput

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.

>>> await client.remove_tags(load_balancer_names=['my-load-balancer'], tags=[{'Key': 'project'}])
Source code in docs_src/capo_elastic_load_balancing/_services/async_elastic_load_balancing.py
async 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[AsyncElasticLoadBalancingClientConfig] = 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.

        >>> await client.remove_tags(load_balancer_names=['my-load-balancer'], tags=[{'Key': 'project'}])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elastic_load_balancing.types.remove_tags_input.RemoveTagsInput]",
    ) -> AsyncOperationResponse[
        "capo_elastic_load_balancing.types.remove_tags_output.RemoveTagsOutput"
    ]:
        import capo_elastic_load_balancing._operations.elastic_load_balancing_v7.remove_tags

        (
            output,
            http_response,
        ) = await capo_elastic_load_balancing._operations.elastic_load_balancing_v7.remove_tags.async_remove_tags(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output