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": "0000",
"instance": {
"_id": "62a1f3d2ebedfc54e6e0065c",
"name": "EC2 Instance",
"description": "",
"modelId": "62a1f3d2ebedfc54e6e0065c",
"lastAction": {
"_id": "0000",
"executionId": "62a1f3d2ebedfc54e6e0065c",
"name": "Create",
"type": "create",
"status": "error"
},
"created": "2011-03-14T18:34:52.678Z",
"createdBy": {
"_id": "Pronghorn",
"username": "labore non dolor est",
"provenance": "elit Excepteur incididunt",
"firstname": "in ex veniam in fugiat"
},
"lastUpdated": "1954-11-30T10:23:07.19Z",
"lastUpdatedBy": {
"_id": "Pronghorn",
"username": "amet ex fugiat Duis commodo",
"provenance": "dolore",
"firstname": "ipsum sint et"
}
},
"newInstanceName": "VLAN Service",
"newInstanceDescription": "",
"inputs": null
}
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": []
}
}