Get-VBRAmazonEC2Subnet
Short Description
Returns an array of Amazon VPC subnets.
Platform: VMware, Hyper-V
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
This cmdlet provides the following parameter sets:
-
WithNameGet-VBRAmazonEC2Subnet -VPC <VBRAmazonEC2VPC> -Name <String> [<CommonParameters>]
-
WithoutNameGet-VBRAmazonEC2Subnet -VPC <VBRAmazonEC2VPC> [-AvailabilityZone <String>] [<CommonParameters>]
Detailed Description
This cmdlet returns an array of subnets that are available in the selected Amazon VPC.
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
AvailabilityZone |
Specifies the Availability Zone. The cmdlet will return the Amazon VPC subnet that resides in the specified Availability Zone. |
|
False |
Named |
False |
|
Name |
Specifies the IP range. The cmdlet will return the Amazon VPC subnet with this IP range. |
|
True |
Named |
False |
|
VPC |
Specifies the Amazon VPC.
Accepts the |
True |
Named |
False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
Examples
Getting Amazon VPC Subnet by Availability Zone
This example shows how to get the Amazon VPC subnet by geographic location and the associated Availability Zone.
|
$account = Get-VBRAmazonAccount -Id "936edf7c-7cf3-4dbd-9895-c7485ef4bb2c" $region = Get-VBRAmazonEC2Region -Account $account -RegionType Global -Name "ap-northeast-1" $vpc = Get-VBRAmazonEC2VPC -Region $region Get-VBRAmazonEC2Subnet -VPC $vpc -AvailabilityZone "eu-west-1a" |
Perform the following steps:
- Run the
Get-VBRAmazonAccountReturns AWS credentials records. cmdlet. Specify theIdparameter value. Save the result to the$accountvariable. - Run the
Get-VBRAmazonEC2RegionReturns AWS Regions and datacenters. cmdlet. Set the$accountvariable as theAccountparameter value. Set theGlobalvalue as theRegionTypeparameter value. Specify theNameparameter value. Save the result to the$regionvariable. - Run the
Get-VBRAmazonEC2VPCReturns an Amazon VPC. cmdlet. Set the$regionvariable as theRegionparameter value. Save the result to the$vpcvariable. - Run the
Get-VBRAmazonEC2Subnetcmdlet. Set the$vpcvariable as theVCPparameter value. Specify theAvailabilityZoneparameter value.
Related Commands
Get-VBRAmazonAccountReturns AWS credentials records.Get-VBRAmazonEC2RegionReturns AWS Regions and datacenters.Get-VBRAmazonEC2VPCReturns an Amazon VPC.