APS application has to allow the following configuration of services: customer should be able to create users in POA CP who will use the application and assign disk quota to them.
Create the following services and resources in the application APP-META.xml file. The article provides example of corresponding entities below.
1. Define service with class 'account' - it will define personal user accounts in application:
<service id="User" class="account">
2. Define application setting for disk quota:
<setting type="string" id="quota">
POA will call application configuration script and pass values of all settings via environment variables like 'SETTING_<id>' where <id> is ID of setting defined in the application APP-META.xml file.
3. Define application resource which will limit disk quota for users:
<resource class="gb" id="quota" limiting-setting="quota">
<name>User disk quota</name>
4. Define script which will report resource (disk) usage:
Application may define how often resource usage should be collected in the poll-interval attribute of the resource-script tag. It may be specified in minutes (like 30m), hours (like 3h) or days (like 1d).
POA periodic task Synchronize resource usage for instances of APS applications executes resource usage collection scripts for APS application instances in the proper time. Resource script reports resource usage to POA which will be stored in POA database and shown in control panel.
Resource script should provide output matching schema. Use the Knowledgebase article #115854 APS: How to verify provisioning script output to check if script provides correct output.
Important: the attribute'limiting-setting' of the resource must contain ID of the corresponding setting. In the example above setting which define disk quota for users has ID "quota" and exactly this ID is used in the resource definition.
Refer to the APS Package Format Specification Guide for more details: