Deletes the specified load balancer.
If you are attempting to recreate a load balancer, you must reconfigure all settings. The DNS name associated with a deleted load balancer are no longer usable. The name and associated DNS record of the deleted load balancer no longer exist and traffic sent to any of its IP addresses is no longer delivered to your instances.
If the load balancer does not exist or has already been deleted, the call to DeleteLoadBalancer still succeeds.
Parameters:
Raises:
Examples:
To delete a load balancer
This example deletes the specified load balancer.
>>> await client.delete_load_balancer(load_balancer_name='my-load-balancer')
Source code in docs_src/capo_elastic_load_balancing/_services/async_elastic_load_balancing.py
| async def delete_load_balancer(
self,
load_balancer_name: "capo_elastic_load_balancing.types.access_point_name.AccessPointName",
*,
config_overrides: Optional[AsyncElasticLoadBalancingClientConfig] = None,
) -> "capo_elastic_load_balancing.types.delete_access_point_output.DeleteAccessPointOutput":
"""<p>Deletes the specified load balancer.</p> <p>If you are attempting to recreate a load balancer, you must reconfigure all settings. The DNS name associated with a deleted load balancer are no longer usable. The name and associated DNS record of the deleted load balancer no longer exist and traffic sent to any of its IP addresses is no longer delivered to your instances.</p> <p>If the load balancer does not exist or has already been deleted, the call to <code>DeleteLoadBalancer</code> still succeeds.</p>
Args:
load_balancer_name: <p>The name of the load balancer.</p>
Raises:
capo_elastic_load_balancing.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete a load balancer
This example deletes the specified load balancer.
>>> await client.delete_load_balancer(load_balancer_name='my-load-balancer')
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_load_balancing.types.delete_access_point_input.DeleteAccessPointInput]",
) -> AsyncOperationResponse[
"capo_elastic_load_balancing.types.delete_access_point_output.DeleteAccessPointOutput"
]:
import capo_elastic_load_balancing._operations.elastic_load_balancing_v7.delete_load_balancer
(
output,
http_response,
) = await capo_elastic_load_balancing._operations.elastic_load_balancing_v7.delete_load_balancer.async_delete_load_balancer(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteLoadBalancer")
)
input_: capo_elastic_load_balancing.types.delete_access_point_input.DeleteAccessPointInput = {
"load_balancer_name": load_balancer_name
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|