Sync VM

Details

API DetailsRelease-Specific Information
CloudCenter Platform 4xCloudCenter Suite 5x
NameSync VM
Description

Sync VM as described in the Importing Unmanaged VMs use case

Allowed Role(s)WM_USER
MethodGET
URI

v1/actions/actionId/executions

cloudcenter-ccm-backend/api/v1/actions/actionId/executions

Sample Request
curl -k -X GET -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/actions/49/executions
curl -k -X GET -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-ccm-backend/api/v1/actions/49/executions
Release

Introduced in CloudCenter 4.8.0

Modified in CloudCenter Suite 5.0.0

Notes
  • Only resource owners and users with WRITE perms can view all the fields for this resource.
  • Other users can only view common fields like name, description, and so forth. See Permission Control for additional context.
  • See Importing Unmanaged VMs for the following information:
    • Manual Sync Import Use Case
    • To retrieve the actionId
Back To LinksCloudCenter Platform 4x APIWorkload Manager API

ESB Header

action: get.actions.actionId.executions

See the Enterprise Service Bus (ESB) section for additional context.

Not applicable

Sample


Use the View Managed and Unmanaged VMs API (/v1/virtualMachines?listType=MANAGED_VMS) to retrieve the executionResources ID that is required in the request payload.


Request 1

{
   "resourceType":"VIRTUAL_MACHINE",
   "executionSpecs":[
   ],
   "executionResources":[
      {
         "id":"4313"
      }
   ]
}

Response 1

{
   "id":"6728",
   "resource":"https://<HOST>:<PORT>/v1/executions/6728",
   "executionResources":[
      {
         "cloudResourceId":"i-0165445167d464a33",
         "id":4313,
         "regionId":1,
         "cloudAccountId":6,
         "cloudResourceProperties":[

         ]
      }
   ],
   "resourceType":"VIRTUAL_MACHINE",
   "executionSpecs":[

   ],
   "acknowledgedByUser":false,
   "acl":null
}

Request 2

{
   "actionExecutionId":6728,
   "actionId":49,
   "actionName":"Sync VM Information",
   "resourceType":"VIRTUAL_MACHINE",
   "userId":2,
   "userName":"Cliqr Admin",
   "status":"IN_PROGRESS",
   "startTime":"2017-07-15 00:49:52.522",
   "endTime":"",
   "acknowledgedByUser":false,
   "executionResources":[
      {
         "resourceId":"i-0165445167d464a33",
         "resourceName":"",
         "status":"SUBMITTED",
         "result":null,
         "logs":[
         ]
      }
   ]
}

Response 2

 {
   "actionExecutionId":6728,
   "actionId":49,
   "actionName":"Sync VM Information",
   "resourceType":"VIRTUAL_MACHINE",
   "userId":2,
   "userName":"Cliqr Admin",
   "status":"SUCCEEDED",
   "startTime":"2017-07-15 00:39:40.281",
   "endTime":"",
   "acknowledgedByUser":true,
   "executionResources":[
      {
         "resourceId":"i-0d5294d143451a093",
         "resourceName":"",
         "status":"SUCCEEDED",
         "result":"INSTANCE_TYPE_MATCHED\n",
         "logs":[
            {
               "message":"INSTANCE_TYPE_MATCHED",
               "status":"COMPLETED",
               "timestamp":"2017-07-15 00:39:40.847"
            }
         ]
      }
   ]
}

Request Attributes

actionId
  • Description: See Importing Unmanaged VMs for cloud-specific details on retrieving the corresponding ID.
  • Type: String

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

  • Type: Enumeration

    EnumerationCategory
    VIRTUAL_MACHINE

    Identifies this resource to be a managed or unmanaged VM

    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 the Managed VMs section for the relevant release for additional context.
      IMPORTED_VMIdentifies this as a VM that was discovered by the CloudCenter platform. See the Unanaged VMs section for the relevant release for additional context.

    DEPLOYMENTIdentifies this resource to be a deployment
    APPLICATION_PROFILEIdentifies this resource to be an application profile

    SERVICE

    Identifies this resource to be an application service

    CLOUD_REGION

    Identifies this resource to be a supported cloud region

executionSpecs
  • Description: The custom parameters required to execute the action – only required if you have the required permissions (editable and unlocked).
  • Type: Array of name-value pairs

    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    value
    • Description: Indicates the set value for this property
    • Type: Float

  • Example:

    "executionSpecs":[  
          {  
             "name":"snapshotName",
             "value":"demodocs"
          }
       ]
executionResources
  • Description: CloudCenter resources that are available for this execution.
  • Type: Sequence of resource details

    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

    resourceName
    • Description: The name of the resource. 

    • Type: String

    status (nodeStatus)
    • Description: The node status for this resource. 

    • Type: Enumeration. See the Deployment and VM States > VM (Node) States section for the relevant release for additional details.

     result 
    • Type: String
     logs 
    • Description: Lists logs for the identified VM.
    • Type: Sequence of log details

      message
      • Description: Identifies the resulting progress message for the workflow activity execution.

      • Type: String

      status
      • Description: The action status for this resource.

      • Type: Enumeration

        EnumerationDescription
        SUBMITTEDThe CloudCenter platform has received the task request and started to process it but the action is not yet completed.
        SCHEDULEDThe task is configured to start at some point in the future.
        STARTEDThe task has started successfully.
        IN_PROGRESSThe task is in the process of being executed.
        PENDINGThe task is still awaiting completion due to the completion of another task.
        CANCELEDThe task was terminated after it was started.
        APPROVEDThe task was approved by the authorized approver(s).
        REJECTEDThe task was rejected by the authorized approver(s).
        COMPLETEDThe task was completed successfully.
        ERRORThe task was aborted due to an error.
        TIMEOUTThe task did not complete within the allocated time.

       timestamp 
      • Description: The CloudCenter API date and time values are formatted in Unix time to the millisecond level.
      • Type: String

Response Attributes

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

  • Type: String

resource
  • Description: Unique URL to access this resource.
  • Type: String

executionResources
  • Description: CloudCenter resources that are available for this execution.
  • Type: Sequence of resource details

    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

    resourceName
    • Description: The name of the resource. 

    • Type: String

    status (nodeStatus)
    • Description: The node status for this resource. 

    • Type: Enumeration. See the Deployment and VM States > VM (Node) States section for the relevant release for additional details.

     result 
    • Type: String
     logs 
    • Description: Lists logs for the identified VM.
    • Type: Sequence of log details

      message
      • Description: Identifies the resulting progress message for the workflow activity execution.

      • Type: String

      status
      • Description: The action status for this resource.

      • Type: Enumeration

        EnumerationDescription
        SUBMITTEDThe CloudCenter platform has received the task request and started to process it but the action is not yet completed.
        SCHEDULEDThe task is configured to start at some point in the future.
        STARTEDThe task has started successfully.
        IN_PROGRESSThe task is in the process of being executed.
        PENDINGThe task is still awaiting completion due to the completion of another task.
        CANCELEDThe task was terminated after it was started.
        APPROVEDThe task was approved by the authorized approver(s).
        REJECTEDThe task was rejected by the authorized approver(s).
        COMPLETEDThe task was completed successfully.
        ERRORThe task was aborted due to an error.
        TIMEOUTThe task did not complete within the allocated time.

       timestamp 
      • Description: The CloudCenter API date and time values are formatted in Unix time to the millisecond level.
      • Type: String

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

  • Type: Enumeration

    EnumerationCategory
    VIRTUAL_MACHINE

    Identifies this resource to be a managed or unmanaged VM

    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 the Managed VMs section for the relevant release for additional context.
      IMPORTED_VMIdentifies this as a VM that was discovered by the CloudCenter platform. See the Unanaged VMs section for the relevant release for additional context.

    DEPLOYMENTIdentifies this resource to be a deployment
    APPLICATION_PROFILEIdentifies this resource to be an application profile

    SERVICE

    Identifies this resource to be an application service

    CLOUD_REGION

    Identifies this resource to be a supported cloud region

executionSpecs
  • Description: The custom parameters required to execute the action – only required if you have the required permissions (editable and unlocked).
  • Type: Array of name-value pairs

    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    value
    • Description: Indicates the set value for this property
    • Type: Float

  • Example:

    "executionSpecs":[  
          {  
             "name":"snapshotName",
             "value":"demodocs"
          }
       ]
acknowledgedByUser
  • Description: Identifies if the action is to be acknowledged by the user.
  • Type: Boolean
    • true = The action must be acknowledged.
    • false = Default. The action need not be acknowledged.

acl
  • Description: The users who are permitted to perform this action
  • Type: Sequence of user-specific details

    users
    • Description: The user that is assigned permission to view, modify, or manage this action. 
    • Type: Admin-defined string
    tenantUsers
    • Description: The tenant that is assigned permission to view, modify, or manage this action. 
    • Type: Admin-defined string
    userGroups
    • Description: The user group that is assigned permission to view, modify, or manage this action. 
    • Type: Admin-defined string
     ownerUserId 
    • DescriptionUnique, system-generated identifier for the owner of the resource. For example, a ServiceNow extension owner's User ID.

    • Type: String




  • No labels
© 2017-2019 Cisco Systems, Inc. All rights reserved