Updates a pipeline with the provided attributes.
		Args:
			key			required identifier for the pipeline
			pipeline	StreakPipeline object
			return		(status code, pipeline_dict)
433956
def update_pipeline(self, pipeline):
		'''
		'''
		#req sanity check
		payload = None
		if  type(pipeline) is not StreakPipeline:
			return requests.codes.bad_request, None

		payload = pipeline.to_dict(rw = True)

		try:
			uri = '/'.join([
						self.api_uri,
						self.pipelines_suffix,
						pipeline.attributes['pipelineKey']
						])
		except KeyError:
			return requests.codes.bad_request, None
	
		code, r_data = self._req('post', uri , json.dumps(payload))

		return code, r_data
831049
def _api_key_patch_replace(conn, apiKey, path, value):
    '''
    
    '''
    response = conn.update_api_key(apiKey=apiKey,
                                   patchOperations=[{'op': 'replace', 'path': path, 'value': value}])
    return response
852464
def update(self, new_vals):
        
        for k, v in six.iteritems(new_vals):
            k = k.strip()
            if k in self.row:
                warnings.warn("Adding history key ({}) that is already set in this step".format(
                    k), wandb.WandbWarning)
            self.row[k] = v
1369837
def refresh(self, key):
        """"""
        s0 = self[key]
        s = self.backtrack(key)
        s.persist(**s0.metadata['persist_kwargs'])
1290016
def update(self, data):
        
        result = None
        if data:
            pipe = self._client.pipeline(transaction=False)
            for k in data.keys():
                pipe.exists(self.get_key(k))
            exists = pipe.execute()
            exists = exists.count(True)
            _rk, _dumps = self.get_key, self._dumps
            data = {
                _rk(key): _dumps(value)
                for key, value in data.items()}
            pipe.mset(data)
            pipe.hincrby(self._bucket_key, self.key_prefix, len(data)-exists)
            result = pipe.execute()[0]
        return result
502862
def run_callback(self):
    
    pipeline_id = self.request.get('pipeline_id')
    if not pipeline_id:
      raise _CallbackTaskError('"pipeline_id" parameter missing.')

    pipeline_key = db.Key.from_path(_PipelineRecord.kind(), pipeline_id)
    pipeline_record = db.get(pipeline_key)
    if pipeline_record is None:
      raise _CallbackTaskError(
          'Pipeline ID "%s" for callback does not exist.' % pipeline_id)

    params = pipeline_record.params
    real_class_path = params['class_path']
    try:
      pipeline_func_class = mr_util.for_name(real_class_path)
    except ImportError, e:
      raise _CallbackTaskError(
          'Cannot load class named "%s" for pipeline ID "%s".'
          % (real_class_path, pipeline_id))

    if 'HTTP_X_APPENGINE_TASKNAME' not in self.request.environ:
      if pipeline_func_class.public_callbacks:
        pass
      elif pipeline_func_class.admin_callbacks:
        if not users.is_current_user_admin():
          raise _CallbackTaskError(
              'Unauthorized callback for admin-only pipeline ID "%s"'
              % pipeline_id)
      else:
        raise _CallbackTaskError(
            'External callback for internal-only pipeline ID "%s"'
            % pipeline_id)

    kwargs = {}
    for key in self.request.arguments():
      if key != 'pipeline_id':
        kwargs[str(key)] = self.request.get(key)

    def perform_callback():
      stage = pipeline_func_class.from_id(pipeline_id)
      if stage is None:
        raise _CallbackTaskError(
            'Pipeline ID "%s" deleted during callback' % pipeline_id)
      return stage._callback_internal(kwargs)

    # callback_xg_transaction is a 3-valued setting (None=no trans,
    # False=1-eg-trans, True=xg-trans)
    if pipeline_func_class._callback_xg_transaction is not None:
      transaction_options = db.create_transaction_options(
          xg=pipeline_func_class._callback_xg_transaction)
      callback_result = db.run_in_transaction_options(transaction_options,
                                                      perform_callback)
    else:
      callback_result = perform_callback()

    if callback_result is not None:
      status_code, content_type, content = callback_result
      self.response.set_status(status_code)
      self.response.headers['Content-Type'] = content_type
      self.response.out.write(content)
569394
def update(self, identifier, new_instance):
        
        old_instance = self.retrieve(identifier)
        old_encrypted_identifier = old_instance.encrypted_identifier

        if (
            new_instance.encryption_context_key and
            old_instance.encryption_context_key != new_instance.encryption_context_key
        ):
            raise ValueError("Cannot change encryption context key")

        # If updating a non encrypted field - skip
        if new_instance.plaintext is None and new_instance.encrypted_relationship is None:
            result = super().update(identifier, new_instance)
            self.expunge(result)
            return result

        # Verify that the new instance is encrypted if it should be
        # If it's not - encrypt it with the old key
        # If it is - save the expected new plaintext
        if new_instance.plaintext is not None:
            expected_new_plaintext = new_instance.plaintext
            new_instance = self.reencrypt_instance(new_instance, old_instance.encryption_context_key)
        else:
            decrypt, expected_new_plaintext = decrypt_instance(new_instance)

        result = super().update(identifier, new_instance)

        # Delete the old encrypted value (instead of using sqlalchemy cascade)
        if old_encrypted_identifier != new_instance.encrypted_identifier:
            self.encrypted_store.delete(old_encrypted_identifier)

        # Update the return result, super().update() won't do it.
        self.expunge(result)
        result.plaintext = expected_new_plaintext
        return result
1185449
def get_pipeline(self, *args, **kwargs):
        '''
        

        '''

        return getattr(missions, self.mission).pipelines.get(self.ID, *args,
                                                             **kwargs)
861725
def update_from_dict(self, data_dict):
        
        for k, v in data_dict.items():
            setattr(self, k, v)
        if "item_queue_id" in data_dict:
            self.id = data_dict["item_queue_id"]
959329
def update_credentials(self, aws_access_key_id, aws_secret_access_key):
        '''  '''
        self.aws_access_key_id = aws_access_key_id
        self.aws_secret_access_key = aws_secret_access_key
866832
def describe_pipelines(pipeline_ids, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    client = _get_client(region, key, keyid, profile)
    r = {}
    try:
        r['result'] = client.describe_pipelines(pipelineIds=pipeline_ids)
    except (botocore.exceptions.BotoCoreError, botocore.exceptions.ClientError) as e:
        r['error'] = six.text_type(e)
    return r
82476
def update_with_diff(self, identifier, new_instance):
        
        with self.flushing():
            instance = self.retrieve(identifier)
            before = Version(instance)
            self.merge(instance, new_instance)
            instance.updated_at = instance.new_timestamp()
            after = Version(instance)
        return instance, before - after
327874
def update(self, data=None, **kwargs):
        
        if data is None:
            data = {}
        data.update(kwargs)
        return self.model.write([self.id], data)
285856
def update(self, key, item):
        
        return lib.zhash_update(self._as_parameter_, key, item)
536094
def update(self, key: str, data: np.ndarray) -> None:
        
        self.data[key] = data
203901
def _update_access_key_pair(self, access_key_id, key, val):
        
        # Get current state via HTTPS.
        current_access_key = self.get_access_key(access_key_id)

        # Copy and only change the single parameter.
        payload_dict = KeenApi._build_access_key_dict(current_access_key)
        payload_dict[key] = val

        # Now just treat it like a full update.
        return self.update_access_key_full(access_key_id, **payload_dict)
932896
def refresh_keys(key_type, custom_headers:nil)
      response = refresh_keys_async(key_type, custom_headers:custom_headers).value!
      response.body unless response.nil?
    end