Skip to content

create_web_experience async

create_web_experience(
    application_id: ApplicationId,
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    title: Optional[WebExperienceTitle] = None,
    subtitle: Optional[WebExperienceSubtitle] = None,
    welcome_message: Optional[WebExperienceWelcomeMessage] = None,
    sample_prompts_control_mode: Optional[WebExperienceSamplePromptsControlMode] = None,
    origins: Optional[WebExperienceOrigins] = None,
    role_arn: Optional[RoleArn] = None,
    tags: Optional[Tags] = None,
    client_token: Optional[ClientToken] = None,
    identity_provider_configuration: Optional[IdentityProviderConfiguration] = None,
    browser_extension_configuration: Optional[BrowserExtensionConfiguration] = None,
    customization_configuration: Optional[CustomizationConfiguration] = None,
) -> CreateWebExperienceResponse

Creates an Amazon Q Business web experience.

Parameters:

  • application_id (ApplicationId) –

    The identifier of the Amazon Q Business web experience.

  • title (Optional[WebExperienceTitle], default: None ) –

    The title for your Amazon Q Business web experience.

  • subtitle (Optional[WebExperienceSubtitle], default: None ) –

    A subtitle to personalize your Amazon Q Business web experience.

  • welcome_message (Optional[WebExperienceWelcomeMessage], default: None ) –

    The customized welcome message for end users of an Amazon Q Business web experience.

  • sample_prompts_control_mode (Optional[WebExperienceSamplePromptsControlMode], default: None ) –

    Determines whether sample prompts are enabled in the web experience for an end user.

  • origins (Optional[WebExperienceOrigins], default: None ) –

    Sets the website domain origins that are allowed to embed the Amazon Q Business web experience. The domain origin refers to the base URL for accessing a website including the protocol (http/https), the domain name, and the port number (if specified).

    You must only submit a base URL and not a full path. For example, https://docs.aws.amazon.com.

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

    The Amazon Resource Name (ARN) of the service role attached to your web experience.

    The roleArn parameter is required when your Amazon Q Business application is created with IAM Identity Center. It is not required for SAML-based applications.

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

    A list of key-value pairs that identify or categorize your Amazon Q Business web experience. You can also use tags to help control access to the web experience. 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 you provide to identify a request to create an Amazon Q Business web experience.

  • identity_provider_configuration (Optional[IdentityProviderConfiguration], default: None ) –

    Information about the identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.

  • browser_extension_configuration (Optional[BrowserExtensionConfiguration], default: None ) –

    The browser extension configuration for an Amazon Q Business web experience.

    For Amazon Q Business application using external OIDC-compliant identity providers (IdPs). The IdP administrator must add the browser extension sign-in redirect URLs to the IdP application. For more information, see Configure external OIDC identity provider for your browser extensions..

  • customization_configuration (Optional[CustomizationConfiguration], default: None ) –

    Sets the custom logo, favicon, font, and color used in the Amazon Q web experience.

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/async_q_business.py
async def create_web_experience(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    title: Optional[
        "capo_qbusiness.types.web_experience_title.WebExperienceTitle"
    ] = None,
    subtitle: Optional[
        "capo_qbusiness.types.web_experience_subtitle.WebExperienceSubtitle"
    ] = None,
    welcome_message: Optional[
        "capo_qbusiness.types.web_experience_welcome_message.WebExperienceWelcomeMessage"
    ] = None,
    sample_prompts_control_mode: Optional[
        "capo_qbusiness.types.web_experience_sample_prompts_control_mode.WebExperienceSamplePromptsControlMode"
    ] = None,
    origins: Optional[
        "capo_qbusiness.types.web_experience_origins.WebExperienceOrigins"
    ] = None,
    role_arn: Optional["capo_qbusiness.types.role_arn.RoleArn"] = None,
    tags: Optional["capo_qbusiness.types.tags.Tags"] = None,
    client_token: Optional["capo_qbusiness.types.client_token.ClientToken"] = None,
    identity_provider_configuration: Optional[
        "capo_qbusiness.types.identity_provider_configuration.IdentityProviderConfiguration"
    ] = None,
    browser_extension_configuration: Optional[
        "capo_qbusiness.types.browser_extension_configuration.BrowserExtensionConfiguration"
    ] = None,
    customization_configuration: Optional[
        "capo_qbusiness.types.customization_configuration.CustomizationConfiguration"
    ] = None,
) -> "capo_qbusiness.types.create_web_experience_response.CreateWebExperienceResponse":
    """<p>Creates an Amazon Q Business web experience.</p>

    Args:
        application_id: <p>The identifier of the Amazon Q Business web experience.</p>
        title: <p>The title for your Amazon Q Business web experience.</p>
        subtitle: <p>A subtitle to personalize your Amazon Q Business web experience.</p>
        welcome_message: <p>The customized welcome message for end users of an Amazon Q Business web experience.</p>
        sample_prompts_control_mode: <p>Determines whether sample prompts are enabled in the web experience for an end user.</p>
        origins: <p>Sets the website domain origins that are allowed to embed the Amazon Q Business web experience. The <i>domain origin</i> refers to the base URL for accessing a website including the protocol (<code>http/https</code>), the domain name, and the port number (if specified). </p> <note> <p>You must only submit a <i>base URL</i> and not a full path. For example, <code>https://docs.aws.amazon.com</code>.</p> </note>
        role_arn: <p>The Amazon Resource Name (ARN) of the service role attached to your web experience.</p> <note> <p>The <code>roleArn</code> parameter is required when your Amazon Q Business application is created with IAM Identity Center. It is not required for SAML-based applications.</p> </note>
        tags: <p>A list of key-value pairs that identify or categorize your Amazon Q Business web experience. You can also use tags to help control access to the web experience. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
        client_token: <p>A token you provide to identify a request to create an Amazon Q Business web experience. </p>
        identity_provider_configuration: <p>Information about the identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.</p>
        browser_extension_configuration: <p>The browser extension configuration for an Amazon Q Business web experience.</p> <note> <p> For Amazon Q Business application using external OIDC-compliant identity providers (IdPs). The IdP administrator must add the browser extension sign-in redirect URLs to the IdP application. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/browser-extensions.html">Configure external OIDC identity provider for your browser extensions.</a>. </p> </note>
        customization_configuration: <p>Sets the custom logo, favicon, font, and color used in the Amazon Q web experience. </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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_qbusiness.types.create_web_experience_request.CreateWebExperienceRequest]",
    ) -> AsyncOperationResponse[
        "capo_qbusiness.types.create_web_experience_response.CreateWebExperienceResponse"
    ]:
        import capo_qbusiness._operations.expert_q.create_web_experience

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateWebExperience")
    )
    input_: capo_qbusiness.types.create_web_experience_request.CreateWebExperienceRequest = {
        "application_id": application_id
    }
    if title is not None:
        input_["title"] = title
    if subtitle is not None:
        input_["subtitle"] = subtitle
    if welcome_message is not None:
        input_["welcome_message"] = welcome_message
    if sample_prompts_control_mode is not None:
        input_["sample_prompts_control_mode"] = sample_prompts_control_mode
    if origins is not None:
        input_["origins"] = origins
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if tags is not None:
        input_["tags"] = tags
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if identity_provider_configuration is not None:
        input_["identity_provider_configuration"] = identity_provider_configuration
    if browser_extension_configuration is not None:
        input_["browser_extension_configuration"] = browser_extension_configuration
    if customization_configuration is not None:
        input_["customization_configuration"] = customization_configuration

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