Recupera os detalhes de todos os recursos filho RoutingIntent do VirtualHub.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent?api-version=2023-09-01
Parâmetros de URI
Nome |
Em |
Obrigatório |
Tipo |
Description |
resourceGroupName
|
path |
True
|
string
|
O nome do grupo de recursos do VirtualHub.
|
subscriptionId
|
path |
True
|
string
|
As credenciais de assinatura que identificam exclusivamente a assinatura do Microsoft Azure. A ID da assinatura faz parte do URI para cada chamada de serviço.
|
virtualHubName
|
path |
True
|
string
|
O nome do VirtualHub.
|
api-version
|
query |
True
|
string
|
Versão de API do cliente.
|
Respostas
Nome |
Tipo |
Description |
200 OK
|
ListRoutingIntentResult
|
Solicitação bem-sucedida. Retorna os detalhes de todos os recursos RoutingIntent para o VirtualHub.
|
Other Status Codes
|
CloudError
|
Resposta de erro que descreve por que a operação falhou.
|
Segurança
azure_auth
Fluxo OAuth2 do Azure Active Directory.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nome |
Description |
user_impersonation
|
representar sua conta de usuário
|
Exemplos
RoutingIntentList
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routingIntent?api-version=2023-09-01
/**
* Samples for RoutingIntent List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/RoutingIntentList.json
*/
/**
* Sample code: RoutingIntentList.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void routingIntentList(com.azure.resourcemanager.AzureResourceManager azure) {
azure.networks().manager().serviceClient().getRoutingIntents().list("rg1", "virtualHub1",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.network import NetworkManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-network
# USAGE
python routing_intent_list.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = NetworkManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.routing_intent.list(
resource_group_name="rg1",
virtual_hub_name="virtualHub1",
)
for item in response:
print(item)
# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/RoutingIntentList.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armnetwork_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/RoutingIntentList.json
func ExampleRoutingIntentClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetwork.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRoutingIntentClient().NewListPager("rg1", "virtualHub1", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.ListRoutingIntentResult = armnetwork.ListRoutingIntentResult{
// Value: []*armnetwork.RoutingIntent{
// {
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routingIntent/Intent1"),
// Name: to.Ptr("Intent1"),
// Type: to.Ptr("Microsoft.Network/virtualHubs/routingIntent"),
// Etag: to.Ptr("w/\\00000000-0000-0000-0000-000000000000\\"),
// Properties: &armnetwork.RoutingIntentProperties{
// ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
// RoutingPolicies: []*armnetwork.RoutingPolicy{
// {
// Name: to.Ptr("InternetTraffic"),
// Destinations: []*string{
// to.Ptr("Internet")},
// NextHop: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1"),
// },
// {
// Name: to.Ptr("PrivateTrafficPolicy"),
// Destinations: []*string{
// to.Ptr("PrivateTraffic")},
// NextHop: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1"),
// }},
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { NetworkManagementClient } = require("@azure/arm-network");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Retrieves the details of all RoutingIntent child resources of the VirtualHub.
*
* @summary Retrieves the details of all RoutingIntent child resources of the VirtualHub.
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/RoutingIntentList.json
*/
async function routingIntentList() {
const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "rg1";
const virtualHubName = "virtualHub1";
const credential = new DefaultAzureCredential();
const client = new NetworkManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.routingIntentOperations.list(resourceGroupName, virtualHubName)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Network;
using Azure.ResourceManager.Network.Models;
// Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/RoutingIntentList.json
// this example is just showing the usage of "RoutingIntent_List" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this VirtualHubResource created on azure
// for more information of creating VirtualHubResource, please refer to the document of VirtualHubResource
string subscriptionId = "subid";
string resourceGroupName = "rg1";
string virtualHubName = "virtualHub1";
ResourceIdentifier virtualHubResourceId = VirtualHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualHubName);
VirtualHubResource virtualHub = client.GetVirtualHubResource(virtualHubResourceId);
// get the collection of this RoutingIntentResource
RoutingIntentCollection collection = virtualHub.GetRoutingIntents();
// invoke the operation and iterate over the result
await foreach (RoutingIntentResource item in collection.GetAllAsync())
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
RoutingIntentData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"value": [
{
"name": "Intent1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routingIntent/Intent1",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"properties": {
"provisioningState": "Succeeded",
"routingPolicies": [
{
"name": "InternetTraffic",
"destinations": [
"Internet"
],
"nextHop": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1"
},
{
"name": "PrivateTrafficPolicy",
"destinations": [
"PrivateTraffic"
],
"nextHop": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1"
}
]
},
"type": "Microsoft.Network/virtualHubs/routingIntent"
}
]
}
Definições
Nome |
Description |
CloudError
|
Uma resposta de erro do serviço.
|
CloudErrorBody
|
Uma resposta de erro do serviço.
|
ListRoutingIntentResult
|
Lista do resultado da intenção de roteamento e uma URL nextLink para obter o próximo conjunto de resultados.
|
ProvisioningState
|
O estado de provisionamento atual.
|
RoutingIntent
|
O recurso filho de intenção de roteamento de um hub virtual.
|
RoutingPolicy
|
O objeto de política de roteamento usado em um recurso RoutingIntent.
|
CloudError
Uma resposta de erro do serviço.
CloudErrorBody
Uma resposta de erro do serviço.
Nome |
Tipo |
Description |
code
|
string
|
Um identificador para o erro. Os códigos são invariáveis e devem ser consumidos programaticamente.
|
details
|
CloudErrorBody[]
|
Uma lista de detalhes adicionais sobre o erro.
|
message
|
string
|
Uma mensagem que descreve o erro, destinada a ser adequada para exibição em uma interface do usuário.
|
target
|
string
|
O destino do erro específico. Por exemplo, o nome da propriedade em erro.
|
ListRoutingIntentResult
Lista do resultado da intenção de roteamento e uma URL nextLink para obter o próximo conjunto de resultados.
Nome |
Tipo |
Description |
nextLink
|
string
|
URL para obter o próximo conjunto de resultados da lista de operações, se houver algum.
|
value
|
RoutingIntent[]
|
Lista de recursos RoutingIntent.
|
ProvisioningState
O estado de provisionamento atual.
Nome |
Tipo |
Description |
Deleting
|
string
|
|
Failed
|
string
|
|
Succeeded
|
string
|
|
Updating
|
string
|
|
RoutingIntent
O recurso filho de intenção de roteamento de um hub virtual.
Nome |
Tipo |
Description |
etag
|
string
|
Uma cadeia de caracteres somente leitura exclusiva que é alterada sempre que o recurso é atualizado.
|
id
|
string
|
ID do recurso.
|
name
|
string
|
O nome do recurso que é exclusivo em um grupo de recursos. Esse nome pode ser usado para acessar o recurso.
|
properties.provisioningState
|
ProvisioningState
|
O estado de provisionamento do recurso RoutingIntent.
|
properties.routingPolicies
|
RoutingPolicy[]
|
Lista de políticas de roteamento.
|
type
|
string
|
Tipo de recurso.
|
RoutingPolicy
O objeto de política de roteamento usado em um recurso RoutingIntent.
Nome |
Tipo |
Description |
destinations
|
string[]
|
Lista de todos os destinos aos quais essa política de roteamento é aplicável (por exemplo: Internet, PrivateTraffic).
|
name
|
string
|
O nome exclusivo para a política de roteamento.
|
nextHop
|
string
|
A ID do recurso do próximo salto à qual essa política de roteamento é aplicável.
|