Skip to content

describe_load_balancers

describe_load_balancers(
    *,
    config_overrides: Optional[ElasticLoadBalancingClientConfig] = None,
    load_balancer_names: Optional[LoadBalancerNames] = None,
    marker: Optional[Marker] = None,
    page_size: Optional[PageSize] = None,
) -> DescribeAccessPointsOutput

Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.

Parameters:

  • load_balancer_names (Optional[LoadBalancerNames], default: None ) –

    The names of the load balancers.

  • marker (Optional[Marker], default: None ) –

    The marker for the next set of results. (You received this marker from a previous call.)

  • page_size (Optional[PageSize], default: None ) –

    The maximum number of results to return with this call (a number from 1 to 400). The default is 400.

Raises:

Examples:

To describe one of your load balancers This example describes the specified load balancer.

>>> client.describe_load_balancers(load_balancer_names=['my-load-balancer'])
Source code in docs_src/capo_elastic_load_balancing/_services/elastic_load_balancing.py
def describe_load_balancers(
    self,
    *,
    config_overrides: Optional[ElasticLoadBalancingClientConfig] = None,
    load_balancer_names: Optional[
        "capo_elastic_load_balancing.types.load_balancer_names.LoadBalancerNames"
    ] = None,
    marker: Optional["capo_elastic_load_balancing.types.marker.Marker"] = None,
    page_size: Optional[
        "capo_elastic_load_balancing.types.page_size.PageSize"
    ] = None,
) -> "capo_elastic_load_balancing.types.describe_access_points_output.DescribeAccessPointsOutput":
    """<p>Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.</p>

    Args:
        load_balancer_names: <p>The names of the load balancers.</p>
        marker: <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
        page_size: <p>The maximum number of results to return with this call (a number from 1 to 400). The default is 400.</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.dependency_throttle_exception.DependencyThrottleException: <p>A request made by Elastic Load Balancing to another service exceeds the maximum request rate permitted for your account.</p>
        capo_elastic_load_balancing.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe one of your load balancers
        This example describes the specified load balancer.

        >>> client.describe_load_balancers(load_balancer_names=['my-load-balancer'])
    """

    def _handler(
        req: "OperationRequest[capo_elastic_load_balancing.types.describe_access_points_input.DescribeAccessPointsInput]",
    ) -> OperationResponse[
        "capo_elastic_load_balancing.types.describe_access_points_output.DescribeAccessPointsOutput"
    ]:
        import capo_elastic_load_balancing._operations.elastic_load_balancing_v7.describe_load_balancers

        output, http_response = (
            capo_elastic_load_balancing._operations.elastic_load_balancing_v7.describe_load_balancers.describe_load_balancers(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeLoadBalancers")
    )
    input_: capo_elastic_load_balancing.types.describe_access_points_input.DescribeAccessPointsInput = {}
    if load_balancer_names is not None:
        input_["load_balancer_names"] = load_balancer_names
    if marker is not None:
        input_["marker"] = marker
    if page_size is not None:
        input_["page_size"] = page_size

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output