Apache CloudStack 4.21.0.0 Root Admin API Reference

addCustomAction

Add a custom action for an extension

Request parameters

Parameter NameDescriptionRequired
extensionidThe ID of the extension to associate the action withtrue
nameName of the actiontrue
allowedroletypesList of role types allowed for the actionfalse
descriptionDescription of the actionfalse
detailsDetails in key/value pairs using format details[i].keyname=keyvalue. Example: details[0].vendor=xxx&&details[0].version=2.0false
enabledWhether the action is enabled or not. Default is disabled.false
errormessageError 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
parametersParameters 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&parameters[0].type=BOOLEAN&parameters[0].required=truefalse
resourcetypeResource type for which the action is availablefalse
successmessageSuccess 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
timeoutSpecifies the timeout in seconds to wait for the action to complete before failing. Default value is 5 secondsfalse

Response Tags

Response NameDescription
idID of the custom action
allowedroletypesList of role types allowed for the custom action
createdCreation timestamp of the custom action
descriptionDescription of the custom action
detailsDetails of the custom action
enabledWhether the custom action is enabled or not
errormessageMessage that will be used on failure during execution of the action
extensionidID of the extension that this custom action belongs to
extensionnameName of the extension that this custom action belongs to
nameName of the custom action
resourcetypeResource type for which the action is available
successmessageMessage that will be used on successful execution of the action
timeoutSpecifies the timeout in seconds to wait for the action to complete before failing
parameters(*)List of the parameters for the action
nameName of the parameter
requiredWhether the parameter is required or not
typeType of the parameter
validationformatValidation format for value of the parameter. Available for specific types
valueoptionsComma-separated list of options for value of the parameter