def _update_entity(entity, if_match, encryption_required=False,<EOL>key_encryption_key=None, encryption_resolver=None):
_validate_not_none('<STR_LIT>', if_match)<EOL>_validate_entity(entity, key_encryption_key is not None)<EOL>_validate_encryption_required(encryption_required, key_encryption_key)<EOL>request = HTTPRequest()<EOL>request.method = '<STR_LIT>'<EOL>request.headers = {<EOL>_DEFAULT_CONTENT_TYPE_HEADER[<NUM_LIT:0>]: _DEFAULT_CONTENT_TYPE_HEADER[<NUM_LIT:1>],<EOL>_DEFAULT_ACCEPT_HEADER[<NUM_LIT:0>]: _DEFAULT_ACCEPT_HEADER[<NUM_LIT:1>],<EOL>'<STR_LIT>': _to_str(if_match),<EOL>}<EOL>if(key_encryption_key):<EOL><INDENT>entity = _encrypt_entity(entity, key_encryption_key, encryption_resolver)<EOL><DEDENT>request.body = _get_request_body(_convert_entity_to_json(entity))<EOL>return request<EOL>
Constructs an update entity request.
:param entity:
    The entity to insert. Could be a dict or an entity object.
:param object key_encryption_key:
    The user-provided key-encryption-key. Must implement the following methods:
    wrap_key(key)--wraps the specified key using an algorithm of the user's choice.
    get_key_wrap_algorithm()--returns the algorithm used to wrap the specified symmetric key.
    get_kid()--returns a string key id for this key-encryption-key.
:param function(partition_key, row_key, property_name) encryption_resolver:
    A function that takes in an entities partition key, row key, and property name and returns 
    a boolean that indicates whether that property should be encrypted.