Get Azure VNets
You can perform this workflow to retrieve the network extended information.
MAke sure that you've the Azure subscription ID. You can easily obtain the ID from the Azure portal. |
Choose the workflow to use based on the type of Cloud Volumes ONTAP deployment:
Get Azure VNets for single node
You can perform this workflow to retrieve the Azure VNets for a single node working environment.
1. Get the VNets
HTTP method | Path |
---|---|
GET |
/occm/api/azure/vsa/metadata/vnets |
- curl example
curl --location --request GET 'https://cloudmanager.cloud.netapp.com/occm/api/azure/vsa/metadata/vnets?region=<REGION>&subscriptionId=<SUBSCRIPTION_ID>' --header 'x-agent-id: <AGENT_ID>' --header 'Authorization: Bearer <ACCESS_TOKEN>' --header 'Content-Type: application/json'
- Input
-
Query parameters:
-
<REGION>
region
string -
<SUBSCRIPTION_ID>
subscriptionId
string -
(Optional)
cloudProviderAccountId
string
-
- Output
-
The JSON output example includes the list of Azure storage account types.
- JSON output example
{
"virtualNetworks": [
{
"name": "Vnet1",
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet1",
"cidrs": [
{
"cidr": "10.0.0.0/16",
"subnets": [
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet1/subnets/Subnet1",
"cidr": "10.0.0.0/24",
"name": "Subnet1",
"availableIps": 250,
"minimumRequiredIps": 6
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet1/subnets/Subnet2",
"cidr": "10.0.1.0/24",
"name": "Subnet2",
"availableIps": 251,
"minimumRequiredIps": 6
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet1/subnets/ProxySubnet",
"cidr": "10.0.2.0/24",
"name": "ProxySubnet",
"availableIps": 245,
"minimumRequiredIps": 6
}
]
}
],
"resourceGroup": "occm_group_eastus2",
"tags": []
},
{
"name": "Vnet2",
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet2",
"cidrs": [
{
"cidr": "10.1.0.0/16",
"subnets": [
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet2/subnets/Subnet1",
"cidr": "10.1.0.0/24",
"name": "Subnet1",
"availableIps": 251,
"minimumRequiredIps": 6
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet2/subnets/Subnet2",
"cidr": "10.1.1.0/24",
"name": "Subnet2",
"availableIps": 251,
"minimumRequiredIps": 6
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet2/subnets/ProxySubnet",
"cidr": "10.1.2.0/24",
"name": "ProxySubnet",
"availableIps": 251,
"minimumRequiredIps": 6
}
]
}
],
"resourceGroup": "occm_group_eastus2",
"tags": []
}
],
"securityGroups": [
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/networkSecurityGroups/OCCM-SG-467",
"name": "OCCM-SG-467",
"resourceGroup": "occm_group_eastus2"
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/networkSecurityGroups/OCCM-SG-491",
"name": "OCCM-SG-491",
"resourceGroup": "occm_group_eastus2"
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/networkSecurityGroups/OCCM-SG-589",
"name": "OCCM-SG-589",
"resourceGroup": "occm_group_eastus2"
}
]
}
Get Azure VNets for high availability pair
You can perform this workflow to retrieve the Azure network extended information for an HA working environment.
1. Get the VNets
HTTP method | Path |
---|---|
GET |
/occm/api/azure/ha/metadata/vnets |
- curl example
curl --location --request GET 'https://cloudmanager.cloud.netapp.com/occm/api/azure/ha/metadata/vnets?region=<REGION>&subscriptionId=<SUBSCRIPTION_ID>' --header 'x-agent-id: <AGENT_ID>' --header 'Authorization: Bearer <ACCESS_TOKEN>' --header 'Content-Type: application/json'
- Input
-
Query parameters:
-
<REGION>
region
string -
<SUBSCRIPTION_ID>
subscriptionId
string -
(Optional)
cloudProviderAccountId
string
-
- Output
-
The JSON output example includes the list of Azure storage account types.
- JSON output example
{
"virtualNetworks": [
{
"name": "Vnet1",
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet1",
"cidrs": [
{
"cidr": "10.0.0.0/16",
"subnets": [
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet1/subnets/Subnet1",
"cidr": "10.0.0.0/24",
"name": "Subnet1",
"availableIps": 250,
"minimumRequiredIps": 6
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet1/subnets/Subnet2",
"cidr": "10.0.1.0/24",
"name": "Subnet2",
"availableIps": 251,
"minimumRequiredIps": 6
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet1/subnets/ProxySubnet",
"cidr": "10.0.2.0/24",
"name": "ProxySubnet",
"availableIps": 245,
"minimumRequiredIps": 6
}
]
}
],
"resourceGroup": "occm_group_eastus2",
"tags": []
},
{
"name": "Vnet2",
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet2",
"cidrs": [
{
"cidr": "10.1.0.0/16",
"subnets": [
{
"id": "/subscriptions/dxxxxxxxx000000000000008/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet2/subnets/Subnet1",
"cidr": "10.1.0.0/24",
"name": "Subnet1",
"availableIps": 251,
"minimumRequiredIps": 6
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet2/subnets/Subnet2",
"cidr": "10.1.1.0/24",
"name": "Subnet2",
"availableIps": 251,
"minimumRequiredIps": 6
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/virtualNetworks/Vnet2/subnets/ProxySubnet",
"cidr": "10.1.2.0/24",
"name": "ProxySubnet",
"availableIps": 251,
"minimumRequiredIps": 6
}
]
}
],
"resourceGroup": "occm_group_eastus2",
"tags": []
}
],
"securityGroups": [
{
"id": "/subscriptions/dxxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/networkSecurityGroups/OCCM-SG-467",
"name": "OCCM-SG-467",
"resourceGroup": "occm_group_eastus2"
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/networkSecurityGroups/OCCM-SG-491",
"name": "OCCM-SG-491",
"resourceGroup": "occm_group_eastus2"
},
{
"id": "/subscriptions/xxxxxxxx00000000000000/resourceGroups/occm_group_eastus2/providers/Microsoft.Network/networkSecurityGroups/OCCM-SG-589",
"name": "OCCM-SG-589",
"resourceGroup": "occm_group_eastus2"
}
]
}