createWebExperience method
- required String applicationId,
- BrowserExtensionConfiguration? browserExtensionConfiguration,
- String? clientToken,
- CustomizationConfiguration? customizationConfiguration,
- IdentityProviderConfiguration? identityProviderConfiguration,
- List<
String> ? origins, - String? roleArn,
- WebExperienceSamplePromptsControlMode? samplePromptsControlMode,
- String? subtitle,
- List<
Tag> ? tags, - String? title,
- String? welcomeMessage,
Creates an Amazon Q Business web experience.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationId :
The identifier of the Amazon Q Business web experience.
Parameter browserExtensionConfiguration :
The browser extension configuration for an Amazon Q Business web
experience.
Parameter clientToken :
A token you provide to identify a request to create an Amazon Q Business
web experience.
Parameter customizationConfiguration :
Sets the custom logo, favicon, font, and color used in the Amazon Q web
experience.
Parameter identityProviderConfiguration :
Information about the identity provider (IdP) used to authenticate end
users of an Amazon Q Business web experience.
Parameter origins :
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).
Parameter roleArn :
The Amazon Resource Name (ARN) of the service role attached to your web
experience.
Parameter samplePromptsControlMode :
Determines whether sample prompts are enabled in the web experience for an
end user.
Parameter subtitle :
A subtitle to personalize your Amazon Q Business web experience.
Parameter tags :
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: _ . : / = + - @.
Parameter title :
The title for your Amazon Q Business web experience.
Parameter welcomeMessage :
The customized welcome message for end users of an Amazon Q Business web
experience.
Implementation
Future<CreateWebExperienceResponse> createWebExperience({
required String applicationId,
BrowserExtensionConfiguration? browserExtensionConfiguration,
String? clientToken,
CustomizationConfiguration? customizationConfiguration,
IdentityProviderConfiguration? identityProviderConfiguration,
List<String>? origins,
String? roleArn,
WebExperienceSamplePromptsControlMode? samplePromptsControlMode,
String? subtitle,
List<Tag>? tags,
String? title,
String? welcomeMessage,
}) async {
final $payload = <String, dynamic>{
if (browserExtensionConfiguration != null)
'browserExtensionConfiguration': browserExtensionConfiguration,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (customizationConfiguration != null)
'customizationConfiguration': customizationConfiguration,
if (identityProviderConfiguration != null)
'identityProviderConfiguration': identityProviderConfiguration,
if (origins != null) 'origins': origins,
if (roleArn != null) 'roleArn': roleArn,
if (samplePromptsControlMode != null)
'samplePromptsControlMode': samplePromptsControlMode.value,
if (subtitle != null) 'subtitle': subtitle,
if (tags != null) 'tags': tags,
if (title != null) 'title': title,
if (welcomeMessage != null) 'welcomeMessage': welcomeMessage,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/experiences',
exceptionFnMap: _exceptionFns,
);
return CreateWebExperienceResponse.fromJson(response);
}