All Products
Search
Document Center

Elastic Compute Service:Modify the attributes of an instance

Last Updated:Mar 25, 2024

You can modify the name, hostname (HostName), and description attributes of an Elastic Compute Service (ECS) instance to identify instance resources in an efficient manner. This facilitates the management and automatic O&M of instance resources and improves the security of the resources. This topic describes how to modify the attributes of an instance.

Procedure

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Find the instance whose attributes you want to modify and choose image.png > Instance Attributes > Modify Instance Attribute in the Actions column.

  5. In the Modify Instance Attributes dialog box, modify the instance attributes as prompted and click Confirm.

  6. (Conditionally required) Restart the instance.

    If you change the hostname of the instance, you must restart the instance for the new hostname to take effect. Restart the instance in the ECS console or by calling the RebootInstance operation. If you restart the instance from within the operating system, the new hostname does not take effect. For more information, see Restart an instance.

    Warning

    The restart operation stops the instance for a short period of time and may interrupt services that are running on the instance. We recommend that you restart instances during off-peak hours.

References

You can also call the following API operations to specify or modify the attributes of an instance:

  • When you create an instance by calling the RunInstances operation, configure the InstanceName, HostName, and Description parameters to specify the instance attributes.

  • To modify the attributes for an existing instance, call the ModifyInstanceAttribute operation and configure the InstanceName, HostName, and Description parameters to specify the instance attributes.