Apache CloudStack 4.21.0.0 Root Admin API Reference
addCustomAction
Add a custom action for an extension
Request parameters
Parameter Name | Description | Required |
extensionid | The ID of the extension to associate the action with | true |
name | Name of the action | true |
allowedroletypes | List of role types allowed for the action | false |
description | Description of the action | false |
details | Details in key/value pairs using format details[i].keyname=keyvalue. Example: details[0].vendor=xxx&&details[0].version=2.0 | false |
enabled | Whether the action is enabled or not. Default is disabled. | false |
errormessage | Error message that will be used on failure during execution of the action. Name of the action, extension, resource can be used as - actionName, extensionName, resourceName. Example: Failed to complete {{actionName}} for {{resourceName}} with {{extensionName}} | false |
parameters | Parameters mapping for the action using keys - name, type, required. 'name' is mandatory. If 'type' is not specified then STRING will be used. If 'required' is not specified then false will be used. Example: parameters[0].name=xxx¶meters[0].type=BOOLEAN¶meters[0].required=true | false |
resourcetype | Resource type for which the action is available | false |
successmessage | Success message that will be used on successful execution of the action. Name of the action, extension, resource can be used as - actionName, extensionName, resourceName. Example: Successfully complete {{actionName}} for {{resourceName}} with {{extensionName}} | false |
timeout | Specifies the timeout in seconds to wait for the action to complete before failing. Default value is 5 seconds | false |
Response Tags
Response Name | Description |
id | ID of the custom action |
allowedroletypes | List of role types allowed for the custom action |
created | Creation timestamp of the custom action |
description | Description of the custom action |
details | Details of the custom action |
enabled | Whether the custom action is enabled or not |
errormessage | Message that will be used on failure during execution of the action |
extensionid | ID of the extension that this custom action belongs to |
extensionname | Name of the extension that this custom action belongs to |
name | Name of the custom action |
resourcetype | Resource type for which the action is available |
successmessage | Message that will be used on successful execution of the action |
timeout | Specifies the timeout in seconds to wait for the action to complete before failing |
parameters(*) | List of the parameters for the action |
name | Name of the parameter |
required | Whether the parameter is required or not |
type | Type of the parameter |
validationformat | Validation format for value of the parameter. Available for specific types |
valueoptions | Comma-separated list of options for value of the parameter |