updateFieldLevelEncryptionProfile2019_03_26 method
- required FieldLevelEncryptionProfileConfig fieldLevelEncryptionProfileConfig,
- required String id,
- 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>
updateFieldLevelEncryptionProfile2019_03_26({
required FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig,
required String id,
String? ifMatch,
}) async {
ArgumentError.checkNotNull(
fieldLevelEncryptionProfileConfig, 'fieldLevelEncryptionProfileConfig');
ArgumentError.checkNotNull(id, 'id');
final headers = <String, String>{
if (ifMatch != null) 'If-Match': ifMatch.toString(),
};
final $result = await _protocol.sendRaw(
method: 'PUT',
requestUri:
'/2019-03-26/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'),
);
}