createDomain method
Creates an Amazon DataZone domain.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
The name of the Amazon DataZone domain.
Parameter clientToken :
A unique, case-sensitive identifier that is provided to ensure the
idempotency of the request.
Parameter description :
The description of the Amazon DataZone domain.
Parameter domainExecutionRole :
The domain execution role that is created when an Amazon DataZone domain
is created. The domain execution role is created in the Amazon Web
Services account that houses the Amazon DataZone domain.
Parameter domainVersion :
The version of the domain that is created.
Parameter kmsKeyIdentifier :
The identifier of the Amazon Web Services Key Management Service (KMS) key
that is used to encrypt the Amazon DataZone domain, metadata, and
reporting data.
Parameter serviceRole :
The service role of the domain that is created.
Parameter singleSignOn :
The single-sign on configuration of the Amazon DataZone domain.
Parameter tags :
The tags specified for the Amazon DataZone domain.
Implementation
Future<CreateDomainOutput> createDomain({
required String name,
String? clientToken,
String? description,
String? domainExecutionRole,
DomainVersion? domainVersion,
String? kmsKeyIdentifier,
String? serviceRole,
SingleSignOn? singleSignOn,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'name': name,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (domainExecutionRole != null)
'domainExecutionRole': domainExecutionRole,
if (domainVersion != null) 'domainVersion': domainVersion.value,
if (kmsKeyIdentifier != null) 'kmsKeyIdentifier': kmsKeyIdentifier,
if (serviceRole != null) 'serviceRole': serviceRole,
if (singleSignOn != null) 'singleSignOn': singleSignOn,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v2/domains',
exceptionFnMap: _exceptionFns,
);
return CreateDomainOutput.fromJson(response);
}