Get-VBROracleCloudSubnet
Short Description
Returns subnets in Oracle Cloud Infrastructure.
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Get-VBROracleCloudSubnet -Vcn <VBROracleCloudVcn> -Compartment <VBROracleCloudCompartment> [-Name <String[]>] [-AvailabilityDomain <VBROracleCloudAvailabilityDomain>] [<CommonParameters>] |
Detailed Description
This cmdlet returns an array of subnets that belong to the specified virtual cloud network (VCN) in Oracle Cloud Infrastructure.
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
AvailabilityDomain |
Specifies the availability domain. The cmdlet will return subnets that belong to this availability domain and regional subnets that serve all availability domains of the region. If you do not specify this parameter, the cmdlet will return subnets of all availability domains.
Note: The availability domain must belong to the same OCI account and region as the VCN that you specify in the
Accepts the |
False |
Named |
True (ByPropertyName) |
|
|
Compartment |
Specifies the compartment. The cmdlet will return subnets in this compartment.
Note: The compartment must belong to the same OCI account as the VCN that you specify in the
Accepts the |
True |
Named |
True (ByPropertyName) |
|
|
Name |
Specifies an array of names of subnets. The cmdlet will return subnets with these names. You can use wildcard characters in the names. |
|
False |
Named |
False |
|
Vcn |
Specifies the virtual cloud network (VCN). The cmdlet will return subnets of this VCN.
Note: The VCN must belong to the same OCI account as the compartment that you specify in the
Accepts the |
True |
Named |
True (ByPropertyName, ByValue) |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
The cmdlet returns the VBROracleCloudSubnet object that contains the subnet settings.
Examples
Example 1. Getting Subnet by Name
This example shows how to get a subnet by its name.
|
$account = Get-VBROracleCloudAccount -Name "My OCI Account" $region = Get-VBROracleCloudRegion -Account $account -Name "eu-frankfurt-1" $compartment = Get-VBROracleCloudCompartment -Account $account -Name "Restore" $vcn = Get-VBROracleCloudVcn -Region $region -Compartment $compartment -Name "Restore VCN" $subnet = Get-VBROracleCloudSubnet -Compartment $compartment -Vcn $vcn -Name "Restore Subnet" |
Perform the following steps:
- Run the
Get-VBROracleCloudAccountReturns Oracle Cloud Infrastructure accounts. cmdlet. Specify theNameparameter value. Save the result to the$accountvariable. - Run the
Get-VBROracleCloudRegionReturns Oracle Cloud Infrastructure regions that an account is subscribed to. cmdlet. Set the$accountvariable as theAccountparameter value. Specify theNameparameter value. Save the result to the$regionvariable. - Run the
Get-VBROracleCloudCompartmentReturns compartments in Oracle Cloud Infrastructure. cmdlet. Set the$accountvariable as theAccountparameter value. Specify theNameparameter value. Save the result to the$compartmentvariable. - Run the
Get-VBROracleCloudVcnReturns virtual cloud networks in Oracle Cloud Infrastructure. cmdlet. Specify the following settings:- Set the
$regionvariable as theRegionparameter value. - Set the
$compartmentvariable as theCompartmentparameter value. - Specify the
Nameparameter value.
Save the result to the
$vcnvariable. - Set the
- Run the
Get-VBROracleCloudSubnetcmdlet. Specify the following settings:- Set the
$compartmentvariable as theCompartmentparameter value. - Set the
$vcnvariable as theVcnparameter value. - Specify the
Nameparameter value.
Save the result to the
$subnetvariable to use it when you run theStart-VBRVMRestoreToOracleCloudStarts a restore session to Oracle Cloud Infrastructure. cmdlet. - Set the