Skip to content

list_updates async

list_updates(
    gateway_id: GatewayId,
    *,
    config_overrides: Optional[AsyncRTBFabricClientConfig] = None,
    link_id: Optional[LinkId] = None,
    rule_id: Optional[RuleId] = None,
    type: Optional[UpdateType] = None,
    status: Optional[UpdateStatus] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
) -> ListUpdatesResponse

Lists the updates on a gateway. Results are paginated. Use nextToken to get the next page.

Parameters:

  • gateway_id (GatewayId) –

    The unique identifier of the gateway.

  • link_id (Optional[LinkId], default: None ) –

    The ID of a link on this gateway, to list only that link's updates. Omit both linkId and ruleId to list the gateway's own updates.

  • rule_id (Optional[RuleId], default: None ) –

    The ID of a routing rule, to list only that rule's updates. Requires linkId, because you address a rule through its link. A ruleId without linkId fails with ValidationException.

  • type (Optional[UpdateType], default: None ) –

    Lists only updates of this type.

  • status (Optional[UpdateStatus], default: None ) –

    Lists only updates in this status.

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

    If nextToken is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

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

    The maximum number of results to return for each call.

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 a link's updates List the updates that targeted one link on a responder gateway

>>> await client.list_updates(gateway_id='rtb-gw-12345678', link_id='link-87654321', max_results=10)
Source code in docs_src/capo_rtbfabric/_services/async_rtb_fabric.py
async def list_updates(
    self,
    gateway_id: "capo_rtbfabric.types.gateway_id.GatewayId",
    *,
    config_overrides: Optional[AsyncRTBFabricClientConfig] = None,
    link_id: Optional["capo_rtbfabric.types.link_id.LinkId"] = None,
    rule_id: Optional["capo_rtbfabric.types.rule_id.RuleId"] = None,
    type: Optional["capo_rtbfabric.types.update_type.UpdateType"] = None,
    status: Optional["capo_rtbfabric.types.update_status.UpdateStatus"] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
) -> "capo_rtbfabric.types.list_updates_response.ListUpdatesResponse":
    """<p>Lists the updates on a gateway. Results are paginated. Use <code>nextToken</code> to get the next page.</p>

    Args:
        gateway_id: <p>The unique identifier of the gateway.</p>
        link_id: <p>The ID of a link on this gateway, to list only that link's updates. Omit both <code>linkId</code> and <code>ruleId</code> to list the gateway's own updates.</p>
        rule_id: <p>The ID of a routing rule, to list only that rule's updates. Requires <code>linkId</code>, because you address a rule through its link. A <code>ruleId</code> without <code>linkId</code> fails with ValidationException.</p>
        type: <p>Lists only updates of this type.</p>
        status: <p>Lists only updates in this status.</p>
        next_token: <p>If nextToken is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.</p>
        max_results: <p>The maximum number of results to return for each call.</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 a link's updates
        List the updates that targeted one link on a responder gateway

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

    async def _handler(
        req: "AsyncOperationRequest[capo_rtbfabric.types.list_updates_request.ListUpdatesRequest]",
    ) -> AsyncOperationResponse[
        "capo_rtbfabric.types.list_updates_response.ListUpdatesResponse"
    ]:
        import capo_rtbfabric._operations.rtb_fabric.list_updates

        (
            output,
            http_response,
        ) = await capo_rtbfabric._operations.rtb_fabric.list_updates.async_list_updates(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListUpdates")
    )
    input_: capo_rtbfabric.types.list_updates_request.ListUpdatesRequest = {
        "gateway_id": gateway_id
    }
    if link_id is not None:
        input_["link_id"] = link_id
    if rule_id is not None:
        input_["rule_id"] = rule_id
    if type is not None:
        input_["type"] = type
    if status is not None:
        input_["status"] = status
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output