createSystem method
Creates a system that represents a logical grouping of services.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter sharingEnabled :
Indicates whether cross-account sharing is enabled for the system.
Implementation
Future<CreateSystemResponse> createSystem({
required String name,
String? clientToken,
String? description,
String? kmsKeyId,
bool? sharingEnabled,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'name': name,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (kmsKeyId != null) 'kmsKeyId': kmsKeyId,
if (sharingEnabled != null) 'sharingEnabled': sharingEnabled,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v2/create-system',
exceptionFnMap: _exceptionFns,
);
return CreateSystemResponse.fromJson(response);
}