3개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Have you tried using -Filter with attachment.instance-id - The ID of the instance the volume is attached to
Reference : https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2Volume.html
0
i tried this but I coudnt get anything
get-ec2volume -filter @{name='attachment.instance-id';values='{instance_id}'}
답변함 3년 전
0
This seems to work
Get-EC2Volume -Filter @{ Name = 'attachment.instance-id' Values = 'i-006741b1111111111' } | ` Format-Table -Property Attachments, AvailabilityZone, VolumeType, VolumeId
Attachments AvailabilityZone VolumeType VolumeId
----------- ---------------- ---------- --------
{i-006741b1111111111} us-east-1a standard vol-0109acf1111111111
{i-006741b1111111111} us-east-1a gp3 vol-07f563d2111111111
답변함 일 년 전
