Skip to content

get_app async

get_app(
    app_id: AppId,
    *,
    config_overrides: Optional[AsyncAppMonetizationClientConfig] = None,
    identifier: Optional[ResourceArn] = None,
    scope: Optional[RequestScope] = None,
) -> GetAppResponse

Returns the details of an app.

Parameters:

  • app_id (AppId) –

    The ID of the app to read. You can identify the app by either its ID or its Amazon Resource Name (ARN). If you provide both, they must refer to the same app.

  • identifier (Optional[ResourceArn], default: None ) –

    The Amazon Resource Name (ARN) of the app. You can identify the app by either its ID or its ARN. If you provide both, they must refer to the same app. A sandbox ARN names the app's sandbox; if you also send scope, the two must name the same environment.

  • scope (Optional[RequestScope], default: None ) –

    The environment to act on: live or sandbox. Optional. You can name the environment with this member, with a sandbox resource ARN, or both; if you send both they must name the same environment, or the request is rejected.

Raises:

Source code in docs_src/capo_appmonetization/_services/async_app_monetization.py
async def get_app(
    self,
    app_id: "capo_appmonetization.types.app_id.AppId",
    *,
    config_overrides: Optional[AsyncAppMonetizationClientConfig] = None,
    identifier: Optional[
        "capo_appmonetization.types.resource_arn.ResourceArn"
    ] = None,
    scope: Optional["capo_appmonetization.types.request_scope.RequestScope"] = None,
) -> "capo_appmonetization.types.get_app_response.GetAppResponse":
    """Returns the details of an app.

    Args:
        app_id: The ID of the app to read. You can identify the app by either its ID or its Amazon Resource Name (ARN). If you provide both, they must refer to the same app.
        identifier: The Amazon Resource Name (ARN) of the app. You can identify the app by either its ID or its ARN. If you provide both, they must refer to the same app. A sandbox ARN names the app's sandbox; if you also send scope, the two must name the same environment.
        scope: The environment to act on: live or sandbox. Optional. You can name the environment with this member, with a sandbox resource ARN, or both; if you send both they must name the same environment, or the request is rejected.

    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.get_app_request.GetAppRequest]",
    ) -> AsyncOperationResponse[
        "capo_appmonetization.types.get_app_response.GetAppResponse"
    ]:
        import capo_appmonetization._operations.aws_monetization_ai_front_end.get_app

        (
            output,
            http_response,
        ) = await capo_appmonetization._operations.aws_monetization_ai_front_end.get_app.async_get_app(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetApp")
    )
    input_: capo_appmonetization.types.get_app_request.GetAppRequest = {
        "app_id": app_id
    }
    if identifier is not None:
        input_["identifier"] = identifier
    if scope is not None:
        input_["scope"] = scope

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