createKxEnvironment method

Future<CreateKxEnvironmentResponse> createKxEnvironment({
  1. required String kmsKeyId,
  2. required String name,
  3. String? clientToken,
  4. String? description,
  5. Map<String, String>? tags,
})

Creates a managed kdb environment for the account.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw LimitExceededException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter kmsKeyId : The KMS key ID to encrypt your data in the FinSpace environment.

Parameter name : The name of the kdb environment that you want to create.

Parameter clientToken : A token that ensures idempotency. This token expires in 10 minutes.

Parameter description : A description for the kdb environment.

Parameter tags : A list of key-value pairs to label the kdb environment. You can add up to 50 tags to your kdb environment.

Implementation

Future<CreateKxEnvironmentResponse> createKxEnvironment({
  required String kmsKeyId,
  required String name,
  String? clientToken,
  String? description,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'kmsKeyId': kmsKeyId,
    'name': name,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'description': description,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/kx/environments',
    exceptionFnMap: _exceptionFns,
  );
  return CreateKxEnvironmentResponse.fromJson(response);
}