createApplication method
Creates an OpenSearch UI application. For more information, see Using the OpenSearch user interface in Amazon OpenSearch Service.
May throw AccessDeniedException.
May throw BaseException.
May throw ConflictException.
May throw DisabledOperationException.
May throw InternalException.
May throw ValidationException.
Parameter name :
The unique name of the OpenSearch application. Names must be unique within
an Amazon Web Services Region for each account.
Parameter appConfigs :
Configuration settings for the OpenSearch application, including
administrative options.
Parameter clientToken :
Unique, case-sensitive identifier to ensure idempotency of the request.
Parameter dataSources :
The data sources to link to the OpenSearch application.
Parameter iamIdentityCenterOptions :
Configuration settings for integrating Amazon Web Services IAM Identity
Center with the OpenSearch application.
Parameter kmsKeyArn :
The Amazon Resource Name (ARN) of the KMS key used to encrypt the
application's data at rest. If provided, the application uses your
customer-managed key for encryption. If omitted, the application uses an
AWS-managed key. The KMS key must be in the same region as the
application.
Implementation
Future<CreateApplicationResponse> createApplication({
required String name,
List<AppConfig>? appConfigs,
String? clientToken,
List<DataSource>? dataSources,
IamIdentityCenterOptionsInput? iamIdentityCenterOptions,
String? kmsKeyArn,
List<Tag>? tagList,
}) async {
final $payload = <String, dynamic>{
'name': name,
if (appConfigs != null) 'appConfigs': appConfigs,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (dataSources != null) 'dataSources': dataSources,
if (iamIdentityCenterOptions != null)
'iamIdentityCenterOptions': iamIdentityCenterOptions,
if (kmsKeyArn != null) 'kmsKeyArn': kmsKeyArn,
if (tagList != null) 'tagList': tagList,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/2021-01-01/opensearch/application',
exceptionFnMap: _exceptionFns,
);
return CreateApplicationResponse.fromJson(response);
}