Deletes the specified listener.
Alternatively, your listener is deleted when you delete the load balancer to which it is attached.
Parameters:
-
listener_arn
(Optional[ListenerArn], default:
None
)
–
The Amazon Resource Name (ARN) of the listener.
Raises:
Examples:
To delete a listener
This example deletes the specified listener.
>>> await client.delete_listener(listener_arn='arn:aws:elasticloadbalancing:ua-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2')
Source code in docs_src/capo_elastic_load_balancing_v2/_services/async_elastic_load_balancingv2.py
| async def delete_listener(
self,
*,
config_overrides: Optional[AsyncElasticLoadBalancingv2ClientConfig] = None,
listener_arn: Optional[
"capo_elastic_load_balancing_v2.types.listener_arn.ListenerArn"
] = None,
) -> "capo_elastic_load_balancing_v2.types.delete_listener_output.DeleteListenerOutput":
"""<p>Deletes the specified listener.</p> <p>Alternatively, your listener is deleted when you delete the load balancer to which it is attached.</p>
Args:
listener_arn: <p>The Amazon Resource Name (ARN) of the listener.</p>
Raises:
capo_elastic_load_balancing_v2.errors.listener_not_found_exception.ListenerNotFoundException: <p>The specified listener does not exist.</p>
capo_elastic_load_balancing_v2.errors.resource_in_use_exception.ResourceInUseException: <p>A specified resource is in use.</p>
capo_elastic_load_balancing_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete a listener
This example deletes the specified listener.
>>> await client.delete_listener(listener_arn='arn:aws:elasticloadbalancing:ua-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2')
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_load_balancing_v2.types.delete_listener_input.DeleteListenerInput]",
) -> AsyncOperationResponse[
"capo_elastic_load_balancing_v2.types.delete_listener_output.DeleteListenerOutput"
]:
import capo_elastic_load_balancing_v2._operations.elastic_load_balancing_v10.delete_listener
(
output,
http_response,
) = await capo_elastic_load_balancing_v2._operations.elastic_load_balancing_v10.delete_listener.async_delete_listener(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteListener")
)
input_: capo_elastic_load_balancing_v2.types.delete_listener_input.DeleteListenerInput = {}
if listener_arn is not None:
input_["listener_arn"] = listener_arn
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|