createFieldLevelEncryptionConfig2017_10_30 method

Future<CreateFieldLevelEncryptionConfigResult> createFieldLevelEncryptionConfig2017_10_30({
  1. required FieldLevelEncryptionConfig fieldLevelEncryptionConfig,
})

Create a new field-level encryption configuration.

May throw InconsistentQuantities. May throw InvalidArgument. May throw NoSuchFieldLevelEncryptionProfile. May throw FieldLevelEncryptionConfigAlreadyExists. May throw TooManyFieldLevelEncryptionConfigs. May throw TooManyFieldLevelEncryptionQueryArgProfiles. May throw TooManyFieldLevelEncryptionContentTypeProfiles. May throw QueryArgProfileEmpty.

Parameter fieldLevelEncryptionConfig : The request to create a new field-level encryption configuration.

Implementation

Future<CreateFieldLevelEncryptionConfigResult>
    createFieldLevelEncryptionConfig2017_10_30({
  required FieldLevelEncryptionConfig fieldLevelEncryptionConfig,
}) async {
  ArgumentError.checkNotNull(
      fieldLevelEncryptionConfig, 'fieldLevelEncryptionConfig');
  final $result = await _protocol.sendRaw(
    method: 'POST',
    requestUri: '/2017-10-30/field-level-encryption',
    payload: fieldLevelEncryptionConfig.toXml('FieldLevelEncryptionConfig'),
    exceptionFnMap: _exceptionFns,
  );
  final $elem = await _s.xmlFromResponse($result);
  return CreateFieldLevelEncryptionConfigResult(
    fieldLevelEncryption: FieldLevelEncryption.fromXml($elem),
    eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
    location: _s.extractHeaderStringValue($result.headers, 'Location'),
  );
}