Modifying an Instance Attribute
You can modify an attribute of an instance, such as its type, user data, or termination behavior. Depending on the attribute you want to modify, the instance must be running or stopped.
Modifying an Instance Attribute Using Cockpit v1
Before you begin:
For more information, see Stopping and Starting Instances and About Instances > Instance Attributes. |
Open the Modify Instance Attributes Dialog Box
-
Click Compute > Instances.
-
Click the instance whose attributes you want to modify.
The instance is selected. -
Click Attributes .
The MODIFY INSTANCE ATTRIBUTES dialog box appears.
(optional) Modify the Termination Behavior of the Instance
-
Click the Disable Termination tab.
-
Switch the button to
true
orfalse
:-
If set to
true
, you cannot terminate the instance. -
If set to
false
, you can terminate it using any interface.
-
(optional) Modify the Deletion Behavior of the Volumes Attached to the Instance
When you create an instance from an official OUTSCALE machine image (OMI) with Cockpit v1, the Delete on termination attribute is The Delete on termination tab only allows you to switch the attribute to |
-
Click the Delete on termination tab.
-
Switch the button to
true
orfalse
:-
Switch the button to
true
to delete all volumes when the instance is terminated. -
Switch the button to
false
to keep all volumes when the instance is terminated.
-
(optional) Modify the Security Groups Associated with the Instance
-
Click the Security Groups tab.
-
From the list, select the security group(s) you want to associate with the instance.
-
To disassociate a security group from the instance, click next to the name of the security group.
-
Click Apply to validate.
(optional) Modify the Shutdown Behavior of the Instance
-
Click the Shutdown Behavior tab.
-
From the list, select one of the following values:
-
stop
: When you initiate the shutdown, the instance stops. -
terminate
: When you initiate the shutdown, the instance stops and is terminated. -
restart
: When you initiate the shutdown, the instance stops, then automatically restarts.For more information, see About Instance Lifecycle > Termination.
-
-
Click Apply to validate.
(VPC only, optional) Modify the Source/Destination Check of the Instance
-
Click the Check Source and Destination tab.
-
Switch the button to
true
orfalse
:-
If set to
true
, source/destination check of network traffic is enabled. -
It set to
false
, source/destination check of network traffic is disabled.
-
(optional) Modify the Keypair Assigned to the Instance
-
Click the Keypair tab.
-
From the list, select the new keypair you want to assign to the instance.
-
Click Apply to validate.
When you modify a keypair with Cockpit or the APIs, the metadata of the instance is modified to reflect the new public key, but the replacement is still not effective in the operating system of the instance. To complete the replacement and effectively apply the new keypair, you need to perform other actions inside the instance.
For more information, see Modifying the Keypair of an Instance.
(optional) Modify User Data for the Instance
-
Click the User Data tab.
-
In the UserData fields, type the user data. For more information, see Configuring an Instance with User Data and OUTSCALE Tags.
Cockpit v1 then encodes this user data to Base64. The maximum size for the Base64-encoded user data is 500 kibibytes (KiB).
-
Click Apply to validate.
(optional) Modify the Instance Type
-
Click the Instance Type tab.
-
Specify the following attributes for your instance:
-
CPU: The processor generation.
-
Performance: The performance flag.
-
Highest Performance: Maximum compute capacity on all the vCPUs of the instance. This value is ideal for intensive compute applications that require stable performances during the instance lifecycle.
-
High Performance: High compute capacity on all the vCPUs of the instance. This value applies to most cases and offers varying performances over time.
-
Medium Performance: Performance with significant variability on all the vCPUs of the instance. This option does not guarantee consistent performance, but is ideal for machines with low CPU demand.
-
-
Core(s): The number of vCores, up to 78.
-
Memory (GiB): The amount of memory, up to 1039 GiB.
For more information about instance types, see Instance Types.
To function properly, Windows instances require at least a v3 processor generation, 2 vCores, and 4 GiB of memory.
-
-
Click Apply to validate.
Modifying a VM Attribute Using Cockpit v2-beta
Before you begin:
For more information, see Stopping and Starting Instances and About Instances > Instance Attributes. |
-
Click inside the VMs dashboard to make checkboxes appear.
-
Check the box of the VM whose attributes you want to update.
Multiselection is available.
The VM is selected and an action menu appears.
-
Hover over
Update VM.
The attributes available for modification appear.
(optional) Modify the Security Groups Associated with the VM
-
Click
Security Groups.
The UPDATE SECURITY GROUPS dialog box appears. -
Click in the field to make the list of security groups appear.
From the list, select the security group(s) you want to associate with the VM. -
To disassociate a security group from the VM, click
next to the name of the security group.
-
Click Update Security Group to validate.
(optional) Modify the VM Type
-
Click the
VM Type.
The UPDATE VM TYPE dialog box appears. -
Specify the following attributes for your instance:
-
CPU generation: The processor generation.
-
Performance: The performance flag.
-
Highest: Maximum compute capacity on all the cores of the VM. This option is ideal for intensive compute applications that require stable performances during the VM lifecycle.
-
High: High compute capacity on all the cores of the VM. This option offers small performance variability and applies to most cases.
-
Medium: Performance with significant variability on all the cores of the VM. This option does not guarantee consistent performance, but is ideal for machines with low CPU demand.
-
-
Core(s): The number of vCores, up to 78.
-
Memory (GiB): The amount of memory, up to 1039 GiB.
For more information about VM types, see Instance Types.
To function properly, Windows instances require at least a v3 processor generation, 2 vCores, and 4 GiB of memory.
-
-
Click Submit to validate.
(optional) Modify the Shutdown Behavior of the VM
-
Click the
Shutdown Behavior.
The UPDATE SHUTDOWN BEHAVIOR dialog box appears. -
From the list, select one of the following values:
-
Stop
: When you initiate the shutdown, the VM stops. -
Delete
: When you initiate the shutdown, the VM stops and is deleted. -
Restart
: When you initiate the shutdown, the VM stops, then automatically restarts.For more information, see About Instance Lifecycle > Termination.
-
-
Click Update Shutdown Behavior to validate.
Modifying a VM Attribute Using OSC CLI
Before you begin:
For more information, see Stopping and Starting Instances and About Instances > Instance Attributes. |
See the UpdateVm command sample in the documentation of the OUTSCALE API. |
Modifying an Instance Attribute Using AWS CLI
Before you begin:
For more information, see Stopping and Starting Instances and About Instances > Instance Attributes. |
To modify an instance attribute, use the modify-instance-attribute command following this syntax:
You can modify only one attribute at a time. |
$ aws ec2 modify-instance-attribute \
--profile YOUR_PROFILE \
--instance-id i-12345678 \
--attribute ATTRIBUTE_NAME \
--value ATTRIBUTE_VALUE \
--disable-api-termination \
--block-device-mappings VALUE \
--instance-type m1.large \
--user-data VALUE \
--instance-initiated-shutdown-behavior ATTRIBUTE_VALUE \
--groups sg-12345678 \
--source-dest-check \
[--ebs-optimized NOT_SPECIFIED] \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
instance-id
: The ID of the instance whose attribute you want to modify. -
(optional)
attribute
: The name of the attribute (userData
|rootDeviceName
|instanceType
|groupSet
|ebsOptimized
|sourceDestCheck
|blockDeviceMapping
|disableApiTermination
|instanceInitiatedShutdownBehavior
). -
(optional)
value
: The value of the attribute (only for the following attributes:userData
,disableApiTermination
, orinstanceInitiatedShutdownBehavior
). -
(optional)
disable-api-termination
: Iftrue
, you cannot terminate the instance, whatever the interface is. Iffalse
, you can. -
(optional)
block-device-mappings
: Information about BSU volumes attached to the instance. This attribute contains the following elements that you need to specify:-
(optional)
DeviceName
: The device name used to attach the volume to the instance. For more information, see About Volumes > Volumes Attachment and Device Names.To modify the
DeleteOnTermination
attribute, this element is required.
-
-
(optional)
Ebs
: Information about the volume attached to the instance. This element contains the following element that you need to specify:-
(optional)
DeleteOnTermination
: By default or if set totrue
, the volume is deleted when the instance is terminated. If set tofalse
, it is not.To modify the
block-device-mappings
attribute for several volumes at the same time, use the following syntax:'[{"DeviceName": "/dev/sda1", "Ebs": {"DeleteOnTermination": false}}, {"DeviceName": "/dev/sdb", "Ebs": {"DeleteOnTermination": false}}]'
-
-
(optional)
instance-type
: The type of instance (amount of vCores, memory, storage). For more information about instance types, see Instance Types.To function properly, Windows instances require at least a v3 processor generation, 2 vCores, and 4 GiB of memory.
-
(optional)
user-data
: New user data for the instance. For more information, see Configuring an Instance with User Data and OUTSCALE Tags.Existing user data is erased and replaced by the one you specify here.
AWS CLI then encodes this user data to Base64. The maximum size for the Base64-encoded user data is 500 kibibytes (KiB).
-
(optional)
instance-initiated-shutdown-behavior
: The behavior when you initiate the shutdown of the instance. By default or if set tostop
, the instance stops. If set toterminate
, the instance stops and is terminated. If set torestart
, the instance stops, then automatically restarts. -
(optional)
groups
: One or more security groups IDs for the instance. -
(optional)
source-dest-check|no-source-dest-check
: If set tosource-dest-check
, source/destination check of network traffic is enabled. If set tono-source-dest-check
, it is disabled.You can modify the
sourceDestCheck
attribute only if the instance is in a VPC. -
(optional)
ebs-optimized
: Whether the instance is BSU-optimized. -
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The specified attribute is modified.
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.