Skip to content

list_link_routing_rules

list_link_routing_rules(
    gateway_id: GatewayId,
    link_id: LinkId,
    *,
    config_overrides: Optional[RTBFabricClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
) -> ListLinkRoutingRulesResponse

Lists the routing rules for a link.

Parameters:

  • gateway_id (GatewayId) –

    The unique identifier of the gateway.

  • link_id (LinkId) –

    The unique identifier of the link.

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

    If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

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

    The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results.

    This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.

Raises:

  • AccessDeniedException –

    The request could not be completed because you do not have sufficient access to perform this action.

  • InternalServerException –

    The request could not be completed because of an internal server error. Try your call again.

  • ResourceNotFoundException –

    The request could not be completed because the resource does not exist.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The request could not be completed because it fails satisfy the constraints specified by the service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

List link routing rules List all routing rules for a link

>>> client.list_link_routing_rules(gateway_id='rtb-gw-12345678', link_id='link-87654321', max_results=10)
Source code in docs_src/capo_rtbfabric/_services/rtb_fabric.py
def list_link_routing_rules(
    self,
    gateway_id: "capo_rtbfabric.types.gateway_id.GatewayId",
    link_id: "capo_rtbfabric.types.link_id.LinkId",
    *,
    config_overrides: Optional[RTBFabricClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
) -> "capo_rtbfabric.types.list_link_routing_rules_response.ListLinkRoutingRulesResponse":
    """<p>Lists the routing rules for a link.</p>

    Args:
        gateway_id: <p>The unique identifier of the gateway.</p>
        link_id: <p>The unique identifier of the link.</p>
        next_token: <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken error</i>.</p>
        max_results: <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>

    Raises:
        capo_rtbfabric.errors.access_denied_exception.AccessDeniedException: <p>The request could not be completed because you do not have sufficient access to perform this action.</p>
        capo_rtbfabric.errors.internal_server_exception.InternalServerException: <p>The request could not be completed because of an internal server error. Try your call again.</p>
        capo_rtbfabric.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request could not be completed because the resource does not exist.</p>
        capo_rtbfabric.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_rtbfabric.errors.validation_exception.ValidationException: <p>The request could not be completed because it fails satisfy the constraints specified by the service.</p>
        capo_rtbfabric.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List link routing rules
        List all routing rules for a link

        >>> client.list_link_routing_rules(gateway_id='rtb-gw-12345678', link_id='link-87654321', max_results=10)
    """

    def _handler(
        req: "OperationRequest[capo_rtbfabric.types.list_link_routing_rules_request.ListLinkRoutingRulesRequest]",
    ) -> OperationResponse[
        "capo_rtbfabric.types.list_link_routing_rules_response.ListLinkRoutingRulesResponse"
    ]:
        import capo_rtbfabric._operations.rtb_fabric.list_link_routing_rules

        output, http_response = (
            capo_rtbfabric._operations.rtb_fabric.list_link_routing_rules.list_link_routing_rules(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListLinkRoutingRules")
    )
    input_: capo_rtbfabric.types.list_link_routing_rules_request.ListLinkRoutingRulesRequest = {
        "gateway_id": gateway_id,
        "link_id": link_id,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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