All Products
Search
Document Center

App Streaming:CreateAppInstanceGroup

Last Updated:Jul 04, 2026

Create a delivery group.

Operation description

Before you call this operation, ensure you understand the billing methods and pricing for Wuying App Service.

A delivery group is a logical grouping used to deliver cloud applications to end users. It includes cloud application resources, the image that contains the cloud applications, resource management policies, and user assignment settings. For more information, see Publish a delivery group.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

appstreaming:CreateAppInstanceGroup

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AppCenterImageId

string

Yes

The ID of the app image. You can obtain the ID from the Custom Images or System Images page under Operations in the Wuying App Service console.

img-8z4nztpaqvay4****

ProductType

string

Yes

The product type.

Valid values:

  • CloudApp :

    Wuying App Service

CloudApp

AppInstanceGroupName

string

No

The name of the app instance group.

办公应用

Users

array

No

The usernames to add to the app instance group.

string

No

The username to add to the app instance group. The format is Users.N=<username>, where N is an integer greater than 0.

Users.1=username1 Users.2=username2

UserInfo

object

No

Details about the users to be added to the app instance group. This parameter is required if you specify the Users parameter.

Type

string

No

The type of user account.

Valid values:

  • Simple :

    convenience account

Simple

ChargeType

string

Yes

The billing method.

Valid values:

  • PostPaid :

    pay-as-you-go

  • PrePaid :

    subscription

PrePaid

PromotionId

string

No

The promotion ID. You can obtain the promotion ID by calling the GetResourcePrice operation.

17440009****

AutoPay

boolean

No

Specifies whether to enable automatic payment.

Valid values:

  • true :

    Automatic payment is enabled.

  • false :

    Automatic payment is disabled. [Default]

false

AutoRenew

boolean

No

Specifies whether to enable auto-renewal.

Valid values:

  • true :

    Auto-renewal is enabled.

  • false :

    Auto-renewal is disabled. [Default]

false

Period

integer

Yes

The subscription duration. This parameter is required when ChargeType is set to PrePaid. The unit of the duration is specified by PeriodUnit.

  • If PeriodUnit is set to Week, the valid value is:

    • 1

  • If PeriodUnit is set to Month, the valid values are:

    • 1

    • 2

    • 3

    • 6

  • If PeriodUnit is set to Year, the valid values are:

    • 1

    • 2

    • 3

Note

If ChargeType is set to PostPaid, set this parameter to 1.

1

PeriodUnit

string

Yes

The unit of the subscription duration. This parameter is required when ChargeType is set to PrePaid.

Note

This parameter is case-sensitive. For example, Week is a valid value, but week is not. If you specify an invalid combination of Period and PeriodUnit (for example, a Period of 2 and a PeriodUnit of Week), the API call may succeed, but the order will fail.

Note

If ChargeType is set to PostPaid, set this parameter to Month.

Valid values:

  • Month :

    Month

  • Year :

    Year

  • Week :

    Week

Week

SessionTimeout

integer

Yes

The idle time in minutes before a session times out. After a user disconnects, the app process is terminated after this period. To disable the timeout, set this value to -1. Valid values are -1 and any integer from 3 to 300. The default is 15.

15

BizRegionId

string

Yes

The region ID of the app instance group. For more information about supported regions, see Usage notes.

Valid values:

  • cn-shanghai :

    China (Shanghai)

  • cn-hangzhou :

    China (Hangzhou)

cn-hangzhou

ChargeResourceMode

string

Yes

The resource unit to be billed.

Valid values:

  • Node :

    Billed by node

Node

NodePool

object

No

The node pool configuration.

NodeInstanceType

string

No

The instance type of the resource to purchase. You can call the ListNodeInstanceType operation to obtain the valid values.

Valid values:

  • appstreaming.vgpu.8c16g.4g :

    Wuying - Graphics: 8 vCPUs, 16 GiB memory, 4 GiB GPU memory

  • appstreaming.general.8c16g :

    Wuying - General-purpose: 8 vCPUs, 16 GiB memory

  • appstreaming.general.4c8g :

    Wuying - General-purpose: 4 vCPUs, 8 GiB memory

  • appstreaming.vgpu.14c93g.12g :

    Wuying - Graphics: 14 vCPUs, 93 GiB memory, 12 GiB GPU memory

  • appstreaming.vgpu.8c31g.16g :

    Wuying - Graphics: 8 vCPUs, 31 GiB memory, 16 GiB GPU memory

appstreaming.general.4c8g

NodeAmount

integer

No

The number of resources to purchase. Valid values: 1 to 100.

Note
  • This parameter is required for subscription resources.

  • This parameter is required for pay-as-you-go resources if the scaling mode (StrategyType) is set to Fixed Number of Nodes (NODE_FIXED) or Usage-based Auto Scaling (NODE_SCALING_BY_USAGE).

1

NodeCapacity

integer

No

The maximum number of concurrent sessions per resource. Exceeding this limit may degrade the user experience. Valid values depend on the resource specification. You can query the valid values by calling the ListNodeInstanceType operation.

2

StrategyType

string

No

The scaling mode.

Note
  • NODE_FIXED (Fixed Number of Nodes): applies to both subscription and pay-as-you-go resources.

  • NODE_SCALING_BY_USAGE (Usage-based Auto Scaling): applies to both subscription and pay-as-you-go resources.

  • NODE_SCALING_BY_SCHEDULE (Scheduled Scaling): applies only to pay-as-you-go resources.

Valid values:

  • NODE_FIXED :

    Fixed number of nodes (auto scaling is not used)

  • NODE_SCALING_BY_SCHEDULE :

    scheduled scaling

  • NODE_SCALING_BY_USAGE :

    auto scaling

NODE_FIXED

MaxScalingAmount

integer

No

The maximum number of resources to create during a scale-out. This parameter is required when StrategyType is set to NODE_SCALING_BY_USAGE (auto scaling).

10

MaxIdleAppInstanceAmount

integer

No

The maximum number of idle sessions. If you specify this parameter, an auto scaling event is triggered only when the session usage exceeds ScalingUsageThreshold and the number of idle sessions in the app instance group is less than MaxIdleAppInstanceAmount. Otherwise, no new resources are created. This parameter allows you to control auto scaling behavior and reduce costs.

3

ScalingStep

integer

No

The number of resources to add in each scale-out. Valid values: 1 to 10. This parameter is required when StrategyType is set to NODE_SCALING_BY_USAGE (auto scaling).

2

ScalingUsageThreshold

string

No

The session usage percentage that triggers a scale-out. An auto scaling event is triggered when the session usage exceeds this threshold. Session usage is calculated by using the following formula: Session Usage = (Number of Active Sessions) / (Total Number of Resources × Number of Concurrent Sessions per Resource) × 100%. This parameter is required if StrategyType is set to NODE_SCALING_BY_USAGE (auto scaling). Valid values: 0 to 100. Default value: 85.

85

ScalingDownAfterIdleMinutes

integer

No

The number of minutes an idle resource can wait before being released. A resource is considered idle when it has no active sessions. The resource is released when this period ends. The following exceptions may apply:

  • A scale-in is prevented if it would immediately trigger a scale-out, which avoids scaling loops.

  • If a scale-out is triggered by an increase in sessions during this period, the original scale-in countdown is canceled and reset.

5

StrategyEnableDate

string

No

The date on which the policy takes effect. The date must be in the yyyy-MM-dd format and must be on or after the current date. This parameter is required if StrategyType is set to NODE_SCALING_BY_SCHEDULE (scheduled scaling).

2022-08-01

StrategyDisableDate

string

No

The date on which the policy expires. The date must be in the yyyy-MM-dd format. The interval between the effective date and the expiration date must be between 7 and 365 days, inclusive. This parameter is required if StrategyType is set to NODE_SCALING_BY_SCHEDULE (scheduled scaling).

2022-09-08

WarmUp

boolean

No

Specifies whether to enable resource warming. This parameter is required if StrategyType is set to NODE_SCALING_BY_SCHEDULE (scheduled scaling).

false

RecurrenceSchedules

array<object>

No

The recurring schedules for the policy. This parameter is required if StrategyType is set to NODE_SCALING_BY_SCHEDULE (scheduled scaling).

array<object>

No

A recurring schedule.

RecurrenceType

string

No

The recurrence type for the scheduled task. You must specify both RecurrenceType and RecurrenceValues.

Valid values:

  • weekly :

    The scheduled task is repeated on specific days of the week.

weekly

RecurrenceValues

array

No

The list of recurrence values.

integer

No

The value for the recurrence.

Valid values:

  • 1 :

    Monday

  • 2 :

    Tuesday

  • 3 :

    Wednesday

  • 4 :

    Thursday

  • 5 :

    Friday

  • 6 :

    Saturday

  • 7 :

    Sunday

1

TimerPeriods

array<object>

No

The time periods within the recurrence. The time periods must meet the following requirements:

  • A maximum of three time periods are allowed.

  • The time periods cannot overlap.

  • The interval between two consecutive time periods must be at least 5 minutes.

  • The duration of a single time period must be at least 15 minutes.

  • All time periods must be within the same day.

object

No

The time period within the recurrence.

StartTime

string

No

The start time. The time is in the HH:mm format.

12:00

EndTime

string

No

The end time. The time is in the HH:mm format.

15:00

Amount

integer

No

The number of resources.

2

Network

object

No

The network configuration.

Note

This parameter is available only to allowlisted users. To use it, submit a ticket.

StrategyType

string

No

The network policy type.

Valid values:

  • Mixed :

    Mixed mode: a single VPC with dual NICs and a dedicated public IP address

  • Shared :

    Shared mode: a single NIC that accesses the internet through a NAT gateway

Shared

Routes

array<object>

No

The route configuration. This parameter can be configured only if StrategyType is set to Mixed.

object

No

The route configuration.

Destination

string

No

The destination CIDR block.

139.196.XX.XX/32

Mode

string

No

The network egress mode.

Valid values:

  • Shared :

    Access through a NAT gateway

Shared

IpExpireMinutes

integer

No

The duration in minutes after which a public IP address is rotated on the next sign-in. The minimum value is 60.

60

OfficeSiteId

string

No

The ID of the workspace.

cn-hongkong+dir-842567****

VSwitchIds

array

No

The list of vSwitch IDs.

  • This parameter is valid only for custom workspaces.

string

No

The ID of the vSwitch.

vsw-m5ef1sjhf7bbvqvvy****

DomainRules

array<object>

No

The domain name-based access control rules.

object

No

The domain name-based access control rule.

Domain

string

No

The domain name.

www.example.com

Policy

string

No

The policy action.

Valid values:

  • allow :

    allows access

  • block :

    blocks access

block

StoragePolicy

object

No

The storage policy.

StorageTypeList

array

No

The list of storage types.

string

No

The storage type.

Valid values:

  • OFF :

    Disabled

  • PDS :

    Drive and Photo Service

PDS

UserProfile

object

No

The configuration for user data roaming.

UserProfileSwitch

boolean

No

Specifies whether to enable user data roaming.

Valid values:

  • false :

    Disabled

  • true :

    Enabled

false

RemoteStorageType

string

No

The remote storage type used for user data roaming.

Valid values:

  • NAS :

    Apsara File Storage NAS

NAS

RemoteStoragePath

string

No

The remote storage path for user data roaming.

  • If this parameter is left empty, the app instance group ID is used by default.

  • To share roaming data across multiple app instance groups in the same VPC, use the same path for all groups.

ID20250101

PreOpenAppId

string

No

The ID of the app to pre-open.

cag-b2ronxxd****

VideoPolicy

object

No

The display policy.

FrameRate

integer

No

The frame rate, in frames per second (FPS).

Valid values:

  • 30 :

    30 FPS

  • 60 :

    60 FPS

60

TerminalResolutionAdaptive

boolean

No

Specifies whether to enable adaptive resolution.

  • true: The session resolution adapts to the client's display size. In this case, SessionResolutionWidth and SessionResolutionHeight specify the maximum resolution.

  • false: The session resolution is fixed. In this case, the resolution is fixed to the values of SessionResolutionWidth and SessionResolutionHeight.

Valid values:

  • true :

    true

  • false :

    false

false

SessionResolutionWidth

integer

No

The resolution width, in pixels.

1920

SessionResolutionHeight

integer

No

The resolution height, in pixels.

1080

StreamingMode

string

No

The streaming mode. This parameter, in combination with the Webrtc parameter, determines the streaming protocol.

  • When Webrtc is true and StreamingMode is video, the protocol is WebRTC streaming.

  • When Webrtc is false and StreamingMode is video, the protocol is video streaming.

  • When Webrtc is false and StreamingMode is mix, the protocol is mixed streaming.

Valid values:

  • video :

    video stream

  • mix :

    mixed stream

video

Webrtc

boolean

No

Specifies whether to enable WebRTC. This parameter, in combination with the StreamingMode parameter, determines the streaming protocol.

  • When Webrtc is true and StreamingMode is video, the protocol is WebRTC streaming.

  • When Webrtc is false and StreamingMode is video, the protocol is video streaming.

  • When Webrtc is false and StreamingMode is mix, the protocol is mixed streaming.

Valid values:

  • true :

    true

  • false :

    false

true

RuntimePolicy

object

No

The runtime policy.

SessionType

string

No

The session type.

Valid values:

  • CONSOLE :

    Console session

  • NORMAL :

    RDP session

NORMAL

DebugMode

string

No

Specifies whether to enable debug mode. To call the GetDebugAppInstance and CreateImageFromAppInstanceGroup operations, you must set this parameter to ON.

Valid values:

  • OFF :

    Disabled

  • ON :

    Enabled

OFF

SessionUserGenerationMode

string

No

The generation mode for session users.

  • If you set this value to wyid, you must set SessionPreOpen to false.

Valid values:

  • wyid :

    wyid

wyid

SessionPreOpen

string

No

Specifies whether to enable session pre-opening.

  • If you do not specify this parameter, this feature is enabled by default.

Valid values:

  • true :

    Enabled

  • false :

    Disabled

false

PerSessionPerApp

boolean

No

Specifies whether to create a new session for each application.

  • If you enable this feature, opening multiple applications in the app instance group creates a separate session for each application, which consumes more session resources.

Valid values:

  • true :

    Enabled

  • false :

    Disabled

false

PersistentAppInstanceScheduleMode

string

No

The scheduling mode for persistent sessions.

Valid values:

  • DYNAMIC :

    Dynamic scheduling - a persistent session can be scheduled to different nodes.

  • FIX_NODE :

    Fixed node scheduling - a persistent session can only be scheduled to a specific node.

DYNAMIC

SecurityPolicy

object

No

The security policy.

ResetAfterUnbind

boolean

No

Specifies whether to reset the instance after unbinding.

Valid values:

  • true :

    Reset

  • false :

    Do not reset

true

SkipUserAuthCheck

boolean

No

Specifies whether to skip the user authorization check.

Valid values:

  • true :

    Do not check

  • false :

    Check [Default]

false

UserDefinePolicy

object

No

Custom policy

CustomConfig

string

No

The content of the custom policy. The content must comply with the image version specifications. To use this parameter, submit a ticket to be added to the allowlist.

[{"target":"agent","config":{"abc":"xxx"}}]

AppPolicyId

string

No

The policy ID.

pg-0clfzcy0adpcf****

ClusterId

string

No

Cluster ID

cls-d39iq73l5c0a8****

SubPayType

string

No

The subtype of the billing method.

Valid values:

  • postPaid :

    Pay-as-you-go

  • monthPackage :

    Package (supported only by Cloud Browser)

  • prePaid :

    Subscription

postPaid

AppPackageType

string

No

Package type.

browser.package.5.250.appstreaming.general.basic

AuthMode

string

No

Delivery group authorization mode.

Valid values:

  • App :

    Application authorization

  • AppInstanceGroup :

    Delivery Group Authorization

  • Session :

    Persistent Session Authorization

App

UserGroupIds

array

No

A list of authorized user group IDs.

string

No

Authorized user group ID.

Response elements

Element

Type

Description

Example

object

The response data.

RequestId

string

The ID of the request.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****

AppInstanceGroupModel

object

The details of the app instance group.

AppInstanceGroupId

string

The ID of the app instance group.

aig-9ciijz60n4xsv****

OrderId

string

The ID of the order.

12345****

NodePoolId

string

The ID of the node pool. This parameter is returned only if a node pool is also created.

rg-ew7va2g1wl3vm****

Examples

Success response

JSON format

{
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "AppInstanceGroupModel": {
    "AppInstanceGroupId": "aig-9ciijz60n4xsv****",
    "OrderId": "12345****",
    "NodePoolId": "rg-ew7va2g1wl3vm****"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 StockError.NoStock The selected specification is out of stock. Please try again later or select other specifications. The selected specification is out of stock. Please try again later or select other specifications.
500 StockError.InvalidResourceRequest Your request cannot be processed currently due to an error. Please try again later. The inventory check failed and the system is temporarily unable to process your request. Please try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.