This document describes the rules and guidelines for using smart cloud storage plans during development.
By integrating with smart cloud storage, you agree to the Alibaba Cloud Link Visual Video Cloud Storage Terms of Service. Smart cloud storage involves billing. For more information about the billing policy, see Link Visual Billing Policy.
Plan acquisition and freezing
IoT Platform provides a specific amount of free cloud storage. Each device can claim a free plan only once. The plan cannot be claimed again if the device is attached to a different account. There are two types of API operations for querying and claiming free plans: client-side API operations and cloud-to-cloud API operations. Client-side API operations are designed for customers who do not have cloud development capabilities. These operations let your app directly claim and activate cloud storage. Cloud-to-cloud API operations allow customers with cloud development capabilities to centrally manage the activation and use of free and paid plans for their apps. You can use the cloud-to-cloud API operations for all plan management. After a purchased cloud storage plan is activated, refunds are not supported. An API operation is available to deactivate cloud storage plans. This lets you manage how end users freeze and deactivate their plans. For more information about the API operation, see Set the status of a user's cloud storage plan.
In projects where the Link Visual video service is enabled, end users can claim a free 3 month plan for 7 day rolling event-based cloud storage for all video product devices by default.
To increase the purchase rate of cloud storage plans among end users, you can call the Alipay Periodic Payments API operation to prompt users for auto-renewal when their plan expires.
Relationship between plans, devices, and users
A device has only one administrator, who is the user that attached the device through network configuration. The administrator can share the device with other users. The Link Visual cloud-to-cloud API operations do not restrict purchases by user type. You can restrict plan purchases to administrators in your app. When your cloud calls the Link Visual purchase API operation to buy and activate cloud storage for a user, Link Visual records the purchasing user. The purchased plan belongs to the current device and its administrator. Plans are activated in the order they are purchased. A newly purchased plan is appended to the end of the current active plan.
A device's cloud storage plan and the data generated during the plan's validity period are not transferred when the device is detached. If a device is detached and then attached to a new administrator, the previously purchased plan and its data still belong to the original administrator. They cannot be transferred to the new administrator. The new administrator will not have access to the existing plan or data. If the original administrator reattaches the device, the original plan and data remain active for their validity period.
Plan activation order
When an end user claims a free plan or purchases a plan for a device, the plans are activated by default in the order they were acquired. The plan query API operation returns the details for each plan, including the start and end times. The API operations for claiming free plans and activating paid plans both include the `immediateUse` request parameter. You can use this parameter to specify whether the plan should be activated immediately. For example, a user has two plans, A and B. If the user purchases a new plan C, it is activated by default after plans A and B. If your cloud specifies that plan C must be activated immediately by setting `immediateUse=true`, plan C becomes active right away. The new activation order is C, A, B.
To change the activation order of existing plans, you can use the API operations that set a plan to activate immediately. For free plans, you can call the Set a free cloud storage plan to activate immediately API operation. For paid plans, you can call the Set a cloud storage plan to activate immediately API operation. For example, a user has three plans, A, B, and C, with an activation order of A > B > C. Plans A and B are paid, and plan C is free. If the user wants to activate plan C immediately, you can call the API operation to set the free plan to activate immediately. The new activation order becomes C > A > B. If the user later wants to activate plan A immediately, you can call the API operation to set the paid plan to activate immediately. The order is reset to A > C > B.
Plan transfer
End users may need to return or exchange a faulty device. To support this, you can allow users to transfer a purchased cloud storage plan from the original device to a new one. For more information about the API operation, see Transfer a user's cloud storage plan.
Plans and recording schedules
After a cloud storage plan is activated, the end user's device receives a quota for generating cloud recordings. Event-based plans can only record videos triggered by events. Continuous recording plans can record continuously and can also record videos for events that occur during that time. After a recording schedule is enabled, the cloud can determine when and how to generate recordings based on the schedule.
Recording schedules include continuous recording schedules and event-triggered recording schedules. To enable a recording schedule, you must first configure the schedule and then attach it to a device. The cloud schedules video recording for a device only after a recording schedule is attached to it. Therefore, the following conditions must be met for an end user's device to use cloud storage for recording:
Claim a free plan or purchase and activate a paid plan for the device.
Set a recording schedule for the device.
An end user might purchase a cloud storage plan in the app but not enable a recording schedule. This can cause confusion because the cloud will not schedule recordings. The API operation for activating a cloud storage plan supports enabling a default all-day recording schedule. To do this, you can set the `enableDefaultPlan` request parameter to `true`. If a user has custom requirements for the recording schedule, they can configure it by calling the relevant API operations from the app. For more information about the API operations, see Video Service.
Note: If `enableDefaultPlan` is set to `true`, the cloud enables an all-day continuous recording schedule and an all-day event-triggered recording schedule for the device. The default parameters for this schedule are: record all event types, a pre-recording duration of 5 seconds, and a recording duration of 10 seconds.