updateFieldLevelEncryptionConfig2018_06_18 method

Future<UpdateFieldLevelEncryptionConfigResult> updateFieldLevelEncryptionConfig2018_06_18(
  1. {@required FieldLevelEncryptionConfig fieldLevelEncryptionConfig,
  2. @required String id,
  3. String ifMatch}
)

Update a field-level encryption configuration.

May throw AccessDenied. May throw IllegalUpdate. May throw InconsistentQuantities. May throw InvalidArgument. May throw InvalidIfMatchVersion. May throw NoSuchFieldLevelEncryptionProfile. May throw NoSuchFieldLevelEncryptionConfig. May throw PreconditionFailed. May throw TooManyFieldLevelEncryptionQueryArgProfiles. May throw TooManyFieldLevelEncryptionContentTypeProfiles. May throw QueryArgProfileEmpty.

Parameter fieldLevelEncryptionConfig : Request to update a field-level encryption configuration.

Parameter id : The ID of the configuration you want to update.

Parameter ifMatch : The value of the ETag header that you received when retrieving the configuration identity to update. For example: E2QWRUHAPOMQZL.

Implementation

Future<UpdateFieldLevelEncryptionConfigResult>
    updateFieldLevelEncryptionConfig2018_06_18({
  @_s.required FieldLevelEncryptionConfig fieldLevelEncryptionConfig,
  @_s.required String id,
  String ifMatch,
}) async {
  ArgumentError.checkNotNull(
      fieldLevelEncryptionConfig, 'fieldLevelEncryptionConfig');
  ArgumentError.checkNotNull(id, 'id');
  final headers = <String, String>{};
  ifMatch?.let((v) => headers['If-Match'] = v.toString());
  final $result = await _protocol.sendRaw(
    method: 'PUT',
    requestUri:
        '/2018-06-18/field-level-encryption/${Uri.encodeComponent(id)}/config',
    headers: headers,
    payload: fieldLevelEncryptionConfig.toXml('FieldLevelEncryptionConfig'),
    exceptionFnMap: _exceptionFns,
  );
  final $elem = await _s.xmlFromResponse($result);
  return UpdateFieldLevelEncryptionConfigResult(
    fieldLevelEncryption: FieldLevelEncryption.fromXml($elem),
    eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
  );
}