AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Edit-EC2InstanceAttribute-InstanceId <String>-Attribute <InstanceAttributeName>-BlockDeviceMapping <InstanceBlockDeviceMappingSpecification[]>-DisableApiStop <Boolean>-DisableApiTermination <Boolean>-EbsOptimized <Boolean>-EnaSupport <Boolean>-Group <String[]>-InstanceInitiatedShutdownBehavior <String>-InstanceType <String>-Kernel <String>-Ramdisk <String>-SourceDestCheck <Boolean>-SriovNetSupport <String>-UserData <String>-Value <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonEC2Config>
disableApiTermination
| instanceType
| kernel
| ramdisk
| instanceInitiatedShutdownBehavior
| blockDeviceMapping
| userData
| sourceDestCheck
| groupSet
| ebsOptimized
| sriovNetSupport
| enaSupport
| nvmeSupport
| disableApiStop
| enclaveOptions
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
DeleteOnTermination
attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination
, the default is true
and the volume is deleted when the instance is terminated.To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Update the block device mapping when launching an instance in the Amazon EC2 User Guide. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | BlockDeviceMappings |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot Instances. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
true
to enable enhanced networking with ENA for the instance.This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | GroupId, Groups |
Required? | True |
Position? | 1 |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
InvalidInstanceAttributeValue
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
true
, source/destination checks are enabled; otherwise, they are disabled. The default value is true
. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
simple
to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
kernel
, ramdisk
, userData
, disableApiTermination
, or instanceInitiatedShutdownBehavior
attribute. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
Edit-EC2InstanceAttribute -InstanceId i-12345678 -InstanceType m3.mediumThis example modifies the instance type of the specified instance.
Edit-EC2InstanceAttribute -InstanceId i-12345678 -SriovNetSupport "simple"This example enables enhanced networking for the specified instance, by specifying "simple" as the value of the single root I/O virtualization (SR-IOV) network support parameter, -SriovNetSupport..
Edit-EC2InstanceAttribute -InstanceId i-12345678 -Group @( "sg-12345678", "sg-45678901" )This example modifies the security groups for the specified instance. The instance must be in a VPC. You must specify the ID of each security group, not the name.
Edit-EC2InstanceAttribute -InstanceId i-12345678 -EbsOptimized $trueThis example enables EBS I/O optimization for the specified instance. This feature isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Edit-EC2InstanceAttribute -InstanceId i-12345678 -SourceDestCheck $trueThis example enables source/destination checking for the specified instance. For a NAT instance to perform NAT, the value must be 'false'.
Edit-EC2InstanceAttribute -InstanceId i-12345678 -DisableApiTermination $trueThis example disables termination for the specified instance.
Edit-EC2InstanceAttribute -InstanceId i-12345678 -InstanceInitiatedShutdownBehavior terminateThis example changes the specified instance so that it terminates when shutdown is initiated from the instance.
AWS Tools for PowerShell: 2.x.y.z