After you install and configure Alibaba Cloud Toolkit (Cloud Toolkit) in Visual Studio Code, you are provided with automatic suggestions when you write ROS templates. You can also manage templates and stacks more efficiently.
Prerequisites
Download and install Visual Studio Code.
Install and configure Cloud Toolkit in Visual Studio Code. For more information, see Install and configure Cloud Toolkit in Visual Studio Code.
Background information
Resource Orchestration Service (ROS) is integrated with the Cloud Toolkit extension. After you install and configure Cloud Toolkit in Visual Studio Code, you can use this integration to manage templates and stacks more efficiently.
For more information about Cloud Toolkit, see What is Alibaba Cloud Toolkit?.
Manage templates
In Cloud Toolkit, you can use the ROS LOCAL TEMPLATES module to manage local templates and the ROS REMOTE TEMPLATES module to manage remote templates.
In Visual Studio Code, create or open a project folder.
Create a template.
In the Activity Bar on the left, click the
icon.Click ROS LOCAL TEMPLATES.
Click +, select AlibabaCloud ROS YAML Template or AlibabaCloud ROS JSON Template, and then enter a template name. This creates a local template in the JSON or YAML format.
NoteWhen you create a template for the first time, Visual Studio Code automatically generates a .ros.config.json file. The ROS LOCAL TEMPLATES module uses this file to manage templates. This file records the path of the project folder and the names of the local template files.
Edit the template.
AlibabaCloud ROS YAML Template example
AlibabaCloud ROS JSON Template example
NoteUnder Resources, you can enter a keyword for a resource type to receive suggestions for all related resource types.
Cloud Toolkit automatically notifies you of any syntax error in the template.
Manage local templates.
Hover over ROS LOCAL TEMPLATES and click an icon to manage templates.
The following table describes the features.
Feature
Description
Open Folder
Opens the local folder.
Refresh
Refreshes the local folder.
Create
Creates a local template. When you use this extension to create a template for the first time, a .ros.config.yml file and JSON and YAML folders are created by default.
Upload
Uploads the local template to a remote location.
NoteAfter you upload a template, it appears in the ROS REMOTE TEMPLATES (remote template list). You can also view the uploaded template in the Resource Orchestration Service console.
Right-click a local template and perform an operation as needed.
The following table describes the features.
Feature
Description
Delete
Deletes the local template.
Rename
Renames the local template.
Upload
Uploads the local template.
NoteAfter you upload a template, it appears in the ROS REMOTE TEMPLATES (remote template list). You can also view the uploaded template in the Resource Orchestration Service console.
NoteOpen a local .ros.json or .ros.yaml template file. Then, right-click in the template editor and click Alibaba Cloud ROS - Create Stack. You are redirected to the Create Stack page in the ROS console to create a stack.
Manage remote templates (templates in the ROS console).
Hover over ROS REMOTE TEMPLATES and click an icon to manage templates.
The following table describes the features.
Feature
Description
Refresh
Refreshes the remote template folder.
Update
Updates the remote template. This updates the template in the Resource Orchestration Service console.
Download
Downloads the remote template. You can click Download to download a template from the Resource Orchestration Service console to your local machine.
Right-click a remote template and perform an operation as needed.
The following table describes the features.
Feature
Description
Delete
Deletes the remote template. This deletes the template from the Resource Orchestration Service console.
Download
Downloads the remote template. You can click Download to download a template from the Resource Orchestration Service console to your local machine.
Rename
Renames the remote template.
Update
Updates the remote template.
Click Update to open the remote template comparison box.
Edit the template on the right.
NoteThe template on the left cannot be edited.
In the right template section, right-click. In the dialog box that appears, click Alibaba Cloud Ros - Update Template to update the template in the Resource Orchestration Service console.
NoteWhen you click a remote template, a temporary file is opened by default for you to view the template content.
You can hover over a remote template to view its properties.
Manage stacks
The Alibaba Cloud View module in Alibaba Cloud Toolkit lets you manage remote stacks, which are stacks in the ROS console.
In Visual Studio Code, create or open a project folder.
In the Activity Bar on the left, click the
icon.Select and perform an operation as needed.
The following table describes the features.
Feature
Description
Region
Select the region where the stack is located.
Search
In the current region, search for a stack by its ID or name. If you do not enter anything, the stack list for the current region is refreshed.
Create Stack
Creates a stack. You are automatically redirected to the Create Stack page in the ROS console.
Stack ID/Name
Click the name to view the properties of the stack.
Status
Shows the current status of the stack.
Create At
Shows the creation time of the stack.
Outputs
Shows the output values of the stack.
Delete
Deletes the stack.
More
Properties: Shows the properties of the stack.
Resources: Shows information about all resources in the stack.
Parameters: Shows the parameters of the stack.
Contact us
If you need further assistance or want to provide feedback, you can contact Alibaba Cloud by joining the customer support DingTalk group. The group number is 11783495.