Abonelik altındaki Ağ Denemesi Profillerinin listesini alır
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Network/NetworkExperimentProfiles?api-version=2019-11-01
URI Parametreleri
Name |
İçinde |
Gerekli |
Tür |
Description |
subscriptionId
|
path |
True
|
string
|
Microsoft Azure aboneliğini benzersiz olarak tanımlayan abonelik kimlik bilgileri. Abonelik kimliği, her hizmet çağrısı için URI'nin bir parçasını oluşturur.
|
api-version
|
query |
True
|
string
|
İstemci API sürümü.
|
Yanıtlar
Name |
Tür |
Description |
200 OK
|
ProfileList
|
başarılı işlem
|
Other Status Codes
|
ErrorResponse
|
İşlemin neden başarısız olduğunu açıklayan hata yanıtı.
|
Güvenlik
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
kullanıcı hesabınızın kimliğine bürünme
|
Örnekler
List NetworkExperiment Profiles in a Resource Group
Sample Request
GET https://management.azure.com/subscriptions/subid/providers/Microsoft.Network/NetworkExperimentProfiles?api-version=2019-11-01
/** Samples for NetworkExperimentProfiles ListByResourceGroup. */
public final class Main {
/*
* x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentListProfiles.json
*/
/**
* Sample code: List NetworkExperiment Profiles in a Resource Group.
*
* @param manager Entry point to FrontDoorManager.
*/
public static void listNetworkExperimentProfilesInAResourceGroup(
com.azure.resourcemanager.frontdoor.FrontDoorManager manager) {
manager.networkExperimentProfiles().listByResourceGroup("MyResourceGroup", 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.frontdoor import FrontDoorManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-frontdoor
# USAGE
python network_experiment_list_profiles.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 = FrontDoorManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.network_experiment_profiles.list()
for item in response:
print(item)
# x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentListProfiles.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 armfrontdoor_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b54ffc9278eff071455b1dbb4ad2e772afce885d/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentListProfiles.json
func ExampleNetworkExperimentProfilesClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armfrontdoor.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewNetworkExperimentProfilesClient().NewListPager(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.ProfileList = armfrontdoor.ProfileList{
// Value: []*armfrontdoor.Profile{
// {
// Name: to.Ptr("MyProfile"),
// Type: to.Ptr("Microsoft.Network/NetworkExperimentprofiles"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/"),
// Location: to.Ptr("WestUs"),
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// Properties: &armfrontdoor.ProfileProperties{
// EnabledState: to.Ptr(armfrontdoor.StateEnabled),
// ResourceState: to.Ptr(armfrontdoor.NetworkExperimentResourceStateCreating),
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { FrontDoorManagementClient } = require("@azure/arm-frontdoor");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets a list of Network Experiment Profiles under a subscription
*
* @summary Gets a list of Network Experiment Profiles under a subscription
* x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentListProfiles.json
*/
async function listNetworkExperimentProfilesInAResourceGroup() {
const subscriptionId = process.env["FRONTDOOR_SUBSCRIPTION_ID"] || "subid";
const credential = new DefaultAzureCredential();
const client = new FrontDoorManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.networkExperimentProfiles.list()) {
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.FrontDoor;
using Azure.ResourceManager.FrontDoor.Models;
using Azure.ResourceManager.Resources;
// Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentListProfiles.json
// this example is just showing the usage of "NetworkExperimentProfiles_ListByResourceGroup" 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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "subid";
string resourceGroupName = "MyResourceGroup";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this FrontDoorNetworkExperimentProfileResource
FrontDoorNetworkExperimentProfileCollection collection = resourceGroupResource.GetFrontDoorNetworkExperimentProfiles();
// invoke the operation and iterate over the result
await foreach (FrontDoorNetworkExperimentProfileResource 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
FrontDoorNetworkExperimentProfileData 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": [
{
"id": "/subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Network/NetworkExperimentProfiles/",
"name": "MyProfile",
"type": "Microsoft.Network/NetworkExperimentprofiles",
"tags": {
"key1": "value1",
"key2": "value2"
},
"location": "WestUs",
"properties": {
"enabledState": "Enabled",
"resourceState": "Creating"
}
}
]
}
Tanımlar
Name |
Description |
ErrorResponse
|
Hata yanıtı Front Door hizmetinin gelen isteği işleyemediğini gösterir. Nedeni hata iletisinde verilmiştir.
|
NetworkExperimentResourceState
|
Sunucu tarafı kaynak durumunu tanımlar
|
Profile
|
Ağ Denemesi Profili ve Deneme listeleri tanımlar
|
ProfileList
|
Profillerin listesini tanımlar. Profil nesnelerinin listesini ve bir sonraki sonuç kümesini almak için bir URL bağlantısı içerir.
|
state
|
Denemenin durumu
|
ErrorResponse
Hata yanıtı Front Door hizmetinin gelen isteği işleyemediğini gösterir. Nedeni hata iletisinde verilmiştir.
Name |
Tür |
Description |
code
|
string
|
Hata kodu.
|
message
|
string
|
İşlemin neden başarısız olduğunu belirten hata iletisi.
|
NetworkExperimentResourceState
Sunucu tarafı kaynak durumunu tanımlar
Name |
Tür |
Description |
Creating
|
string
|
|
Deleting
|
string
|
|
Disabled
|
string
|
|
Disabling
|
string
|
|
Enabled
|
string
|
|
Enabling
|
string
|
|
Profile
Ağ Denemesi Profili ve Deneme listeleri tanımlar
Name |
Tür |
Description |
etag
|
string
|
Kaynak her güncelleştirildiğinde değişen benzersiz bir salt okunur dize alır.
|
id
|
string
|
Kaynak Kimliği.
|
location
|
string
|
Kaynak konumu.
|
name
|
string
|
Profilin adı
|
properties.enabledState
|
state
|
Denemenin durumu
|
properties.resourceState
|
NetworkExperimentResourceState
|
Kaynak durumu.
|
tags
|
object
|
Kaynak etiketleri.
|
type
|
string
|
Kaynak türü.
|
ProfileList
Profillerin listesini tanımlar. Profil nesnelerinin listesini ve bir sonraki sonuç kümesini almak için bir URL bağlantısı içerir.
Name |
Tür |
Description |
nextLink
|
string
|
Varsa bir sonraki Profil nesneleri kümesini almak için URL.
|
value
|
Profile[]
|
Kaynak grubu içindeki Profillerin listesi.
|
state
Denemenin durumu
Name |
Tür |
Description |
Disabled
|
string
|
|
Enabled
|
string
|
|