Skip to content

list_one_time_prices

list_one_time_prices(
    app_id: AppId,
    scope: RequestScope,
    *,
    config_overrides: Optional[AppMonetizationClientConfig] = None,
    stage: Optional[PlanStage] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> ListOneTimePricesResponse

Lists the one-time prices for an app. Returns a paginated list; use the nextToken value to retrieve additional pages.

Parameters:

  • app_id (AppId) –

    The ID of the app whose one-time prices are listed.

  • stage (Optional[PlanStage], default: None ) –

    The offering stage to list one-time prices from: DRAFT (the latest authored draft) or PUBLISHED (the published offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox.

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

    The maximum number of one-time prices to return in a single call. To retrieve the remaining results, make another call with the nextToken value that is returned in the response.

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

    The pagination token that is returned by a previous call. Use it to retrieve the next page of results. Omit this parameter on the first call.

  • scope (RequestScope) –

    Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app's draft (what the sandbox runs).

Raises:

Source code in docs_src/capo_appmonetization/_services/app_monetization.py
def list_one_time_prices(
    self,
    app_id: "capo_appmonetization.types.app_id.AppId",
    scope: "capo_appmonetization.types.request_scope.RequestScope",
    *,
    config_overrides: Optional[AppMonetizationClientConfig] = None,
    stage: Optional["capo_appmonetization.types.plan_stage.PlanStage"] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> "capo_appmonetization.types.list_one_time_prices_response.ListOneTimePricesResponse":
    """Lists the one-time prices for an app. Returns a paginated list; use the nextToken value to retrieve additional pages.

    Args:
        app_id: The ID of the app whose one-time prices are listed.
        stage: The offering stage to list one-time prices from: DRAFT (the latest authored draft) or PUBLISHED (the published offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox.
        max_results: The maximum number of one-time prices to return in a single call. To retrieve the remaining results, make another call with the nextToken value that is returned in the response.
        next_token: The pagination token that is returned by a previous call. Use it to retrieve the next page of results. Omit this parameter on the first call.
        scope: Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app's draft (what the sandbox runs).

    Raises:
        capo_appmonetization.errors.access_denied_exception.AccessDeniedException: The caller does not have sufficient permission to perform this action.
        capo_appmonetization.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_appmonetization.errors.resource_not_found_exception.ResourceNotFoundException: The referenced resource does not exist.
        capo_appmonetization.errors.throttling_exception.ThrottlingException: The request was denied due to request throttling.
        capo_appmonetization.errors.validation_exception.ValidationException: The request failed input validation.
        capo_appmonetization.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_appmonetization.types.list_one_time_prices_request.ListOneTimePricesRequest]",
    ) -> OperationResponse[
        "capo_appmonetization.types.list_one_time_prices_response.ListOneTimePricesResponse"
    ]:
        import capo_appmonetization._operations.aws_monetization_ai_front_end.list_one_time_prices

        output, http_response = (
            capo_appmonetization._operations.aws_monetization_ai_front_end.list_one_time_prices.list_one_time_prices(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListOneTimePrices")
    )
    input_: capo_appmonetization.types.list_one_time_prices_request.ListOneTimePricesRequest = {
        "app_id": app_id,
        "scope": scope,
    }
    if stage is not None:
        input_["stage"] = stage
    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