PUT /machines/:id/metadata.:format
17296
def create(params={})
      key = params.delete(:key)
      machine.request_options = machine.request_options.merge(body: parse_params(params, :metadata).to_json)
      Zcloudjp::Client.put("/machines/#{machine.id}/metadata/#{key}", machine.request_options)
    end
1251114
public void put(String ID,
                    String resourceName,
                    int dir,
                    boolean visible) {
        registerEntry(ID, new ResourceEntry(resourceName, dir), visible);
    }
464081
def update(self, resource, rid, updates):
        
        if resource[-1] != '/':
            resource += '/'
        resource += str(rid)
        return self.put(resource, data=updates)
695111
def put_directory(self, mdir):
        
        log.debug('PutDirectory %r', mdir)
        headers = {"Content-Type": "application/json; type=directory"}
        res, content = self._request(mdir, "PUT", headers=headers)
        if res["status"] != "204":
            raise errors.MantaAPIError(res, content)
1215168
def save
      ensure_name_metadata_set

      redis.pipelined do
        redis.hmset("id:#{id}", *metadata.to_a.flatten)
        redis.set("name:#{name}", id)
      end
    end
1045096
def _WriteStorageMetadata(self):
    """"""
    self._cursor.execute(self._CREATE_METADATA_TABLE_QUERY)

    query = 'INSERT INTO metadata (key, value) VALUES (?, ?)'

    key = 'format_version'
    value = '{0:d}'.format(self._FORMAT_VERSION)
    self._cursor.execute(query, (key, value))

    key = 'compression_format'
    value = self.compression_format
    self._cursor.execute(query, (key, value))

    key = 'serialization_format'
    value = self.serialization_format
    self._cursor.execute(query, (key, value))

    key = 'storage_type'
    value = self.storage_type
    self._cursor.execute(query, (key, value))
435617
def add_item_metadata(self, handle, key, value):
        
        _mkdir_if_missing(self._metadata_fragments_abspath)

        prefix = self._handle_to_fragment_absprefixpath(handle)
        fpath = prefix + '.{}.json'.format(key)

        _put_obj(fpath, value)
915582
def _update_meta(self):
        
        for v in ["filename", "location", "prefix"]:
            if "meta" not in self:
                self["meta"] = {}
            self["meta"][v] = self[v]
            del self[v]
346759
public FileIndexBuilder putMetadata(String key, String value) {
        checkIfDestroyed();
        metadata.put(key, value);
        return this;
    }
167794
def put_admin_metadata(self, admin_metadata):
        """"""
        logger.debug("Putting admin metdata")
        text = json.dumps(admin_metadata)
        key = self.get_admin_metadata_key()
        self.put_text(key, text)
233675
def add_metadata_to_archive(self, metadata, meta_path):
        '''
        
        '''
        archive_path = self.get_full_archive_path(meta_path.lstrip('/'))
        write_data_to_file(metadata, archive_path)
210479
def put(path: nil, payload:, headers: {}, query: {})
      execute(method: :put, path: path, headers: headers, query: query, payload: payload)
    end
833575
def add_change(address, metadata={})
      add_output(
        value: change_value,
        address: address,
        metadata: {memo: "change"}.merge(metadata)
      )
    end
511702
function (db, id, doc, metadata, cb) {
			var operations = [
				{
					Method: "PUT",
					Document: doc,
					Metadata: metadata,
					Key: id
				}
			];
			request.post({
				url: host + 'databases/' + db + '/bulk_docs',
				headers: {
					'Content-Type': 'application/json; charset=utf-8'
				},
				body: JSON.stringify(operations)
			}, function (error, response, resBody) {
				if (!error && response.statusCode === 200) {
					var result = JSON.parse(resBody);
					cb(null, result);
				} else {
					cb(error || new Error(response.statusCode), null);
				}
			});
		}
901180
def update_metadata(self):
        
        if self._data_directory is None:
            raise Exception('Need to call `api.set_data_directory` first.')

        metadata_url = 'https://repo.continuum.io/pkgs/metadata.json'
        filepath = os.sep.join([self._data_directory, 'metadata.json'])
        worker = self.download_requests(metadata_url, filepath)
        return worker
924890
def add_metadata(self, key, value):
        
        self._metadata[key] = value

        # write the current metadata to file
        json.dump(self._metadata, open(self.metadata_filename, 'w'),
                  indent=JSON_INDENT,
                  sort_keys=True)
891333
def create(params={})
      self.request_options = self.request_options.merge(body: params.to_json)
      response = Zcloudjp::Client.post("/machines", self.request_options)
      update_attributes(response.parsed_response)
    end