create_q_app
async
¶
create_q_app(
instance_id: InstanceId,
title: Title,
app_definition: AppDefinitionInput,
*,
config_overrides: Optional[AsyncQAppsClientConfig] = None,
description: Optional[Description] = None,
tags: Optional[TagMap] = None,
) -> CreateQAppOutput
Creates a new Amazon Q App based on the provided definition. The Q App definition specifies the cards and flow of the Q App. This operation also calculates the dependencies between the cards by inspecting the references in the prompts.
Parameters:
-
instance_id(InstanceId) –The unique identifier of the Amazon Q Business application environment instance.
-
title(Title) –The title of the new Q App.
-
description(Optional[Description], default:None) –The description of the new Q App.
-
app_definition(AppDefinitionInput) –The definition of the new Q App, specifying the cards and flow.
-
tags(Optional[TagMap], default:None) –Optional tags to associate with the new Q App.
Raises:
-
AccessDeniedException–The client is not authorized to perform the requested operation.
-
ConflictException–The requested operation could not be completed due to a conflict with the current state of the resource.
-
ContentTooLargeException–The requested operation could not be completed because the content exceeds the maximum allowed size.
-
InternalServerException–An internal service error occurred while processing the request.
-
ServiceQuotaExceededException–The requested operation could not be completed because it would exceed the service's quota or limit.
-
ThrottlingException–The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
-
UnauthorizedException–The client is not authenticated or authorized to perform the requested operation.
-
ValidationException–The input failed to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
A basic application with 1 text input card and 1 output card
>>> await client.create_q_app(instance_id='0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', title='Color Palette Generator', app_definition={'cards': [{'textInput': {'type': 'text-input', 'title': 'Color Base', 'id': '4cf94d96-8819-45c2-98cc-58c56b35c72f'}}, {'qQuery': {'type': 'q-query', 'title': 'Recommended Palette', 'id': '18870b94-1e63-40e0-8c12-669c90ac5acc', 'prompt': 'Recommend me a list of colors that go well with @4cf94d96-8819-45c2-98cc-58c56b35c72f'}}], 'initialPrompt': 'Create an app that recommend a list of colors based on input.'})