Resource Statuses

Status Namespaces

Each APS resource has the status property whose format is <namespace>:<status>.

  • Namespace aps: contains a limited set of resource statuses managed by the APS controller.

  • Custom namespace with any name, except for aps:, contains any number of statuses meaningful for the application that uses it. If there are application specific resource statuses, the application must operate those statuses in its own custom namespace. The APS controller considers any custom status as ready.

Status List

The following statuses are possible for a resource:

Status name

Who can assign it

Explanation

aps:proto

Application

The resource is prepared for creation (this is a resource prototype).
This resource status is optional, and if an application is going to utilize a prototype it must Register Resources with the status set to aps::proto.

aps:provisioning

Controller

The resource is being provisioned.

aps:ready

Controller
Application
The resource is ready. This is the most usual status for most of resources.
The resource gets to this status as a result of successful resource provisioning or successful resource registration. Registering of a resource without a status will assign aps:ready automatically. Also, an application can change the resource status to aps:ready while updating the resource.

aps:activating

Controller
Application

An application can set a provisioned user-oriented resource to this status. It causes the user, whom this resource is assigned to, to complete the resource configuration and in this way change its status to aps:ready.

aps:unprovisioning

Controller

Resource is being unprovisioned or unregistered.

aps:deleted

Controller

The resource goes to this state when it is already unprovisioned but still persists in the resource database (because not all its links are removed yet, for example).

aps:upgrading

Controller

The status of the application root resource when the respective application instance is being upgraded.

aps:configuring

Controller

The resource properties are being updated by an asynchronous configuration operation.

aps:upsell

Controller

This resource is the key resource in an upsell process.

<namespace>:<status>

Application

Presents all application specific custom statuses

Status Transitioning

The diagram below shows resource statuses and the transitions between them:

../../../../_images/status-diagram.png

Number

Transition

1

Start resource provisioning

2

Register prototype

3

Register ready resource

4

Provision resource from prototype

5

Complete resource provisioning

6

Update proto resource to ready

7

Application switches status in the ready range:
- aps:ready
- aps:activating
- Any status in custom namespace

8

Start unprovisioning

9

Unprovision resource in one step

10

Unprovision resource but keep it in database, for example, links are not removed yet

11

Unregister resource but keep it in database, for example, links are not removed yet

12

Unregister resource in one step

13

Start upgrade procedure

14

Start upsell procedure

15

Start resource async configuration

Note

The APS controller considers the following statuses as ready and allows applications to change the resource status within this range as needed:

  • aps:ready

  • aps:activating

  • Any status in a custom namespace

Managing Statuses

An application may set its own custom statuses for its resources and also change the system statuses as specified in the table. It can influence a resource status using the following methods:

  • By default, if an application returns the HTTP/1.1 200 OK code on a POST operation, the APS controller sets the resource status to aps:ready.

  • In response to a POST or PUT operation over a resource, an application can return a required status in the JSON body, for example:

    { "aps": { "status": "aps:ready" }}
    
  • When registering or updating a resource through Application Alias Details, an application can explicitly specify the resource status in the JSON body as illustrated in the previous item.