Summary
Runs a resource action
Description
Runs a resource action
Route
POST /lifecycle-manager/resources/:modelId/run-action
Roles
admin
apiwrite
designer
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
modelId |
string |
yes |
The ID of the Resource Model to run an action on |
options |
object |
yes |
Designates the action to initiate and which instance and inputs to use when initiating it. |
Copied to Clipboard
{
"actionId": "5341",
"instance": {
"_id": "62a1f3d2ebedfc54e6e0065c",
"name": "VLAN Service",
"description": "EC2 Instance in US-EAST-1 with ID ec2-12345678",
"modelId": "62a1f3d2ebedfc54e6e0065c",
"lastAction": {
"_id": "0a2f",
"executionId": "62a1f3d2ebedfc54e6e0065c",
"name": "Update",
"type": "update",
"status": "paused"
},
"created": "1956-08-14T00:30:27.295Z",
"createdBy": {
"_id": "62a1f3d2ebedfc54e6e0065c",
"username": null,
"provenance": "aliquip sit",
"firstname": "cillum Lorem enim sunt Excepteur"
},
"lastUpdated": "2010-12-07T12:18:56.88Z",
"lastUpdatedBy": {
"_id": "62a1f3d2ebedfc54e6e0065c",
"username": "non",
"provenance": "est cupidatat cillum",
"firstname": "nisi"
}
},
"newInstanceName": "EC2 Instance",
"newInstanceDescription": ""
}
Copied to Clipboard
{
"title": "options",
"type": "object",
"required": [
"actionId"
],
"additionalProperties": false,
"properties": {
"actionId": {
"$ref": "resource-model-common#/definitions/action-identifier"
},
"instance": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "resource-instance-http"
}
]
},
"newInstanceName": {
"$ref": "resource-instance-common#/definitions/name"
},
"newInstanceDescription": {
"$ref": "resource-instance-common#/definitions/description"
},
"inputs": {
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
}
}
}
Return
DetailsExampleSchema
Name |
Type |
Description |
response |
object |
- |
Copied to Clipboard
{
"message": "A server error occurred while processing this request",
"data": "null",
"metadata": {
"errors": []
}
}