createDomain method
Creates a new Domain for managing HealthAgent resources.
May throw ServiceQuotaExceededException.
Parameter name :
The name for the new Domain.
Parameter kmsKeyArn :
The ARN of the KMS key to use for encrypting data in this Domain.
Parameter tags :
Tags to associate with the Domain.
Parameter webAppSetupConfiguration :
Configuration for the Domain web application. Optional, but if provided
all fields are required.
Implementation
Future<CreateDomainOutput> createDomain({
required String name,
String? kmsKeyArn,
Map<String, String>? tags,
CreateWebAppConfiguration? webAppSetupConfiguration,
}) async {
final $payload = <String, dynamic>{
'name': name,
if (kmsKeyArn != null) 'kmsKeyArn': kmsKeyArn,
if (tags != null) 'tags': tags,
if (webAppSetupConfiguration != null)
'webAppSetupConfiguration': webAppSetupConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/domain',
exceptionFnMap: _exceptionFns,
);
return CreateDomainOutput.fromJson(response);
}