tencent cloud

Feedback

Subapplication System

Last updated: 2023-09-07 18:10:05

    Overview

    VOD's subapplication feature helps you achieve resource isolation. It is VOD's way of grouping resources. A subapplication functions as an independent account within VOD. The diagram below details how a subapplication works:
    
    Note:
    Resources mentioned in this document include media files in VOD and their attributes, derivative files, configurations, CDN domain names, and usage statistics.

    Use cases

    Below are some typical use cases for VOD subapplications:
    Multi-department/multi-business isolation: A company is using Tencent Cloud VOD to develop its products. Department A is developing a UGSV application, and department B is building a video website. These two businesses need to be isolated from each other. However, out of financial considerations, the company does not want to create two Tencent Cloud accounts. With the subapplication feature, it can achieve resource isolation simply by creating one subapplication for either department.
    Permission control: In the above scenario, the company may also want to control permissions to the resources of the two departments. For example, it may want to allow the two departments to only access their own VOD subapplications. In this case, it can create a sub-user for either department and grant them permissions to the corresponding subapplication. For detailed directions, see Access Management.
    Production/Test environment isolation: If you want to test a VOD feature (for example, you may want to modify event notification settings or enable hotlink protection), to prevent it from affecting your active business, you can create one subapplication for your test environment and one for your production environment. Run tests using the test subapplication and, after you are sure about using the feature in the production environment, switch to the production subapplication.

    Role definitions and IDs

    There are two types of identities in the application system: administrator and application. We illustrate their definitions with the following figure.
    
    1. After the developer activates the cloud on-demand service, a default application is directly generated. At this time, all on-demand resources belong to the default application. The default application ID is your account APPID, which can be viewed in Account Info in the console.
    2. After you enable the VOD subapplication feature, an admin role will be generated, which does not own any VOD resources. All resources still belong to the default application.
    3. You can then use the admin role to create a subapplication. This subapplication will exist in parallel with the default application (a special subapplication) and its resources are separated from the default application. VOD will assign the supplication an ID that is unique across the system. For how to view this ID, see Console Guide - Application Management.
    4. If you create another subapplication, it will also exist in parallel with the default application and the other subapplication, and its resources will be separated from them.
    Note:
    Unless otherwise specified, where subapplication is mentioned below, the default application is also included.

    Capabilities

    The VOD subapplication system provides the following capabilities:
    Creating and setting subapplications: After you enable the VOD subapplication feature, you can create subapplications in the console as the admin and set the name and description for each subapplication.
    Disabling subapplications: All subapplications except the default application can be disabled. When a subapplication is disabled, its domain will also be disabled. However, the resources of the subapplication will not be cleared, and features such as media upload and transcoding will not be affected.
    Isolating resources: On-demand resources between applications are isolated from each other.
    You can manage VOD resources of any subapplication either via the console or using server APIs.
    Statistics such as storage usage, bandwidth/traffic usage, transcoding durations, intelligent recognition durations, and playback data are generated separately for each subapplication.
    Overall statistics for all subapplications are also generated.

    Limits

    The VOD subapplication system has the following limits:
    The name and description of the default application cannot be modified.
    Subapplications cannot be deleted.
    At most 50 subapplications can be created under one VOD account.
    Subapplications cannot be billed separately. You cannot use different billing modes or generate separate bills for subapplications. Nor can you buy dedicated packages for a subapplication. The usage (including storage, traffic, transcoding duration, intelligent recognition duration) of all subapplications under a VOD account is aggregated and billed together.

    Console Guide

    Enabling the subapplication feature

    1. Log in to the VOD console.
    2. Click Activate Subapplication on the left sidebar.
    3. Click Use now.
    Note:
    If you cannot find Enable Subapplication on the left sidebar, the feature is already enabled for your account.

    Selecting a role

    After activating the application function, enter the VOD console application management list, where developers can select identities. If the developer has just activated the application function, there will be only one option in the list: "Primary application"; if the developer creates a new application, the corresponding identity option will be added to the list.
    
    
    

    Admin

    Under the admin role, you will find Service Overview, Application Management, Usage Statistics, Resource Package Management, and License Management on the left sidebar.
    Service Overview: This page displays your VOD billing mode, aggregated key data for all subapplications, as well as separate key data for each subapplication.
    Application Management: On this page, you can view, create, edit, or disable subapplications. Subapplication IDs are also displayed on this page.
    Usage Statistics: On this page, you can view your account's usage of different VOD features.
    Resource Package Management: This page shows your package usage.
    License Management: On this page, you can view the RT-Cube licenses you have bound.

    Subapplication

    The console view under a subapplication role is basically the same as the view before the subapplication feature is enabled, except that a subapplication view does not have a billing section. Under a subapplication role, you can view and manage resources under the current supplication.

    Server APIs

    After enabling the subapplication feature, you must specify the subapplication whose resources you want to access when using VOD server APIs.

    Specifying a subapplication for server APIs

    VOD server APIs have been upgraded to TencentCloud API 3.0. You can use the SubAppId parameter to specify the subapplication you want to access. If you want to access the default application, pass in the default application ID or leave the parameter empty.

    Specifying a subapplication for server APIs 2017

    The 2017 version also supports subapplications. Just add a SubAppId parameter (case-sensitive) in your request. This parameter has the same level as other common request parameters of API 2017. If you want to access the default application, pass in the default application ID or leave the parameter empty.
    Note:
    Server API 2017 documentation does not disclose the SubAppId parameter. This does not affect its use though.
    The SubAppId parameter is also involved in signature calculation for server APIs. The calculation rules are the same.

    File Upload

    After enabling the VOD subapplication feature, you must specify the subapplication to which you want to upload your media files.

    Live recording

    You can save live recordings to a specific subapplication by adding the publishing parameter vod_sub_app_id=xxx (xxx is the subapplication ID). You don't need to carry this parameter if you record to the primary application.

    Uploading files from the server

    You can upload files from the server to a specific subapplication. For detailed directions, see the documents below. If you want to upload files to the default application, pass in the default application ID or leave it empty.

    Server upload SDKs

    Server APIs

    ApplyUpload and CommitUpload are the two APIs used to upload files. For detailed directions on how to use them, see Specifying a subapplication for server APIs. You are strongly recommended to use the SDK for upload.

    Uploading files from a client

    When uploading files from a client, you can specify the subapplication to upload to by adding a vodSubAppId=xxx parameter (xxx is the subapplication ID) in the client upload signature. If you want to upload to the default application, pass in the default application ID or leave the parameter empty.
    Note:
    The vodSubAppId parameter is also involved in the calculation of client upload signatures. The calculation rules are the same.

    Pulling files from a URL

    If you upload files by having VOD pull from a URL, you can also specify the subapplication to upload to.
    Console: For detailed directions, see Console Guide.
    Server API: Use the PullUpload API. For more information, see Specifying a subapplication for server APIs.

    Permission Management

    VOD has been connected to CAM and supports authorization at the subapplication level. For details, see CAM.

    FAQs

    After the subapplication feature is enabled, will it affect existing business logic in the production environment?

    No. The subapplication system is designed with compatibility in mind. If a subapplication ID is not specified, all server APIs will take effect only for the default application.

    Will fees be charged for enabling the subapplication feature?

    Each user can create 20 applications (including default applications) for free, and some applications exceeding 20 will be charged separately. At the same time, the consumption generated by each application will be included in the cloud-on-demand account, and will be charged according to the VOD billing logic for billing.

    My company uses the subapplication feature to implement business isolation. How can I allocate the costs to different businesses?

    As described in Limits, VOD only generates one aggregated bill for a VOD account. However, we provide usage statistic for each subapplication to facilitate your cost allocation.

    What will happen to a subapplication if my VOD service is suspended?

    If your VOD service is suspended, all subapplications under your account will be disabled.

    Can I migrate videos from one subapplication to another?

    The resources of different subapplications are isolated from one another. You cannot move resources between subapplications.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support