createFieldLevelEncryptionProfile2018_06_18 method

Future<CreateFieldLevelEncryptionProfileResult> createFieldLevelEncryptionProfile2018_06_18({
  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_06_18({
  required FieldLevelEncryptionProfileConfig
      fieldLevelEncryptionProfileConfig,
}) async {
  ArgumentError.checkNotNull(
      fieldLevelEncryptionProfileConfig, 'fieldLevelEncryptionProfileConfig');
  final $result = await _protocol.sendRaw(
    method: 'POST',
    requestUri: '/2018-06-18/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'),
  );
}