updateFieldLevelEncryptionProfile2018_06_18 method

Future<UpdateFieldLevelEncryptionProfileResult> updateFieldLevelEncryptionProfile2018_06_18(
  1. {@required FieldLevelEncryptionProfileConfig fieldLevelEncryptionProfileConfig,
  2. @required String id,
  3. String ifMatch}
)

Update a field-level encryption profile.

May throw AccessDenied. May throw FieldLevelEncryptionProfileAlreadyExists. May throw IllegalUpdate. May throw InconsistentQuantities. May throw InvalidArgument. May throw InvalidIfMatchVersion. May throw NoSuchPublicKey. May throw NoSuchFieldLevelEncryptionProfile. May throw PreconditionFailed. May throw FieldLevelEncryptionProfileSizeExceeded. May throw TooManyFieldLevelEncryptionEncryptionEntities. May throw TooManyFieldLevelEncryptionFieldPatterns.

Parameter fieldLevelEncryptionProfileConfig : Request to update a field-level encryption profile.

Parameter id : The ID of the field-level encryption profile request.

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

Implementation

Future<UpdateFieldLevelEncryptionProfileResult>
    updateFieldLevelEncryptionProfile2018_06_18({
  @_s.required
      FieldLevelEncryptionProfileConfig fieldLevelEncryptionProfileConfig,
  @_s.required String id,
  String ifMatch,
}) async {
  ArgumentError.checkNotNull(
      fieldLevelEncryptionProfileConfig, 'fieldLevelEncryptionProfileConfig');
  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-profile/${Uri.encodeComponent(id)}/config',
    headers: headers,
    payload: fieldLevelEncryptionProfileConfig
        .toXml('FieldLevelEncryptionProfileConfig'),
    exceptionFnMap: _exceptionFns,
  );
  final $elem = await _s.xmlFromResponse($result);
  return UpdateFieldLevelEncryptionProfileResult(
    fieldLevelEncryptionProfile: FieldLevelEncryptionProfile.fromXml($elem),
    eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
  );
}