A custom URL can open a pre-configured Create Stack page in the Resource Orchestration Service (ROS) console, launching a stack creation process with predefined settings and reducing manual input.
Build a custom URL
The following example builds a custom URL that configures the Create Stack page with the name prefix MyStack, a specific template, a RAM role named CustomRole, and the page title Create RAM Role.
-
Example URL
NoteVisit this URL to view the result.
# The line break is for readability only. Do not add a line break in the actual URL. https://ros.console.aliyun.com/cn-hangzhou/stacks/create? step=2&exampleTemplateUrl=http://ros-template.cn-hangzhou.oss.aliyun-inc.com/ECS_Ram_Role.json&stackNamePrefix=MyStack¶meters={"RoleName":"CustomRole"}&isSimplified=true&productNavBar=disabled&pageTitle={"zh-cn": "创建RAM角色", "en": "Create RAM Role"} -
Opening this URL in a browser sends a GET request to the ROS console, which uses the query parameters to render a custom stack creation page.
The page opens to the Configure Parameters step. The Stack Name field defaults to a value like
MyStack_2024-0xxx, the RAM Role Name is set toCustomRole, and the YAML editor contains the- oss:Get*and- oss:List*policies.
Anatomy of the custom URL
The example URL has two parts separated by a question mark (?).
-
The base URL, which is the access path.
https://ros.console.aliyun.com/cn-hangzhou/stacks/create-
This path points to the Create Stack page in the ROS console.
-
The
cn-hangzhoucomponent specifies that the stack is created in the China (Hangzhou) region. You can replace this with a different region ID. For more information, see ROS regions.
-
-
The query parameters.
# The line break is for readability only. Do not add a line break in the actual URL. step=2& exampleTemplateUrl=http://ros-template.cn-hangzhou.oss.aliyun-inc.com/ECS_Ram_Role.json& stackNamePrefix=MyStack& parameters={"RoleName":"CustomRole"}& isSimplified=true& productNavBar=disabled& pageTitle={"zh-cn": "创建RAM角色", "en": "Create RAM Role"}Query parameters are key-value pairs separated by ampersands (
&). Each pair configures an option that defines the initial state and appearance of the Create Stack page. The following table describes the parameters in the example. For a complete list of supported parameters, see Supported custom parameters.Key-value pair
Parameter
Value
Description
step=2
step
2
Jumps directly to the Configure Parameters step.
exampleTemplateUrl=http://ros-template.cn-hangzhou.oss.aliyun-inc.com/ECS_Ram_Role.json
exampleTemplateUrl
http://ros-template.cn-hangzhou.oss.aliyun-inc.com/ECS_Ram_Role.json
Loads the template from the specified URL: RAM role for ECS instance.
stackNamePrefix=MyStack
stackNamePrefix
MyStack
Sets the stack name prefix to MyStack.
parameters={"RoleName":"CustomRole"}
parameters
{"RoleName":"CustomRole"}
Sets the template parameter
RoleNameto CustomRole.isSimplified=true
isSimplified
true
Uses the simplified creation page.
NoteWhen the
isSimplifiedparameter is set totrue, thestepparameter values2and3have no effect.productNavBar=disabled
productNavBar
disabled
Hides the left-side product navigation bar.
pageTitle={"zh-cn": "创建RAM角色", "en": "Create RAM Role"}
pageTitle
{"zh-cn": "Create RAM Role", "en": "Create RAM Role"}
Sets the page title to Create RAM Role.
Supported custom parameters
|
Parameter |
Type |
Description |
Details |
|
step |
number |
The default step in the stack creation wizard. |
Valid values:
Note
When the isSimplified parameter is set to |
|
stackName |
string |
The stack name. |
Example: MyStack Note
You can specify either the |
|
stackNamePrefix |
string |
The prefix for the stack name. The rest of the name is randomly generated. |
Example: MyPrefix Note
You can specify either the |
|
stackId |
string |
The ID of the stack to clone. |
Example: 91062917-1467-4f66-ab7a-f176c3ae**** Note
You can specify only one of the following parameters: |
|
pageTitle |
map |
The title of the custom page. |
A JSON-formatted string that supports internationalization. Example value: {"zh-cn":"创建服务","en":"Create Service"}. |
|
productNavBar |
string |
Hides the left-side navigation menu when set to |
Valid values:
|
|
disableNavigation |
boolean |
Whether to hide the breadcrumb navigation at the top of the page. |
Valid values:
|
|
hideTitle |
boolean |
Whether to hide the page title. |
Valid values:
|
|
hideStepRow |
boolean |
Whether to hide the wizard at the top of the page. |
Valid values:
|
|
timeoutMins |
number |
The timeout period for the stack operation. |
Unit: minutes Default: 60 Value range: 10 to 1440 Example: 60 |
|
disableRollback |
boolean |
Whether to roll back the stack if the operation fails. |
Valid values:
|
|
showTag |
boolean |
Whether to show tag settings. |
Valid values:
|
|
privateTemplateId |
string |
The ID of a template in My Templates. |
Example: 5ecd1e10-b0e9-4389-a565-e4c15efc**** Note
You can specify only one of the following parameters: |
|
privateTemplateVersion |
string |
The version of a template in My Templates. |
Example: v1 This parameter is valid only when you specify the |
|
exampleTemplateUrl |
string |
The URL of a sample template. |
Example: Note
You can specify only one of the following parameters: |
|
templateType |
string |
How to provide the template. |
Valid values:
|
|
templateUrl |
string |
The URL of the template. ROS parses the template content from this URL. |
The URL must point to a template on an HTTP or HTTPS web server, or in an Alibaba Cloud OSS bucket (for example, Example: Note
You can specify only one of the following parameters: |
|
hideTemplateSelector |
boolean |
Whether to hide the options for providing the template. |
Valid values:
|
|
parameters |
string |
The template parameters. |
The value is a JSON-formatted string. Example: |
|
createType |
string |
The creation type. |
Valid values:
|
|
isSimplified |
boolean |
Whether to use the simplified creation page. |
Valid values:
|
|
tags |
map |
The tags for the stack. |
The value is a JSON-formatted string. Example: Note
This parameter has no effect if the showTag parameter is set to |
|
immutableTags |
map |
Immutable tags that cannot be modified after the stack is created. |
The value is a JSON-formatted string. Example: |
|
notificationURLs |
string |
The callback URLs for receiving stack event notifications. |
The value is a list of strings in JSON format. Example: |
|
immutableNotificationURLs |
string |
Immutable callback URLs for stack event notifications that cannot be modified after the stack is created. |
The value is a list of strings in JSON format. Example: |