You can modify the attributes of an Elastic Compute Service (ECS) instance, such as the name, hostname (HostName), and description of the instance, to make instance resources easier to identify. 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
Modify the attributes of an instance in the ECS console
Log on to the ECS console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
Find the instance whose attributes you want to modify and choose in the Actions column.
In the Modify Instance Attributes dialog box, modify the instance attributes as prompted and click Confirm.
(Optional) 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. The new hostname does not take effect if you restart the instance from within the operating system. For more information, see Restart instances.
WarningThe 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.
Modify the attributes of an instance by calling API operations
When you create an instance by calling the RunInstances operation, configure the
InstanceName
,HostName
, andDescription
parameters to specify the instance attributes.To modify the attributes for an existing instance, call the ModifyInstanceAttribute operation and configure the
InstanceName
,HostName
, andDescription
parameters to specify the instance attributes.