Skip to content

connect_app_authorization async

connect_app_authorization(
    app_bundle_identifier: Identifier,
    app_authorization_identifier: Identifier,
    *,
    config_overrides: Optional[AsyncAppFabricClientConfig] = None,
    auth_request: Optional[AuthRequest] = None,
) -> ConnectAppAuthorizationResponse

Establishes a connection between Amazon Web Services AppFabric and an application, which allows AppFabric to call the APIs of the application.

Parameters:

  • app_bundle_identifier (Identifier) –

    The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle that contains the app authorization to use for the request.

  • app_authorization_identifier (Identifier) –

    The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app authorization to use for the request.

  • auth_request (Optional[AuthRequest], default: None ) –

    Contains OAuth2 authorization information.

    This is required if the app authorization for the request is configured with an OAuth2 (oauth2) authorization type.

Raises:

Source code in docs_src/capo_appfabric/_services/async_app_fabric.py
async def connect_app_authorization(
    self,
    app_bundle_identifier: "capo_appfabric.types.identifier.Identifier",
    app_authorization_identifier: "capo_appfabric.types.identifier.Identifier",
    *,
    config_overrides: Optional[AsyncAppFabricClientConfig] = None,
    auth_request: Optional["capo_appfabric.types.auth_request.AuthRequest"] = None,
) -> "capo_appfabric.types.connect_app_authorization_response.ConnectAppAuthorizationResponse":
    """<p>Establishes a connection between Amazon Web Services AppFabric and an application, which allows AppFabric to call the APIs of the application.</p>

    Args:
        app_bundle_identifier: <p>The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle that contains the app authorization to use for the request.</p>
        app_authorization_identifier: <p>The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app authorization to use for the request.</p>
        auth_request: <p>Contains OAuth2 authorization information.</p> <p>This is required if the app authorization for the request is configured with an OAuth2 (<code>oauth2</code>) authorization type.</p>

    Raises:
        capo_appfabric.errors.access_denied_exception.AccessDeniedException: <p>You are not authorized to perform this operation.</p>
        capo_appfabric.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure with an internal server.</p>
        capo_appfabric.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_appfabric.errors.throttling_exception.ThrottlingException: <p>The request rate exceeds the limit.</p>
        capo_appfabric.errors.validation_exception.ValidationException: <p>The request has invalid or missing parameters.</p>
        capo_appfabric.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appfabric.types.connect_app_authorization_request.ConnectAppAuthorizationRequest]",
    ) -> AsyncOperationResponse[
        "capo_appfabric.types.connect_app_authorization_response.ConnectAppAuthorizationResponse"
    ]:
        import capo_appfabric._operations.fabric_front_end_service.connect_app_authorization

        (
            output,
            http_response,
        ) = await capo_appfabric._operations.fabric_front_end_service.connect_app_authorization.async_connect_app_authorization(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_appfabric.types.connect_app_authorization_request.ConnectAppAuthorizationRequest",
    ) -> dict[str, Any]:
        import capo_appfabric.types.connect_app_authorization_request

        return (
            capo_appfabric.types.connect_app_authorization_request.redact_sensitive(
                input_
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ConnectAppAuthorization", redact_input=_redact_input),
    )
    input_: capo_appfabric.types.connect_app_authorization_request.ConnectAppAuthorizationRequest = {
        "app_bundle_identifier": app_bundle_identifier,
        "app_authorization_identifier": app_authorization_identifier,
    }
    if auth_request is not None:
        input_["auth_request"] = auth_request

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