Application Packaging Standard

Last updated 18-Mar-2019

ResourceTypeManagement

ResourceType Management interface

Schema

The considered APS type (download) extends the Resource APS type(s) and looks as follows:

{
  "name": "ResourceTypeManagement",
  "id": "http://www.parallels.com/pa/pa-core-services/resource-type-manager/1.0",
  "apsVersion": "2.0",
  "implements": [
    "http://aps-standard.org/types/core/resource/1.0"
  ],
  "access": {},
  "operations": {
    "createResourceType": {
      "path": "/resourceTypes",
      "verb": "POST",
      "response": {
        "type": "ResourceType"
      },
      "errorResponse": {
        "type": "object"
      }
    },
    "updateResourceType": {
      "path": "/resourceTypes/{resTypeId}",
      "verb": "PUT",
      "response": {
        "type": "ResourceType"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "resTypeId": {
          "kind": "path",
          "type": "integer"
        }
      }
    },
    "deleteResourceType": {
      "path": "/resourceTypes/{resTypeId}",
      "verb": "DELETE",
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "resTypeId": {
          "kind": "path",
          "type": "integer"
        }
      }
    }
  },
  "structures": {
    "ResourceType": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "resourceClassName": {
          "type": "string"
        },
        "attributes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "activationParameters": {
          "type": "object",
          "required": true
        }
      }
    }
  }
}

Custom Operations

OPERATION VERB PATH RETURNS Description
createResourceType POST /resourceTypes If successful, this method returns added ResourceType object in response body Create resource type
deleteResourceType DELETE /resourceTypes/{resTypeId} If successful, this method returns a 200 OK standard status code Delete resource type
updateResourceType PUT /resourceTypes/{resTypeId} If successful, this method returns updated ResourceType object in response body Create resource type

createResourceType

HTTP Request

POST /aps/2/resources/{aps-id}/resourceTypes

Description

Create resource type

Parameters

PARAMETER TYPE DESCRIPTION
resType ResourceType ResourceType

Returns

If successful, this method returns added ResourceType object in response body

deleteResourceType

HTTP Request

DELETE /aps/2/resources/{aps-id}/resourceTypes/{resTypeId}

Description

Delete resource type

Parameters

PARAMETER TYPE DESCRIPTION
resTypeId Integer ID of resource type

Returns

If successful, this method returns a 200 OK standard status code

updateResourceType

HTTP Request

PUT /aps/2/resources/{aps-id}/resourceTypes/{resTypeId}

Description

Create resource type

Parameters

PARAMETER TYPE DESCRIPTION
resType ResourceType Updated ResourceType object
resTypeId Integer ID of resource type

Returns

If successful, this method returns updated ResourceType object in response body

Structures

ResourceType

OA Resource Type

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
activationParameters key-value pairs of String Required   Resource Activation parameters
attributes String array Not Required   Collection of resource attributes
description String Not Required   Description
id Integer Not Required   Identifier of resource
name String Not Required   Resource Name
resourceClassName String Not Required   ResourceClass Name

Examples

Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.