Returns the third-party costs for an app. To calculate a total, sum the amount of the returned items; the costs are not prorated. Returns a paginated list; we recommend using pagination to ensure that the operation returns quickly and successfully.
Parameters:
-
app_id
(AppId)
–
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of items to return in a single page. Valid range: 1-100.
-
next_token
(Optional[NextToken], default:
None
)
–
An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
Raises:
Source code in docs_src/capo_appmonetization/_services/async_app_monetization.py
| async def list_third_party_costs(
self,
app_id: "capo_appmonetization.types.app_id.AppId",
*,
config_overrides: Optional[AsyncAppMonetizationClientConfig] = None,
max_results: Optional[
"capo_appmonetization.types.max_results.MaxResults"
] = None,
next_token: Optional["capo_appmonetization.types.next_token.NextToken"] = None,
) -> "capo_appmonetization.types.list_third_party_costs_response.ListThirdPartyCostsResponse":
"""Returns the third-party costs for an app. To calculate a total, sum the amount of the returned items; the costs are not prorated. Returns a paginated list; we recommend using pagination to ensure that the operation returns quickly and successfully.
Args:
app_id: The ID of the app.
max_results: The maximum number of items to return in a single page. Valid range: 1-100.
next_token: An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_appmonetization.types.list_third_party_costs_request.ListThirdPartyCostsRequest]",
) -> AsyncOperationResponse[
"capo_appmonetization.types.list_third_party_costs_response.ListThirdPartyCostsResponse"
]:
import capo_appmonetization._operations.aws_monetization_ai_front_end.list_third_party_costs
(
output,
http_response,
) = await capo_appmonetization._operations.aws_monetization_ai_front_end.list_third_party_costs.async_list_third_party_costs(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListThirdPartyCosts")
)
input_: capo_appmonetization.types.list_third_party_costs_request.ListThirdPartyCostsRequest = {
"app_id": app_id
}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|