createApplication method
- required String displayName,
- AttachmentsConfiguration? attachmentsConfiguration,
- List<
String> ? clientIdsForOIDC, - String? clientToken,
- String? description,
- EncryptionConfiguration? encryptionConfiguration,
- String? iamIdentityProviderArn,
- String? identityCenterInstanceArn,
- IdentityType? identityType,
- PersonalizationConfiguration? personalizationConfiguration,
- QAppsConfiguration? qAppsConfiguration,
- QuickSightConfiguration? quickSightConfiguration,
- String? roleArn,
- List<
Tag> ? tags,
Creates an Amazon Q Business application.
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.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter displayName :
A name for the Amazon Q Business application.
Parameter attachmentsConfiguration :
An option to allow end users to upload files directly during chat.
Parameter clientIdsForOIDC :
The OIDC client ID for a Amazon Q Business application.
Parameter clientToken :
A token that you provide to identify the request to create your Amazon Q
Business application.
Parameter description :
A description for the Amazon Q Business application.
Parameter encryptionConfiguration :
The identifier of the KMS key that is used to encrypt your data. Amazon Q
Business doesn't support asymmetric keys.
Parameter iamIdentityProviderArn :
The Amazon Resource Name (ARN) of an identity provider being used by an
Amazon Q Business application.
Parameter identityCenterInstanceArn :
The Amazon Resource Name (ARN) of the IAM Identity Center instance you are
either creating for—or connecting to—your Amazon Q Business application.
Parameter identityType :
The authentication type being used by a Amazon Q Business application.
Parameter personalizationConfiguration :
Configuration information about chat response personalization. For more
information, see Personalizing
chat responses
Parameter qAppsConfiguration :
An option to allow end users to create and use Amazon Q Apps in the web
experience.
Parameter quickSightConfiguration :
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.
Parameter roleArn :
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.
Parameter tags :
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: _ . : / = + - @.
Implementation
Future<CreateApplicationResponse> createApplication({
required String displayName,
AttachmentsConfiguration? attachmentsConfiguration,
List<String>? clientIdsForOIDC,
String? clientToken,
String? description,
EncryptionConfiguration? encryptionConfiguration,
String? iamIdentityProviderArn,
String? identityCenterInstanceArn,
IdentityType? identityType,
PersonalizationConfiguration? personalizationConfiguration,
QAppsConfiguration? qAppsConfiguration,
QuickSightConfiguration? quickSightConfiguration,
String? roleArn,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'displayName': displayName,
if (attachmentsConfiguration != null)
'attachmentsConfiguration': attachmentsConfiguration,
if (clientIdsForOIDC != null) 'clientIdsForOIDC': clientIdsForOIDC,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (encryptionConfiguration != null)
'encryptionConfiguration': encryptionConfiguration,
if (iamIdentityProviderArn != null)
'iamIdentityProviderArn': iamIdentityProviderArn,
if (identityCenterInstanceArn != null)
'identityCenterInstanceArn': identityCenterInstanceArn,
if (identityType != null) 'identityType': identityType.value,
if (personalizationConfiguration != null)
'personalizationConfiguration': personalizationConfiguration,
if (qAppsConfiguration != null) 'qAppsConfiguration': qAppsConfiguration,
if (quickSightConfiguration != null)
'quickSightConfiguration': quickSightConfiguration,
if (roleArn != null) 'roleArn': roleArn,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/applications',
exceptionFnMap: _exceptionFns,
);
return CreateApplicationResponse.fromJson(response);
}