Skip to content

create_application

create_application(
    display_name: ApplicationName,
    *,
    config_overrides: Optional[QBusinessClientConfig] = None,
    role_arn: Optional[RoleArn] = None,
    identity_type: Optional[IdentityType] = None,
    iam_identity_provider_arn: Optional[IAMIdentityProviderArn] = None,
    identity_center_instance_arn: Optional[InstanceArn] = None,
    client_ids_for_oidc: Optional[ClientIdsForOIDC] = None,
    description: Optional[Description] = None,
    encryption_configuration: Optional[EncryptionConfiguration] = None,
    tags: Optional[Tags] = None,
    client_token: Optional[ClientToken] = None,
    attachments_configuration: Optional[AttachmentsConfiguration] = None,
    q_apps_configuration: Optional[QAppsConfiguration] = None,
    personalization_configuration: Optional[PersonalizationConfiguration] = None,
    quick_sight_configuration: Optional[QuickSightConfiguration] = None,
) -> CreateApplicationResponse

Creates an Amazon Q Business application.

There are new tiers for Amazon Q Business. Not all features in Amazon Q Business Pro are also available in Amazon Q Business Lite. For information on what's included in Amazon Q Business Lite and what's included in Amazon Q Business Pro, see Amazon Q Business tiers. You must use the Amazon Q Business console to assign subscription tiers to users.

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.

When you create an application, Amazon Q Business may securely transmit data for processing from your selected Amazon Web Services region, but within your geography. For more information, see Cross region inference in Amazon Q Business.

Parameters:

  • display_name (ApplicationName) –

    A name for the Amazon Q Business application.

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

    The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon CloudWatch logs and metrics. If this property is not specified, Amazon Q Business will create a service linked role (SLR) and use it as the application's role.

  • identity_type (Optional[IdentityType], default: None ) –

    The authentication type being used by a Amazon Q Business application.

  • iam_identity_provider_arn (Optional[IAMIdentityProviderArn], default: None ) –

    The Amazon Resource Name (ARN) of an identity provider being used by an 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.

  • client_ids_for_oidc (Optional[ClientIdsForOIDC], default: None ) –

    The OIDC client ID for a Amazon Q Business application.

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

    A description for the Amazon Q Business application.

  • encryption_configuration (Optional[EncryptionConfiguration], default: None ) –

    The identifier of the KMS key that is used to encrypt your data. Amazon Q Business doesn't support asymmetric keys.

  • tags (Optional[Tags], default: None ) –

    A list of key-value pairs that identify or categorize your Amazon Q Business application. You can also use tags to help control access to the application. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

  • client_token (Optional[ClientToken], default: None ) –

    A token that you provide to identify the request to create your Amazon Q Business application.

  • 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

  • quick_sight_configuration (Optional[QuickSightConfiguration], default: None ) –

    The Amazon Quick Suite configuration for an Amazon Q Business application that uses Quick Suite for authentication. This configuration is required if your application uses Quick Suite as the identity provider. For more information, see Creating an Amazon Quick Suite integrated application.

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.

  • ServiceQuotaExceededException –

    You have exceeded the set limits for your Amazon Q Business service.

  • 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/q_business.py
def create_application(
    self,
    display_name: "capo_qbusiness.types.application_name.ApplicationName",
    *,
    config_overrides: Optional[QBusinessClientConfig] = None,
    role_arn: Optional["capo_qbusiness.types.role_arn.RoleArn"] = None,
    identity_type: Optional[
        "capo_qbusiness.types.identity_type.IdentityType"
    ] = None,
    iam_identity_provider_arn: Optional[
        "capo_qbusiness.types.iam_identity_provider_arn.IAMIdentityProviderArn"
    ] = None,
    identity_center_instance_arn: Optional[
        "capo_qbusiness.types.instance_arn.InstanceArn"
    ] = None,
    client_ids_for_oidc: Optional[
        "capo_qbusiness.types.client_ids_for_oidc.ClientIdsForOIDC"
    ] = None,
    description: Optional["capo_qbusiness.types.description.Description"] = None,
    encryption_configuration: Optional[
        "capo_qbusiness.types.encryption_configuration.EncryptionConfiguration"
    ] = None,
    tags: Optional["capo_qbusiness.types.tags.Tags"] = None,
    client_token: Optional["capo_qbusiness.types.client_token.ClientToken"] = 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,
    quick_sight_configuration: Optional[
        "capo_qbusiness.types.quick_sight_configuration.QuickSightConfiguration"
    ] = None,
) -> "capo_qbusiness.types.create_application_response.CreateApplicationResponse":
    """<p>Creates an Amazon Q Business application.</p> <note> <p>There are new tiers for Amazon Q Business. Not all features in Amazon Q Business Pro are also available in Amazon Q Business Lite. For information on what's included in Amazon Q Business Lite and what's included in Amazon Q Business Pro, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/tiers.html#user-sub-tiers">Amazon Q Business tiers</a>. You must use the Amazon Q Business console to assign subscription tiers to users. </p> <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> <p>When you create an application, Amazon Q Business may securely transmit data for processing from your selected Amazon Web Services region, but 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>

    Args:
        display_name: <p>A name for the Amazon Q Business application. </p>
        role_arn: <p> The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon CloudWatch logs and metrics. If this property is not specified, Amazon Q Business will create a <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/using-service-linked-roles.html#slr-permissions">service linked role (SLR)</a> and use it as the application's role.</p>
        identity_type: <p>The authentication type being used by a Amazon Q Business application.</p>
        iam_identity_provider_arn: <p>The Amazon Resource Name (ARN) of an identity provider being used by an 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>
        client_ids_for_oidc: <p>The OIDC client ID for a Amazon Q Business application.</p>
        description: <p>A description for the Amazon Q Business application. </p>
        encryption_configuration: <p>The identifier of the KMS key that is used to encrypt your data. Amazon Q Business doesn't support asymmetric keys.</p>
        tags: <p>A list of key-value pairs that identify or categorize your Amazon Q Business application. You can also use tags to help control access to the application. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
        client_token: <p>A token that you provide to identify the request to create your Amazon Q Business application.</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>
        quick_sight_configuration: <p>The Amazon Quick Suite configuration for an Amazon Q Business application that uses Quick Suite for authentication. This configuration is required if your application uses Quick Suite as the identity provider. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/create-quicksight-integrated-application.html">Creating an Amazon Quick Suite integrated application</a>.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded the set limits for your Amazon Q Business service. </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.
    """

    def _handler(
        req: "OperationRequest[capo_qbusiness.types.create_application_request.CreateApplicationRequest]",
    ) -> OperationResponse[
        "capo_qbusiness.types.create_application_response.CreateApplicationResponse"
    ]:
        import capo_qbusiness._operations.expert_q.create_application

        output, http_response = (
            capo_qbusiness._operations.expert_q.create_application.create_application(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_qbusiness.types.create_application_request.CreateApplicationRequest",
    ) -> dict[str, Any]:
        import capo_qbusiness.types.create_application_request

        return capo_qbusiness.types.create_application_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateApplication", redact_input=_redact_input),
    )
    input_: capo_qbusiness.types.create_application_request.CreateApplicationRequest = {
        "display_name": display_name
    }
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if identity_type is not None:
        input_["identity_type"] = identity_type
    if iam_identity_provider_arn is not None:
        input_["iam_identity_provider_arn"] = iam_identity_provider_arn
    if identity_center_instance_arn is not None:
        input_["identity_center_instance_arn"] = identity_center_instance_arn
    if client_ids_for_oidc is not None:
        input_["client_ids_for_oidc"] = client_ids_for_oidc
    if description is not None:
        input_["description"] = description
    if encryption_configuration is not None:
        input_["encryption_configuration"] = encryption_configuration
    if tags is not None:
        input_["tags"] = tags
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    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 quick_sight_configuration is not None:
        input_["quick_sight_configuration"] = quick_sight_configuration

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output