def update_item(self, table_name, key_dict,
                    condition_expression=None,
                    update_expression=None,
                    expression_attribute_names=None,
                    expression_attribute_values=None,
                    return_consumed_capacity=None,
                    return_item_collection_metrics=None,
                    return_values=None):
        payload = {'TableName': table_name,
                   'Key': utils.marshall(key_dict),
                   'UpdateExpression': update_expression}
        if condition_expression:
            payload['ConditionExpression'] = condition_expression
        if expression_attribute_names:
            payload['ExpressionAttributeNames'] = expression_attribute_names
        if expression_attribute_values:
            payload['ExpressionAttributeValues'] = \
                utils.marshall(expression_attribute_values)
        if return_consumed_capacity:
            _validate_return_consumed_capacity(return_consumed_capacity)
            payload['ReturnConsumedCapacity'] = return_consumed_capacity
        if return_item_collection_metrics:
            _validate_return_item_collection_metrics(
                return_item_collection_metrics)
            payload['ReturnItemCollectionMetrics'] = \
                return_item_collection_metrics
        if return_values:
            _validate_return_values(return_values)
            payload['ReturnValues'] = return_values
        return self.execute('UpdateItem', payload)