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 run, along with its corresponding inputs and the Resource Model instance it will be run against. |
Copied to Clipboard
{
"actionId": "0a2f",
"instance": {
"_id": "62a1f3d2ebedfc54e6e0065c",
"name": "EC2 Instance",
"description": "EC2 Instance in US-EAST-1 with ID ec2-12345678",
"modelId": "62a1f3d2ebedfc54e6e0065c",
"instanceData": null,
"lastAction": {
"_id": "0000",
"executionId": "62a1f3d2ebedfc54e6e0065c",
"name": "Update",
"type": "import",
"status": "paused"
},
"created": "2006-09-22T14:52:29.313Z",
"createdBy": {
"_id": "62a1f3d2ebedfc54e6e0065c",
"username": "eu qui minim cillum",
"provenance": "fugiat ullamco eu",
"firstname": "proident ex labore"
},
"lastUpdated": "2019-10-09T18:56:49.871Z",
"lastUpdatedBy": {
"_id": "62a1f3d2ebedfc54e6e0065c",
"username": null,
"provenance": "sed sunt",
"firstname": "dolor non laboris minim"
}
},
"instanceName": "EC2 Instance",
"instanceDescription": "EC2 Instance in US-EAST-1 with ID ec2-12345678",
"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"
}
]
},
"instanceName": {
"$ref": "resource-instance-common#/definitions/name"
},
"instanceDescription": {
"$ref": "resource-instance-common#/definitions/description"
},
"inputs": {
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
}
}
}
Return
DetailsExampleSchema
Name |
Type |
Description |
response |
object |
- |
Copied to Clipboard
{
"message": "Successfully imported 3 of 4 documents",
"data": "null"
}