Skip to content

update_application async

update_application(
    application_id: ApplicationId,
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    identity_center_instance_arn: Optional[InstanceArn] = None,
    display_name: Optional[ApplicationName] = None,
    description: Optional[Description] = None,
    role_arn: Optional[RoleArn] = None,
    attachments_configuration: Optional[AttachmentsConfiguration] = None,
    q_apps_configuration: Optional[QAppsConfiguration] = None,
    personalization_configuration: Optional[PersonalizationConfiguration] = None,
    auto_subscription_configuration: Optional[AutoSubscriptionConfiguration] = None,
) -> UpdateApplicationResponse

Updates an existing Amazon Q Business application.

Amazon Q Business applications may securely transmit data for processing across Amazon Web Services Regions within your geography. For more information, see Cross region inference in Amazon Q Business.

An Amazon Q Apps service-linked role will be created if it's absent in the Amazon Web Services account when QAppsConfiguration is enabled in the request. For more information, see Using service-linked roles for Q Apps.

Parameters:

  • application_id (ApplicationId) –

    The identifier of the Amazon Q Business application.

  • identity_center_instance_arn (Optional[InstanceArn], default: None ) –

    The Amazon Resource Name (ARN) of the IAM Identity Center instance you are either creating for—or connecting to—your Amazon Q Business application.

  • display_name (Optional[ApplicationName], default: None ) –

    A name for the Amazon Q Business application.

  • description (Optional[Description], default: None ) –

    A description for the Amazon Q Business application.

  • role_arn (Optional[RoleArn], default: None ) –

    An Amazon Web Services Identity and Access Management (IAM) role that gives Amazon Q Business permission to access Amazon CloudWatch logs and metrics.

  • attachments_configuration (Optional[AttachmentsConfiguration], default: None ) –

    An option to allow end users to upload files directly during chat.

  • q_apps_configuration (Optional[QAppsConfiguration], default: None ) –

    An option to allow end users to create and use Amazon Q Apps in the web experience.

  • personalization_configuration (Optional[PersonalizationConfiguration], default: None ) –

    Configuration information about chat response personalization. For more information, see Personalizing chat responses.

  • auto_subscription_configuration (Optional[AutoSubscriptionConfiguration], default: None ) –

    An option to enable updating the default subscription type assigned to an Amazon Q Business application using IAM identity federation for user management.

Raises:

  • AccessDeniedException –

    You don't have access to perform this action. Make sure you have the required permission policies and user accounts and try again.

  • ConflictException –

    You are trying to perform an action that conflicts with the current status of your resource. Fix any inconsistencies with your resources and try again.

  • InternalServerException –

    An issue occurred with the internal server used for your Amazon Q Business service. Wait some minutes and try again, or contact Support for help.

  • ResourceNotFoundException –

    The application or plugin resource you want to use doesn’t exist. Make sure you have provided the correct resource and try again.

  • ThrottlingException –

    The request was denied due to throttling. Reduce the number of requests and try again.

  • ValidationException –

    The input doesn't meet the constraints set by the Amazon Q Business service. Provide the correct input and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_qbusiness/_services/async_q_business.py
async def update_application(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    identity_center_instance_arn: Optional[
        "capo_qbusiness.types.instance_arn.InstanceArn"
    ] = None,
    display_name: Optional[
        "capo_qbusiness.types.application_name.ApplicationName"
    ] = None,
    description: Optional["capo_qbusiness.types.description.Description"] = None,
    role_arn: Optional["capo_qbusiness.types.role_arn.RoleArn"] = None,
    attachments_configuration: Optional[
        "capo_qbusiness.types.attachments_configuration.AttachmentsConfiguration"
    ] = None,
    q_apps_configuration: Optional[
        "capo_qbusiness.types.q_apps_configuration.QAppsConfiguration"
    ] = None,
    personalization_configuration: Optional[
        "capo_qbusiness.types.personalization_configuration.PersonalizationConfiguration"
    ] = None,
    auto_subscription_configuration: Optional[
        "capo_qbusiness.types.auto_subscription_configuration.AutoSubscriptionConfiguration"
    ] = None,
) -> "capo_qbusiness.types.update_application_response.UpdateApplicationResponse":
    """<p>Updates an existing Amazon Q Business application.</p> <note> <p>Amazon Q Business applications may securely transmit data for processing across Amazon Web Services Regions within your geography. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/cross-region-inference.html">Cross region inference in Amazon Q Business</a>.</p> </note> <note> <p>An Amazon Q Apps service-linked role will be created if it's absent in the Amazon Web Services account when <code>QAppsConfiguration</code> is enabled in the request. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/using-service-linked-roles-qapps.html">Using service-linked roles for Q Apps</a>. </p> </note>

    Args:
        application_id: <p>The identifier of the Amazon Q Business application.</p>
        identity_center_instance_arn: <p> The Amazon Resource Name (ARN) of the IAM Identity Center instance you are either creating for—or connecting to—your Amazon Q Business application.</p>
        display_name: <p>A name for the Amazon Q Business application.</p>
        description: <p>A description for the Amazon Q Business application.</p>
        role_arn: <p>An Amazon Web Services Identity and Access Management (IAM) role that gives Amazon Q Business permission to access Amazon CloudWatch logs and metrics.</p>
        attachments_configuration: <p>An option to allow end users to upload files directly during chat.</p>
        q_apps_configuration: <p>An option to allow end users to create and use Amazon Q Apps in the web experience.</p>
        personalization_configuration: <p>Configuration information about chat response personalization. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/personalizing-chat-responses.html">Personalizing chat responses</a>.</p>
        auto_subscription_configuration: <p>An option to enable updating the default subscription type assigned to an Amazon Q Business application using IAM identity federation for user management.</p>

    Raises:
        capo_qbusiness.errors.access_denied_exception.AccessDeniedException: <p> You don't have access to perform this action. Make sure you have the required permission policies and user accounts and try again.</p>
        capo_qbusiness.errors.conflict_exception.ConflictException: <p>You are trying to perform an action that conflicts with the current status of your resource. Fix any inconsistencies with your resources and try again.</p>
        capo_qbusiness.errors.internal_server_exception.InternalServerException: <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait some minutes and try again, or contact <a href="http://aws.amazon.com/contact-us/">Support</a> for help.</p>
        capo_qbusiness.errors.resource_not_found_exception.ResourceNotFoundException: <p>The application or plugin resource you want to use doesn’t exist. Make sure you have provided the correct resource and try again.</p>
        capo_qbusiness.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling. Reduce the number of requests and try again.</p>
        capo_qbusiness.errors.validation_exception.ValidationException: <p>The input doesn't meet the constraints set by the Amazon Q Business service. Provide the correct input and try again.</p>
        capo_qbusiness.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_qbusiness.types.update_application_request.UpdateApplicationRequest]",
    ) -> AsyncOperationResponse[
        "capo_qbusiness.types.update_application_response.UpdateApplicationResponse"
    ]:
        import capo_qbusiness._operations.expert_q.update_application

        (
            output,
            http_response,
        ) = await capo_qbusiness._operations.expert_q.update_application.async_update_application(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateApplication")
    )
    input_: capo_qbusiness.types.update_application_request.UpdateApplicationRequest = {
        "application_id": application_id
    }
    if identity_center_instance_arn is not None:
        input_["identity_center_instance_arn"] = identity_center_instance_arn
    if display_name is not None:
        input_["display_name"] = display_name
    if description is not None:
        input_["description"] = description
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if attachments_configuration is not None:
        input_["attachments_configuration"] = attachments_configuration
    if q_apps_configuration is not None:
        input_["q_apps_configuration"] = q_apps_configuration
    if personalization_configuration is not None:
        input_["personalization_configuration"] = personalization_configuration
    if auto_subscription_configuration is not None:
        input_["auto_subscription_configuration"] = auto_subscription_configuration

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