createFieldLevelEncryptionProfile2018_11_05 method

Future<CreateFieldLevelEncryptionProfileResult> createFieldLevelEncryptionProfile2018_11_05({
  1. required FieldLevelEncryptionProfileConfig fieldLevelEncryptionProfileConfig,
})

Create a field-level encryption profile.

May throw InconsistentQuantities. May throw InvalidArgument. May throw NoSuchPublicKey. May throw FieldLevelEncryptionProfileAlreadyExists. May throw FieldLevelEncryptionProfileSizeExceeded. May throw TooManyFieldLevelEncryptionProfiles. May throw TooManyFieldLevelEncryptionEncryptionEntities. May throw TooManyFieldLevelEncryptionFieldPatterns.

Parameter fieldLevelEncryptionProfileConfig : The request to create a field-level encryption profile.

Implementation

Future<CreateFieldLevelEncryptionProfileResult>
    createFieldLevelEncryptionProfile2018_11_05({
  required FieldLevelEncryptionProfileConfig
      fieldLevelEncryptionProfileConfig,
}) async {
  ArgumentError.checkNotNull(
      fieldLevelEncryptionProfileConfig, 'fieldLevelEncryptionProfileConfig');
  final $result = await _protocol.sendRaw(
    method: 'POST',
    requestUri: '/2018-11-05/field-level-encryption-profile',
    payload: fieldLevelEncryptionProfileConfig
        .toXml('FieldLevelEncryptionProfileConfig'),
    exceptionFnMap: _exceptionFns,
  );
  final $elem = await _s.xmlFromResponse($result);
  return CreateFieldLevelEncryptionProfileResult(
    fieldLevelEncryptionProfile: FieldLevelEncryptionProfile.fromXml($elem),
    eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
    location: _s.extractHeaderStringValue($result.headers, 'Location'),
  );
}