In the platform, there are various resource components involved in the deployment of application services and products based on them, as well as the provisioning of the application resources for customers.
In this document:
APS application resources are split into two groups:
Reference application resources. These belong to the provider and are shared among all subscribers. The provider creates these resources from the respective APS types during application deployment. For example, every application has the application root APS resource representing the application instance. In addition, the provider can create a number of reference resources, such as offered configurations or simply offers, for example, Gold Mail Account, Silver Mail Account, and so on.
Individual application resources. These are created from the respective APS types individually for customers or service users during the provisioning process. They belong to customers.
APS types are resource schemas shipped inside the application APS package and used for instantiating APS resources, regardless of whether they are shared or individual.
In the provider environment, the following resource related components are used to offer services to customers:
Resource types representing reference APS resources. When creating these resource types, the provider selects the predefined Application Service Reference resource class and links these types with the respective reference APS resources.
Resource types representing individual APS resources. When creating these resource types, the provider selects the predefined Application Service resource class and links these resource types with the respective APS types.
Resource types representing special structures of APS resources called counters. They are not displayed in the above diagram but described in a separate section.
A service template is a container of the resources representing the application services and linked with respective resource types. The provider can set a limit on each of the resources inside a service template.
When a customer subscribes to application services contained in a service template, the system creates a subscription instantiated from the selected service template with all its resources and limits. The customer subscription will present the following resource components:
Reference resources belong to the provider. The customer uses them as offered configurations.
Individual resources belong to the customer. Some or all of the individual resources can be linked with reference resources defining configuration of the individual resources.
Note
A limit on a reference resource in a subscription defines the limit on the number of individual resources based on the configuration offered by the reference resource.
Limits on individual resources define the limits on the total number or amount of these resources.
The system will not allow the customer to create a resource based on a reference resource if one of the above limits is reached in the subscription.
APS resources are application specific. They represent application services provided through APS applications. They may have any properties and relations with other resources provided either by the same or different application.
Every resource has its owner. In the account model considered here, the resource owner can be either the provider or a customer.
Consider the following set of examples of application resource models, starting with the simplest one.
Usually, cloud applications are multitenant, meaning for each subscription they create a tenant that may log in the cloud system and use application services remotely. On the customer side, there must be a resource that represents the tenant as well as the subscription that contains this resource. You may assign any name to this resource, for example, tenant, or management context, or subscription service.
The integration APS application declares two APS types to create APS resources:
In the provider context, there is the application root resource, called app on the diagram. This is a mandatory resource for each instance of an integrated application. All other resources are linked directly or indirectly with this resource. In the above diagram, the app resource has a link collection called tenants.
In the customer context, there is a subscription service (tenant) linked with the app resource through a single required link called app.
To provision such an application service, the provider needs to create the following two resource types and then add them to a service template.
A subscription created from the service template will contain the respective resources.
An application can provide various functionalities and resource usage to its tenants. For this purpose, the provider can offer various configurations for tenants. In the following example, the tenant/config APS type allows for the creation of a number of reference resources used to parameterize subscription services.
When purchasing a subscription, customers choose one of the tenant/config offers. Their subscription service will be linked with the chosen offer.
To provision such an application service, the provider needs to create the following resource types and then add them to a service template.
A subscription created from the service template will contain the respective resources.
An application can provide various services, for example, mailboxes, calendar, and instant messaging. In the customer context, they look like subservices linked with the main subscription service. In the following example, the subscription may have a limited number of serviceA resources.
In this case, you may think of the subscription service as the management context used by customers to manage subservices.
The services
collection links the management context with all serviceA resources provisioned
in the customer context.
To provision such an application service, the provider needs to create the following resource types and then add them to a service template.
A subscription created from the service template will contain the respective resources.
An application can enable the provider to parameterize subservices by offering various configurations. In the following example, the provider uses the service-A/config APS type to create various reference resources to offer various subservice configurations to customers.
When provisioning a service-A resource, a customer selects a service-A/config reference resource to assign its parameters to the new resource. The new service-A resource is linked with the selected service-A/config reference resource.
To provision such an application service, the provider needs to create the following resource types and then add them to a service template.
A subscription created from the service template will contain the respective resources.
Once subscribed to application services, customers and their service users consume application resources, such as storage, network traffic, CPU power, and memory space. To count resource consumption, the subscription service must be able to activate counters as the resource structures.
The platform periodically wakes the APS controller to sync counters. Once some counters are active
in a subscription, the APS controller will call the retrieve
method of the subscription service to get the
newest counters values and to update the respective objects in the database.
To provision the application service, the provider needs to create the following resource types and then add them to a service template.
A subscription created from the service template will contain the respective resources.
The provider can view and update the periodical process responsible for initiating resource usage collection in the platform task manager.
In the provider control panel, navigate to Operations > Tasks.
On the Periodic tab, find the “Synchronize resource usage for instances of APS applications” periodic task.
Open it to perform one of available operations:
Run the task immediately by clicking Run.
Cancel the task by clicking Cancel Task.
Click Edit to change the period or start time as needed:
Note
The above operations are useful when testing an application to minimize the sync period and to run the task immediately.
A counter is a property of an APS resource implementing usually the counter
structure of the abstract
Resource APS type. A counter property allows creating resource types based
on various Application Counter resource classes (depending on the measurement unit) as explained and demonstrated
in the Resource Counters procedure guide. In the following example, a resource type is based on
the Application Counter (unit) resource class and the UnitCounter
property of the Tenant
APS type.
The above-mentioned periodic task synchronizes the limit
and usage
properties of the counter so that
the limit changed in the subscription will change the limit
property in the counter, and the usage
property
in the counter will change the respective usage in the subscription.
Note
When the APS controller sets a PUT request to the APS application connector to change the limit of a counter, the connector usually forwards this request to the respective integrated cloud application.