Skip to content

update_app_authorization async

update_app_authorization(
    app_bundle_identifier: Identifier,
    app_authorization_identifier: Identifier,
    *,
    config_overrides: Optional[AsyncAppFabricClientConfig] = None,
    credential: Optional[Credential] = None,
    tenant: Optional[Tenant] = None,
) -> UpdateAppAuthorizationResponse

Updates an app authorization within an app bundle, which allows AppFabric to connect to an application.

If the app authorization was in a connected state, updating the app authorization will set it back to a PendingConnect state.

Parameters:

  • app_bundle_identifier (Identifier) –

    The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle 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.

  • credential (Optional[Credential], default: None ) –

    Contains credentials for the application, such as an API key or OAuth2 client ID and secret.

    Specify credentials that match the authorization type of the app authorization to update. For example, if the authorization type of the app authorization is OAuth2 (oauth2), then you should provide only the OAuth2 credentials.

  • tenant (Optional[Tenant], default: None ) –

    Contains information about an application tenant, such as the application display name and identifier.

Raises:

Source code in docs_src/capo_appfabric/_services/async_app_fabric.py
async def update_app_authorization(
    self,
    app_bundle_identifier: "capo_appfabric.types.identifier.Identifier",
    app_authorization_identifier: "capo_appfabric.types.identifier.Identifier",
    *,
    config_overrides: Optional[AsyncAppFabricClientConfig] = None,
    credential: Optional["capo_appfabric.types.credential.Credential"] = None,
    tenant: Optional["capo_appfabric.types.tenant.Tenant"] = None,
) -> "capo_appfabric.types.update_app_authorization_response.UpdateAppAuthorizationResponse":
    """<p>Updates an app authorization within an app bundle, which allows AppFabric to connect to an application.</p> <p>If the app authorization was in a <code>connected</code> state, updating the app authorization will set it back to a <code>PendingConnect</code> state.</p>

    Args:
        app_bundle_identifier: <p>The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle 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>
        credential: <p>Contains credentials for the application, such as an API key or OAuth2 client ID and secret.</p> <p>Specify credentials that match the authorization type of the app authorization to update. For example, if the authorization type of the app authorization is OAuth2 (<code>oauth2</code>), then you should provide only the OAuth2 credentials.</p>
        tenant: <p>Contains information about an application tenant, such as the application display name and identifier.</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.update_app_authorization_request.UpdateAppAuthorizationRequest]",
    ) -> AsyncOperationResponse[
        "capo_appfabric.types.update_app_authorization_response.UpdateAppAuthorizationResponse"
    ]:
        import capo_appfabric._operations.fabric_front_end_service.update_app_authorization

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

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

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateAppAuthorization", redact_input=_redact_input),
    )
    input_: capo_appfabric.types.update_app_authorization_request.UpdateAppAuthorizationRequest = {
        "app_bundle_identifier": app_bundle_identifier,
        "app_authorization_identifier": app_authorization_identifier,
    }
    if credential is not None:
        input_["credential"] = credential
    if tenant is not None:
        input_["tenant"] = tenant

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