Show Table of Contents
3.7. Updating a Resource in a Collection
To update a resource you must retrieve it from the collection it resides in, modify the desired parameters, and then call the
update method for the resource to save the changes. Parameter modification is performed by using the set_* methods of the retrieved resource.
Example 3.7. Updating a Resource
In this example the data center named
DemoDataCenter has its description updated.
dc = api.datacenters.get("DemoDataCenter")
dc.set_description("This data center description provided using the Python SDK")
dc.update()

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.