Skip to content

list_endpoint_groups

list_endpoint_groups(
    listener_arn: GenericString,
    *,
    config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[GenericString] = None,
) -> ListEndpointGroupsResponse

List the endpoint groups that are associated with a listener.

Parameters:

  • listener_arn (GenericString) –

    The Amazon Resource Name (ARN) of the listener.

  • max_results (Optional[MaxResults], default: None ) –

    The number of endpoint group objects that you want to return with this call. The default value is 10.

  • next_token (Optional[GenericString], default: None ) –

    The token for the next set of results. You receive this token from a previous call.

Raises:

Source code in docs_src/capo_global_accelerator/_services/global_accelerator.py
def list_endpoint_groups(
    self,
    listener_arn: "capo_global_accelerator.types.generic_string.GenericString",
    *,
    config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
    max_results: Optional[
        "capo_global_accelerator.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_global_accelerator.types.generic_string.GenericString"
    ] = None,
) -> "capo_global_accelerator.types.list_endpoint_groups_response.ListEndpointGroupsResponse":
    """<p>List the endpoint groups that are associated with a listener. </p>

    Args:
        listener_arn: <p>The Amazon Resource Name (ARN) of the listener.</p>
        max_results: <p>The number of endpoint group objects that you want to return with this call. The default value is 10.</p>
        next_token: <p>The token for the next set of results. You receive this token from a previous call.</p>

    Raises:
        capo_global_accelerator.errors.internal_service_error_exception.InternalServiceErrorException: <p>There was an internal error for Global Accelerator.</p>
        capo_global_accelerator.errors.invalid_argument_exception.InvalidArgumentException: <p>An argument that you specified is invalid.</p>
        capo_global_accelerator.errors.invalid_next_token_exception.InvalidNextTokenException: <p>There isn't another item to return.</p>
        capo_global_accelerator.errors.listener_not_found_exception.ListenerNotFoundException: <p>The listener that you specified doesn't exist.</p>
        capo_global_accelerator.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_global_accelerator.types.list_endpoint_groups_request.ListEndpointGroupsRequest]",
    ) -> OperationResponse[
        "capo_global_accelerator.types.list_endpoint_groups_response.ListEndpointGroupsResponse"
    ]:
        import capo_global_accelerator._operations.global_accelerator_v20180706.list_endpoint_groups

        output, http_response = (
            capo_global_accelerator._operations.global_accelerator_v20180706.list_endpoint_groups.list_endpoint_groups(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEndpointGroups")
    )
    input_: capo_global_accelerator.types.list_endpoint_groups_request.ListEndpointGroupsRequest = {
        "listener_arn": listener_arn
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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