내용으로 건너뛰기

powershell get-ec2volume for instance

0

how do I use get-ec2volume for an instanceid?

질문됨 3년 전1.1천회 조회
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

AWS
전문가
답변함 3년 전
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
AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.