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[]>-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>
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 Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | BlockDeviceMappings |
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
means that checking is enabled, and false
means that checking is disabled. This value must be false
for a NAT instance to perform NAT. 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 (ByPropertyName) |
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)
If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials. Note that the encrypted credential file is not supported on all platforms. It will be skipped when searching for profiles on Windows Nano Server, Mac, and Linux platforms.
If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.
As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfileName, StoredCredentials |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SecretAccessKey, SK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
The endpoint to make the call against.
Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
PS C:\> Edit-EC2InstanceAttribute -InstanceId i-12345678 -InstanceType m3.mediumThis example modifies the instance type of the specified instance.
PS C:\> 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..
PS C:\> 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.
PS C:\> 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.
PS C:\> 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'.
PS C:\> Edit-EC2InstanceAttribute -InstanceId i-12345678 -DisableApiTermination $trueThis example disables termination for the specified instance.
PS C:\> 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