EC2: Edit-EC2InstanceAttribute Cmdlet | AWS Tools for PowerShell (original) (raw)
Example 1
Edit-EC2InstanceAttribute -InstanceId i-12345678 -InstanceType m3.medium
This example modifies the instance type of the specified instance.
Example 2
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..
Example 3
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.
Example 4
Edit-EC2InstanceAttribute -InstanceId i-12345678 -EbsOptimized $true
This 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.
Example 5
Edit-EC2InstanceAttribute -InstanceId i-12345678 -SourceDestCheck $true
This example enables source/destination checking for the specified instance. For a NAT instance to perform NAT, the value must be 'false'.
Example 6
Edit-EC2InstanceAttribute -InstanceId i-12345678 -DisableApiTermination $true
This example disables termination for the specified instance.
Example 7
Edit-EC2InstanceAttribute -InstanceId i-12345678 -InstanceInitiatedShutdownBehavior terminate
This example changes the specified instance so that it terminates when shutdown is initiated from the instance.