I have this powershell script I want to add a new drive to an existing instance
Param (
[string][Parameter(Mandatory) = $True] $InstanceId
[string][Parameter(Mandatory = $True)] $driveletter,
[int][Parameter(Mandatory = $True)] $size,
[string][Parameter(Mandatory) = $True)] $az,
[string][Parameter(Mandatory = $True)] $Region,
[string][Parameter(Mandatory) = $True] $volumetype
New-ec2volume -AvailabilityZone $az -VolumeType $volumetype -size $size -Region $Region
Add-EC2Volume -InstanceId $InstanceId -volumeId ???? -Device ????
I am unsure how to get the volumeId after the volume creation. Also the Device ID what should it be?