createFieldLevelEncryptionConfig2018_06_18 method

Future<CreateFieldLevelEncryptionConfigResult> createFieldLevelEncryptionConfig2018_06_18(
  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>
    createFieldLevelEncryptionConfig2018_06_18({
  @_s.required FieldLevelEncryptionConfig fieldLevelEncryptionConfig,
}) async {
  ArgumentError.checkNotNull(
      fieldLevelEncryptionConfig, 'fieldLevelEncryptionConfig');
  final $result = await _protocol.sendRaw(
    method: 'POST',
    requestUri: '/2018-06-18/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'),
  );
}