Previously, the 'terminate' action was not exposed in the Red Hat CloudForms REST API. This prevented users from integrating CloudForms with external IP process applications to manage the complete life cycle of instances. With this update, this functionality has now been exposed in the REST API.
Successfully terminated an ec2 instance using REST API in 5.5.2.2.Marking the BZ as VERIFIED.
from utils.api import API
api = API("https://xx.yy.zz.aa/api/", auth=('admin','smartvm'))
inc = api.collections.instances.get(id=2024)
inc.action.terminate()
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2016:0159
Successfully terminated an ec2 instance using REST API in 5.5.2.2.Marking the BZ as VERIFIED. from utils.api import API api = API("https://xx.yy.zz.aa/api/", auth=('admin','smartvm')) inc = api.collections.instances.get(id=2024) inc.action.terminate()