// removed jquery ui css and js

View Resource Actions

Details

API Details
Name

View Resource Actions

Description
MethodGET
URI
  • v1/resourceActions?ids=MANAGED_RESOURCE_ID_LIST&&resourceType=ACTION_REOURCE_TYPE
  • v1/resourceActions?cloudResourceIds=RESOURCE_ID_LIST&&resourceType=ACTION_RESOURCE_TYPE
CloudCenter ReleaseIntroduced in CloudCenter 4.8.0.
Notes
  • For additional context on <PORT> usage in the following example, see Base URI Format.
  • Provides a HTTP Location URL that you can use to query the system until this call returns a success or failure HTTP Status Codes.
  • API-specific notes:
    • resourceType = VIRTUAL_MACHINE.
    • ids = Unique IDs for the managed VM, deployment, or application profile.
    • cloudResourceIDs = The unmanaged VM ID
ESB Header
  • action: get.resourcActions
    actionparam: ids=MANAGED_RESOURCE_ID_LIST&&resourceType=ACTION_REOURCE_TYPE 
  • action: get.actions.actionId
    actionparam:  cloudResourceIds=RESOURCE_ID_LIST&&resourceType=ACTION_RESOURCE_TYPE

Example 1

curl -k -X GET -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/resourceActions?ids=1&&resourceType=VIRTUAL_MACHINE"

Response

[
   {
      "resourceId":"1",
      "actions":[
         {
            "id":"14",
            "resource":"https://<HOST>:<PORT>/v1/actions/14",
            "name":"Sync VM Information",
            "description":"Sync VM Information from the Cloud",
            "actionType":"REFRESH_VM",
            "lastUpdatedTime":"",
            "timeOut":600,
            "enabled":true,
            "encrypted":false,
            "deleted":false,
            "systemDefined":true,
            "bulkOperationSupported":true,
            "isAvailableToUser":true,
            "owner":1,
            "actionParameters":[

            ],
            "actionResourceMappings":[
               {
                  "type":"VIRTUAL_MACHINE",
                  "actionResourceFilters":[
                     {
                        "deploymentResource":null,
                        "vmResource":{
                           "type":"DEPLOYMENT_VM",
                           "appProfiles":[

                           ],
                           "cloudRegions":[

                           ],
                           "cloudAccounts":[

                           ],
                           "services":[

                           ],
                           "osTypes":[

                           ],
                           "cloudFamilyNames":[

                           ],
                           "nodeStates":[

                           ],
                           "cloudResourceMappings":[
                              {
                                 "cloudFamily":"Amazon",
                                 "nodeStates":[
                                    "NodeStarting",
                                    "NodeStarted",
                                    "NodeReady",
                                    "NodeCleaned",
                                    "NodeError",
                                    "NodeNotReachable",
                                    "NodeReachable",
                                    "NodeSuspended",
                                    "NodeSuspending",
                                    "NodeResuming",
                                    "NodeResumed",
                                    "NodeRebooted"
                                 ]
                              },
                              {
                                 "cloudFamily":"Openstack",
                                 "nodeStates":[
                                    "NodeStarting",
                                    "NodeStarted",
                                    "NodeReady",
                                    "NodeCleaned",
                                    "NodeError",
                                    "NodeNotReachable",
                                    "NodeReachable",
                                    "NodeSuspended",
                                    "NodeSuspending",
                                    "NodeResuming",
                                    "NodeResumed",
                                    "NodeRebooted"
                                 ]
                              },
                              {
                                 "cloudFamily":"Vmware",
                                 "nodeStates":[
                                    "NodeStarting",
                                    "NodeStarted",
                                    "NodeReady",
                                    "NodeCleaned",
                                    "NodeError",
                                    "NodeNotReachable",
                                    "NodeReachable",
                                    "NodeSuspended",
                                    "NodeSuspending",
                                    "NodeResuming",
                                    "NodeResumed",
                                    "NodeRebooted"
                                 ]
                              },
                              {
                                 "cloudFamily":"Azure",
                                 "nodeStates":[
                                    "NodeStarting",
                                    "NodeStarted",
                                    "NodeReady",
                                    "NodeCleaned",
                                    "NodeError",
                                    "NodeNotReachable",
                                    "NodeReachable",
                                    "NodeSuspended",
                                    "NodeSuspending",
                                    "NodeResuming",
                                    "NodeResumed",
                                    "NodeRebooted"
                                 ]
                              },
                              {
                                 "cloudFamily":"AzureRM",
                                 "nodeStates":[
                                    "NodeStarting",
                                    "NodeStarted",
                                    "NodeReady",
                                    "NodeCleaned",
                                    "NodeError",
                                    "NodeNotReachable",
                                    "NodeReachable",
                                    "NodeSuspended",
                                    "NodeSuspending",
                                    "NodeResuming",
                                    "NodeResumed",
                                    "NodeRebooted"
                                 ]
                              },
                              {
                                 "cloudFamily":"AzurePack",
                                 "nodeStates":[
                                    "NodeStarting",
                                    "NodeStarted",
                                    "NodeReady",
                                    "NodeCleaned",
                                    "NodeError",
                                    "NodeNotReachable",
                                    "NodeReachable",
                                    "NodeSuspended",
                                    "NodeSuspending",
                                    "NodeResuming",
                                    "NodeResumed",
                                    "NodeRebooted"
                                 ]
                              }
                           ]
                        },
                        "isEditable":true
                     }
                  ]
               }
            ],
            "actionResourceMappingAncillaries":[

            ],
            "actionCustomParamSpecs":[

            ]
         },
         {
            "id":"4",
            "resource":"https://<HOST>:<PORT>/v1/actions/4",
            "name":"Terminate",
            "description":"terminate the instance",
            "actionType":"INSTANCE_TERMINATE",
            "lastUpdatedTime":"",
            "timeOut":600,
            "enabled":true,
            "encrypted":false,
            "deleted":false,
            "systemDefined":true,
            "bulkOperationSupported":true,
            "isAvailableToUser":true,
            "owner":1,
            "actionParameters":[

            ],
            "actionResourceMappings":[
               {
                  "type":"VIRTUAL_MACHINE",
                  "actionResourceFilters":[
                     {
                        "deploymentResource":null,
                        "vmResource":{
                           "type":"DEPLOYMENT_VM",
                           "appProfiles":[

                           ],
                           "cloudRegions":[

                           ],
                           "cloudAccounts":[

                           ],
                           "services":[

                           ],
                           "osTypes":[

                           ],
                           "cloudFamilyNames":[

                           ],
                           "nodeStates":[

                           ],
                           "cloudResourceMappings":[
                              {
                                 "cloudFamily":"all",
                                 "nodeStates":[
                                    "NodeReady",
                                    "NodeStarted",
                                    "NodeSuspended",
                                    "NodeError",
                                    "NodeNotReachable",
                                    "NodeNotFound"
                                 ]
                              }
                           ]
                        },
                        "isEditable":true
                     }
                  ]
               }
            ],
            "actionResourceMappingAncillaries":[

            ],
            "actionCustomParamSpecs":[

            ]
         }
      ]
   }
]

Request Attributes

actionId
  • Description: The Managed VM ID or jobId or Application Profile ID
  • Type: Long

Response Attributes

resourceId
  • Description: Unique identifier for a CloudCenter Resource managed by ACLs. This ID is generated automatically by the CloudCenter platform when the resource is created.  
  • Type: String
actions
  • Description: Identifies all the details for each action as described in Actions Library.
  • Type: Sequence of action details

    id
    • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

    • Type: String
    resource
    • Description: Unique URL to access this resource.
    • Type: String
    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    description
    • DescriptionA brief description for this CloudCenter Resource.

    • Type: String
    actionType
    • Description: The value of this attribute is interpreted based on the action type. For more information on VM states, see Deployment and VM States.
    • Type: Enumeration

      EnumerationDescription
      INVOKE_WEB_SERVICE 
      Executes the designated web service request. For example, you can use this action type if you publish an application profile in your ServiceNow catalog.

      EXECUTE_COMMAND

      Executes the designated command or script on the VM (see Deployment Lifecycle Scripts or Callout Scripts).

      This type additionally allows you to specify the following options:

      • Where to run this type of action: 
        • On Virtual Machine OS – On a VM with an agent installed. 
        • Externally – On a Docker container that runs on the CCO (not dependent on the worker image in any way). For example, if you need to configure external CLIs on a Docker container for a specific cloud, you can determine a Custom Field with the CLI items in a list format. See the Custom Field section below for additional details.
      • Reboot the VM after action execution – If the action owner determines that a reboot is required after the action execution, then end users using this action do not need to manually perform this extra step! An action owner refers to a user who creates (the New Action link) a custom action.
      • Sync VM information after action execution – This option allows you to update VM information from the CloudCenter platform so the latest VM metadata information like IP addresses are visible.

      The possible execution modes for this option are based on your Execute from Bundle setting that is explained in the Action Definition Section later in this page:

      • Download From Bundle is True
        1. The content in Script From Bundle is presumed to be a script inside the bundle specified. 
        2. The bundle is presumed to be an archive (zip/tar/tgz/tar.gz) that is extracted and the file is searched and executed along with any other command line parameters.
      • Download From Bundle is False
        1. The content in the Executable Command field is presumed to be a series of commands separated by semicolons.
        2. A special case is that the first command in this series of commands can be a Script URL. Thus the first command, if a script URL, is processed by first downloading the script and then it is executed along with the rest of the following commands.

      If you provide scripts that need to be executed as part of Action Library, be aware that a script is considered to be successful based on OS exit codes for script execution. This behavior is consistent with scripts that are run directly on a Windows or Linux server using their respective shells. Once a script is executed on Linux or Windows, the output shown on running echo $?, is the status code.
      For example:

      • On Linux, script execution will be marked as Failed only if the script's last line failed to execute. In all other cases it will be marked as successful.
      • On Windows, scripts will be marked as Failed only if an explicit Exception is thrown.

      For user-provided scripts, the onus is on the user to ensure that the script exits successfully.

      INVOKE_UCSD_WORKFLOW 

      Only applicable for VMs that invoke the workflow in a UCSD server (see Configure a Cisco UCSD Cloud for additional context).

      PUPPET_SCRIPT

      Applicable for both CloudCenter deployed VMs and Imported VMs.  See Puppet for additional context.

      To run Puppet actions on CloudCenter instance, you must first disable the requiretty setting for that instance in the /etc/sudoers file.

      CHEF_SCRIPT

      Applicable for both CloudCenter deployed VMs and Imported VMs. See Chef for additional context.

      ANSIBLE_SCRIPTApplicable for both CloudCenter deployed VMs and Imported VMs.
      UPGRADE_AGENT

      You can only upgrade agent for a CloudCenter VM if the agent was previously installed and if the VM is using CloudCenter 4.5 or later versions.

      If one CloudCenter component uses a particular version of the CloudCenter software, you must use the same version for all other CloudCenter components.

      If the latest version of the agent is already installed on a VM, then the Upgrade CloudCenter Agent action will no longer be available for this VM.

      INSTANCE_STOPStop and power off a managed VM. See Actions Library for additional details.
      INSTANCE_STARTPower on and start a managed VM. See Actions Library for additional details.
      INSTANCE_REBOOTAttempts a graceful shut down and restart of a managed VM. See Actions Library for additional details.
      INSTANCE_TERMINATEStops and Remove managed/unmanaged VMs. See Actions Library for additional details.
      INSTANCE_RECONFIG

      Resize a stopped VM's (AWS and VMware) instance type or change the CPU and memory size. For OpenStack, it is both running and stopped states.

      Select the instance type configured in the CCM for the required cloud.

      See Actions Library for additional details.
      INSTANCE_CREATE_ATTACH_VOLUME

      Attaches volumes to running or stopped VMs on AWS, OpenStack or VMware clouds.

      Cisco does not support attaching existing volumes available in the cloud. If storage types are configured in the CCM, you can opt to input volume parameters.

      Cisco does not support attaching existing volumes that are already available in the cloud.

      Cisco enables you to select if the storage types are configured in the CCM and input the volume parameters using this option

      See Actions Library for additional details.

      INSTANCE_DETACH_VOLUMEDetaches volumes from running or stopped VMs on AWS, OpenStack or VMware clouds.
      See Actions Library for additional details.
      INSTANCE_CREATE_SNAPSHOTCreates the image snapshot for a running or stopped VMware VM
      See Actions Library for additional details.
      IMPORT_VMImport a VM so the CloudCenter platform can manage this VM. See VM Management for additional context.
      PUSH_AGENT

      Upgrade the agent on a managed VM to the latest released CloudCenter agent version from the CCM UI. See VM Management > Upgrade Agent for additional details.

      You can only upgrade a VM running CloudCenter 4.5 or later versions.

      You must manually install the agent on a VM running CloudCenter 4.4 or earlier versions. See VM Management > Install Agent for additional details.

       

      If the latest version of the agent is already installed on a VM, then then this action will no longer be available for this VM.

      a managed VM. See Actions Library for additional details.
    lastUpdatedTime
    • Description: Date that this resource was last updated. This attribute is the same as the lastUpdated attribute.

    • Type: Long

    timeout
    • Description: To program the action to timeout within a specified limit and defaults to 20 minutes. This field is available for all custom actions.
    • Type: Long
    enabled
    • Description: Indicates that this resource has been enabled.

      • true = resource has been enabled
      • false = resource has not been enabled (default)
    • Type: Boolean
    encrypted 
    • Description: Identifies if the parameter value should be encrypted
    • Type: Boolean
      • true = Default. The parameter value is encrypted.
      • false = The parameter value is not encrypted.
    deleted
    • Description: Identifies if this resource is deleted in the CloudCenter platform.
    • Type: Boolean
      • true = The resource is deleted.
      • false = The resource is not deleted.
     systemDefined 
    • Description: Refers to an out-of-box action. Use this attribute to fetch system-defined actions. If an action is identified as systemDefined, it cannot be edited by the user.
    • Type: Boolean
      • true = This is a system defined action.
      • false = Default. This is not a system defined action.
    bulkOperationSupported 
    • Description: Identifies if a bulk operation is allowed for this type of action.
    • Type: Boolean
      • true = This action supports a bulk operation.
      • false = Default. This action does not allow a bulk operation.
     isAvailableToUser 
    • Description: Displays false if another action is currently being executed on the resource.
    • Type: Boolean
      • true = Default. This action is available to users.
      • false = This action is not available to users. The end user can try this action after sometime.
    owner
    • Description: Indicates whether this user is the job/deployment owner. This attribute is the same as the isOwner attribute.
    • Type: Boolean
      • true = This user is the job/deployment owner
      • false = Default. This user is not the job/deployment owner
    actionParameters
    • Description: Identifies the parameter details for a parameter that is defined as part of a new or existing action. See  Actions Library > Custom Field for additional context.
    • Type: Sequence of parameter details

      paramName
      • Description: Identifies the name for this parameter.
      • Type: String
      paramValue
      • Description: Identifies the values for this service parameter.
      • Type: String
      customParam
      • Description: Identifies if this parameter is a custom field for use in a user-defined action. See the Actions Library > Custom Fields section for additional context.
      • Type: Boolean
        • true = This is a custom parameter for a user-defined action.
        • false = This is not a custom parameter.
      required
      • Description: Identifies if this resource is required.

        • true = Resource is required
        • false = Resource is not required
      • Type: Boolean
      preference
      • Description: Identifies if this parameter is a custom field for use in a user-defined action. See the Actions Library > Custom Fields section for additional context.

      • Type: Enumeration

        EnumerationDescription
         VISIBLE_UNLOCKEDThe parameter defined for this action is visible to and editable by permitted users.
        VISIBLE_LOCKEDThe parameter defined for this action is visible to permitted users but not editable by any user.
         NOT_VISIBLE_LOCKEDThe parameter defined for this action is not visible or editable by any user other than the action owner.
     actionResourceMappings

    actionResourceMappings
    • Description: The resource mapping element that determines if the action is valid for a resource. Specify strings based on the identify of a resource that is used to filter actions:
    • Type: Sequence of action filter details

      type (resourceType or VmResourceType)

      resourceType
      • Description: The data type for a CloudCenter Resource.

      • Type: String
        StringCategory
        CLOUD_FAMILYIdentifies this resource to be the cloud family
        CLOUD_TYPEIdentifies this resource to be the cloud region
        APP_NAMEIdentifies this resource to be the application

      VmResourceType
      • Description: The type of Virtual Machine (VM) from the context of the CloudCenter platform.

      • Type: String

        StringCategory
        DEPLOYMENT_VMIdentifies this as a VM that was deployed by the CloudCenter platform. See VM Management > Managed VMs.
        IMPORTED_VMIdentifies this as a VM that was discovered by the CloudCenter platform. See VM Management > Unmanaged VMs.

       actionResourceFilters 
      • Description: Specify strings to filter a search request based on strings that identify one or more of the following strings

      • Type: Choice of strings

         isEditable 
        • Description: Identifies if the parameter is editable by the end user who is executing the action.
        • Type: Boolean
          • true = Default. This parameter is editable.
          • false = This parameter is not editable.
         vmResource 
        • Description: Lists VMs based on the specified filters.
        • Type: Sequence of VM details

          type
          VmResourceType
          • Description: The type of Virtual Machine (VM) from the context of the CloudCenter platform.

          • Type: String

            StringCategory
            DEPLOYMENT_VMIdentifies this as a VM that was deployed by the CloudCenter platform. See VM Management > Managed VMs.
            IMPORTED_VMIdentifies this as a VM that was discovered by the CloudCenter platform. See VM Management > Unmanaged VMs.
           appProfiles 
          •  Description: Identifies the application profiles to be included for this action filter. If you do not specify any profile (using the required appId) for the filter mapping, then all application profiles are displayed.
          • Type: String
           cloudRegions 
          •  Description: Identifies the cloud regions to be included for this action filter. If you do not specify any profile (using the required cloudRegionId) for the filter mapping, then all cloud regions are displayed.
          • Type: String
          cloudAccounts 
          •  Description: Identifies the cloud accounts to be included for this action filter. If you do not specify any profile (using the required cloudAccountId) for the filter mapping, then all cloud accounts are displayed.
          • Type: String
          services  
          •  Description: Identifies the services to be included for this action filter. If you do not specify any profile (using the required serviceId) for the filter mapping, then all services are displayed.
          • Type: String
           osTypes   
          •  Description: Identifies the OS types to be included for this action filter. If you do not specify any OS type (using the required osName) for the filter mapping, then all OS types are displayed.
          • Type: String
           cloudFamilyNames    
          • Type: String
           nodeStates     
          • Type: String
           cloudResourceMapping 
          • Description: Identifies the cloud mapping to be included for this action filter.
          • Type: Sequence of cloud resource mapping details

            cloudFamily                                                                                                                                                                                
            • Description: The cloud provider name.                     
            • Type: String
             nodeStates     
            • Type: String
         deploymentResource 
        •  Description: Lists deployments based on the specified filters.
        • Type: Sequence of deployment details

           deploymentEnvironments 
          • Type: String
          services  
          •  Description: Identifies the services to be included for this action filter. If you do not specify any profile (using the required serviceId) for the filter mapping, then all services are displayed.
          • Type: String

     actionCustomParamSpecs

    actionCustomParamSpecs
    • Description: Identifies the specifications for custom parameters that are included as part of the custom action.
    • Type: Sequence of custom action parameters

      paramName
      • Description: Identifies the name for this parameter.
      • Type: String
      displayName
      • DescriptionA descriptive name for this CloudCenter resource.
      • Type: String
      helpText
      • Description: The additional information provided for this parameter.
      • Type: String
      type
      • Description: The type of parameter used for this specification. See Using Parameters > Parameter Type for additional details.
      • Type: Enumeration

        API EnumerationCCM UI Listing
        stringstring
        numbernumber
        listlist
        webservicewebservice
        password_input password with confirmation
        passwordpassword
        pathpath
        textareatextarea
      valueList
      • Description: A list of comma separated values (limited to 255 characters). See Using Parameters > Parameter Types for additional context.  
      • Type: String
      defaultValue
      • Description: The default value for this service parameter
      • Type: String
       confirmValue 
      • Description: In case you provide a password input type parameter, this attribute confirms the password value.
      • Type: String
       pathSuffixValue 
      • Description: The value for the path (text that encodes a URL) type parameter.
      • Type: String
      userVisible
      • Description: Identifies if a service parameter is visible all users in the tenant
        • true = Parameter is visible to all users
        • false = Parameter is not visible to all users (just the admin)
      • Type: Boolean
      userEditable
      • Description: Identifies if a user is allowed to edit this service parameter:
        • true = Can change the preset values for this parameter
        • false = Cannot change the preset values for this parameter
      • Type: Boolean
      systemParam
      • Description: Identifies if this parameter is provided by the CloudCenter platform:
        • true = Provided by the CloudCenter platform
        • false = Added by the user or derived through another source
      • Type: Boolean
      exampleValue
      • Description: Identifies an example for this service parameter value
      • Type: String
      dataUnit
      • Description: Not Used... 
      • Type: String
      optional
      • Description: Identifies if this parameter is required for this service:
        • true = This parameter is required for this service
        • false = This parameter is optional for this service
      • Type: Boolean
       multiselectSupported  
      • Description: Identifies if a list for a custom parameter allows the end user to select multiple items in the list.
      • Type: String
      valueConstraint
      • Description: Identifies the  value restrictions for parameters created using the CloudCenter platform  
      • Type: Array of mapped attributes

        minValue
        • Description: The minimum required parameter value
        • Type: Integer
        maxValue
        • Description: The maximum allowed parameter value
        • Type: Integer
        regex
        • Description: Identifies if this parameter should be a regular expression
        • Type: String
        allowSpaces
        • Description: Identifies if spaces are allowed in the parameter name:
          • true = Spaces are allowed in the parameter name
          • false = Spaces are not allowed in the parameter name
        • Type: Boolean
        maxLength
        • Description: The maximum allowed length for this parameter name
        • Type: Integer
        sizeValue
        • Description: Identifies the size of this parameter
        • Type: Integer
        step
        • Description: Identifies the step for this parameter in the service execution process
        • Type: Integer
      scope
      • Description: Indicates the level at which you need to configure this value:

      • Type: Enumeration

        EnumerationDescription
        REGION

        Configure this value at the cloud region level

        USERConfigure this value at the user level
      webserviceListParams
      • Description: Provide a list of dynamic webservice parameters while deploying a job. From this list, users can select one parameter. The webservice parameter type is available in custom parameters, global parameters, and services. The output should be in the following format:
        [{"name":"p1",
        "displayName":"Param 1"},
         {"name":"p2",
          "displayName":"Param 2"}]

        If you configure this parameter type, you must provide the Protocol (HTTP or HTTPS), Web Service URL, and the credentials (Username and Password) for this webservice.

      • Type: Array of mapped attributes

        url
        • Description: The URL that is associated with the tenant's marketing website. See  Add Sub-TenantsTenant ID and Tenant Name Dependency for additional details.

          This is not the URL to access the CloudCenter platform

        • Type: String
        protocol
        • Description: Defines the protocol to be used by VMs running this service.
        • Type: Enumeration:

          ProtocolDescription
          TCPTransmission Control Protocol
          UDPUser Datagram Protocol
        username
        • Description: Unique, CloudCenter-generated name reference for this user.
        • Type: String
        password
        • Description: Password for the user's account. Effective Cloud Center 4.6.1, the CloudCenter platform enforces a minimum password length of 5 characters for all settings.
        • Type: String
         requestType 
         contentType 
         commandParams 
        • DescriptionIdentifies the query parameters for this call. See Using Parameters > Parameter Type for additional context.
        • Type: String
         requestBody 
        • Description: Identifies the additional information sent in the request body for each request call.
        • Type: String
         resultString 
        • Type: String