You can execute a public template provided by Operation Orchestration Service (OOS) to obtain the operating system type of an Elastic Compute Service (ECS) instance and add an operating system tag to the instance. This facilitates operations and maintenance (O&M) of the instance. The operating system types include Windows and Linux.

Procedure

  1. Log on to the OOS console.
  2. In the left-side navigation pane, click Public Templates.
  3. In the top navigation bar, select a region.
    Note By default, OOS deployed in a region can be used to manage resources only in that region. For example, OOS deployed in the China (Hangzhou) region can be used to manage ECS instances only in this region. However, OOS provides a method to manage resources deployed in other regions. If you want to call API operations in other regions, specify the region ID in the ACS::ExecuteAPI action. We recommend that you do not use this method. Select the region where the ECS instance to which you want to add a tag resides.
  4. On the Public Templates page, find ACS-ECS-BulkyTagInstanceByOSType and click Create Execution.
  5. On the Create page, perform the following operations:
    1. In the Basic Information step, keep the default values and click Next: Parameter Settings.
      Note The default value of Execution Mode is Automatic. This indicates that all tasks in the template will automatically run.
    2. In the Parameter Settings step, set targets to Select Instances Manually. Then, select the ECS instance to which you want to add a tag.
      Create Execution
      Note You can select multiple ECS instances at a time.
    3. Set tagKey to OSType.
    4. Click Next: OK.
    5. Confirm the settings and click Create.

Result

You can log on to the ECS console to check whether an operating system tag is added to the ECS instance. For example, the OSType:windows tag is added to an ECS instance that runs the Windows operating system.

Execution result