AWS AWSEC2 documentation change
Summary
Updated CLI command syntax, added PowerShell examples, and restructured output examples for managed instance identification. Changed section headers and improved filtering instructions.
Security assessment
Changes focus on improving command syntax clarity and adding PowerShell equivalents. No security vulnerabilities or security feature additions are mentioned.
Diff
diff --git a/AWSEC2/latest/UserGuide/amazon-ec2-managed-instances.md b/AWSEC2/latest/UserGuide/amazon-ec2-managed-instances.md index 717bb329c..02142bfa2 100644 --- a//AWSEC2/latest/UserGuide/amazon-ec2-managed-instances.md +++ b//AWSEC2/latest/UserGuide/amazon-ec2-managed-instances.md @@ -70 +70,3 @@ Use the [describe-instances](https://awscli.amazonaws.com/v2/documentation/api/l - aws ec2 describe-instances --instance-ids i-0123456789example + aws ec2 describe-instances \ + --instance-ids i-1234567890abcdef0 \ + --query Reservations[].Instances[].Operator @@ -72 +74 @@ Use the [describe-instances](https://awscli.amazonaws.com/v2/documentation/api/l -The following is example output. If `Managed` is `true`, the instance is a managed instance and the `Principal` is returned. The principal is the service provider that manages the instance. For example, a value of `eks.amazonaws.com` identifies Amazon EKS as the service provider. +The following is example output. If `Managed` is `true`, the instance is a managed instance and a `Principal` is included. The principal is the service provider that manages the instance. For example, a value of `eks.amazonaws.com` identifies Amazon EKS as the service provider. @@ -74,0 +77 @@ The following is example output. If `Managed` is `true`, the instance is a manag + [ @@ -76,6 +78,0 @@ The following is example output. If `Managed` is `true`, the instance is a manag - "Reservations": [{ - "ReservationId": "r-1234567890example", - "OwnerId": "1111111111", - "RequesterId": "222222222222", - ... - **"Operator":{ @@ -83,6 +80 @@ The following is example output. If `Managed` is `true`, the instance is a manag - "Principal": "eks.amazonaws.com"** - }, - "InstanceId": "i-1234567890example", - ... - }] - }] + "Principal": "eks.amazonaws.com" @@ -89,0 +82 @@ The following is example output. If `Managed` is `true`, the instance is a manag + ] @@ -91 +84 @@ The following is example output. If `Managed` is `true`, the instance is a manag -###### To filter to managed instances +###### To find your managed instances @@ -93 +86 @@ The following is example output. If `Managed` is `true`, the instance is a manag -Use the [describe-instances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.html) command and specify the `operator.managed` filter with a value of `true`. +Use the [describe-instances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.html) command and specify the `operator.managed` filter with a value of `true`. The `--query` option displays only the IDs of the managed instances. @@ -96 +89,27 @@ Use the [describe-instances](https://awscli.amazonaws.com/v2/documentation/api/l - aws ec2 describe-instances --filters "Name=operator.managed,Values=true" + aws ec2 describe-instances \ + --filters "Name=operator.managed,Values=true" \ + --query Reservations[*].Instances[].InstanceId + +PowerShell + + +###### To identify a managed instance + +Use the following [Get-EC2Instance](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2Instance.html) cmdlet. + + + (Get-EC2Instance -InstanceId i-00a7d9ec76a46a49f).Instances.Operator + +The following is example output. + + + Managed Principal + ------- --------- + True eks.amazonaws.com + +###### To find your managed instances + +Use the following [Get-EC2Instance](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2Instance.html) cmdlet. It displays only the IDs of the managed instances. + + + (Get-EC2Instance -Filter @{Name="operator.managed"; Values="true"}).Instances.InstanceId