MCPcopy Create free account
hub / github.com/StackStorm/st2 / update

Method update

st2client/st2client/models/core.py:379–385  ·  view source on GitHub ↗
(self, instance, **kwargs)

Source from the content-addressed store, hash-verified

377
378 @add_auth_token_to_kwargs_from_env
379 def update(self, instance, **kwargs):
380 url = "/%s/%s" % (self.resource.get_url_path_name(), instance.id)
381 response = self.client.put(url, instance.serialize(), **kwargs)
382 if response.status_code != http_client.OK:
383 self.handle_error(response)
384 instance = self.resource.deserialize(parse_api_response(response))
385 return instance
386
387 @add_auth_token_to_kwargs_from_env
388 def delete(self, instance, **kwargs):

Callers 1

test_resource_updateMethod · 0.95

Calls 6

handle_errorMethod · 0.95
parse_api_responseFunction · 0.85
get_url_path_nameMethod · 0.80
serializeMethod · 0.80
deserializeMethod · 0.80
putMethod · 0.45

Tested by 1

test_resource_updateMethod · 0.76