Obtém o mapa de calor mais recente para o perfil do Gerenciador de Tráfego.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/default?api-version=2022-04-01
Com parâmetros opcionais:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/default?topLeft={topLeft}&botRight={botRight}&api-version=2022-04-01
Parâmetros de URI
Nome |
Em |
Obrigatório |
Tipo |
Description |
heatMapType
|
path |
True
|
HeatMapType
|
O tipo de HeatMap para o perfil do Gerenciador de Tráfego.
|
profileName
|
path |
True
|
string
|
O nome do perfil do Gerenciador de Tráfego.
|
resourceGroupName
|
path |
True
|
string
|
O nome do grupo de recursos. O nome diferencia maiúsculas de minúsculas.
|
subscriptionId
|
path |
True
|
string
|
Obtém 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.
|
api-version
|
query |
True
|
string
|
Versão da API do cliente.
|
botRight
|
query |
|
number[]
|
O par latitude inferior direita, longitude do visor retangular para consulta.
|
topLeft
|
query |
|
number[]
|
O par de latitude superior esquerda, longitude do visor retangular para consulta.
|
Respostas
Nome |
Tipo |
Description |
200 OK
|
HeatMapModel
|
O mapa de calor do Gerenciador de Tráfego.
|
Other Status Codes
|
CloudError
|
Resposta padrão. Ele será desserializado de acordo com a definição de Erro.
|
Segurança
azure_auth
Fluxo do OAuth2 do Azure Active Directory
Tipo:
oauth2
Flow:
implicit
URL de Autorização:
https://login.microsoftonline.com/common/oauth2/authorize
Escopos
Nome |
Description |
user_impersonation
|
representar sua conta de usuário
|
Exemplos
HeatMap-GET
Solicitação de exemplo
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficmanagerprofiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/default?api-version=2022-04-01
/**
* Samples for HeatMap Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET.json
*/
/**
* Sample code: HeatMap-GET.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void heatMapGET(com.azure.resourcemanager.AzureResourceManager azure) {
azure.trafficManagerProfiles().manager().serviceClient().getHeatMaps().getWithResponse(
"azuresdkfornetautoresttrafficmanager1323", "azuresdkfornetautoresttrafficmanager3880", null, null,
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.trafficmanager import TrafficManagerManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-trafficmanager
# USAGE
python heat_map_get.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 = TrafficManagerManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)
response = client.heat_map.get(
resource_group_name="azuresdkfornetautoresttrafficmanager1323",
profile_name="azuresdkfornetautoresttrafficmanager3880",
)
print(response)
# x-ms-original-file: specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET.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 armtrafficmanager_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/trafficmanager/armtrafficmanager"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET.json
func ExampleHeatMapClient_Get_heatMapGet() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armtrafficmanager.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewHeatMapClient().Get(ctx, "azuresdkfornetautoresttrafficmanager1323", "azuresdkfornetautoresttrafficmanager3880", &armtrafficmanager.HeatMapClientGetOptions{TopLeft: []float64{},
BotRight: []float64{},
})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.HeatMapModel = armtrafficmanager.HeatMapModel{
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Network/trafficManagerProfiles/heatMaps/latencyVolumeByLocation"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/latencyVolumeByLocation"),
// Properties: &armtrafficmanager.HeatMapProperties{
// EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-22T12:50:00.000Z"); return t}()),
// Endpoints: []*armtrafficmanager.HeatMapEndpoint{
// {
// EndpointID: to.Ptr[int32](1),
// ResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/externalEndpoints/azuresdkfornetautoresttrafficmanager3880"),
// },
// {
// EndpointID: to.Ptr[int32](2),
// ResourceID: to.Ptr("/subscriptions/562d4115-c01e-4m67-9bbd-c11c2d58ad73/resourceGroups/azuresdkfornetautoresttrafficmanager1300/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3885/externalEndpoints/azuresdkfornetautoresttrafficmanager3881"),
// }},
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T12:00:00.000Z"); return t}()),
// TrafficFlows: []*armtrafficmanager.TrafficFlow{
// {
// Latitude: to.Ptr[float64](99.99),
// Longitude: to.Ptr[float64](0),
// QueryExperiences: []*armtrafficmanager.QueryExperience{
// {
// EndpointID: to.Ptr[int32](1),
// Latency: to.Ptr[float64](99.222),
// QueryCount: to.Ptr[int32](1000000),
// },
// {
// EndpointID: to.Ptr[int32](2),
// Latency: to.Ptr[float64](1.222),
// QueryCount: to.Ptr[int32](1),
// }},
// SourceIP: to.Ptr("1.1.1.1"),
// },
// {
// Latitude: to.Ptr[float64](-99.99),
// Longitude: to.Ptr[float64](1),
// QueryExperiences: []*armtrafficmanager.QueryExperience{
// {
// EndpointID: to.Ptr[int32](1),
// Latency: to.Ptr[float64](96.222),
// QueryCount: to.Ptr[int32](100),
// },
// {
// EndpointID: to.Ptr[int32](2),
// Latency: to.Ptr[float64](4.222),
// QueryCount: to.Ptr[int32](500),
// }},
// SourceIP: to.Ptr("2.255.1.1"),
// }},
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { TrafficManagerManagementClient } = require("@azure/arm-trafficmanager");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets latest heatmap for Traffic Manager profile.
*
* @summary Gets latest heatmap for Traffic Manager profile.
* x-ms-original-file: specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET.json
*/
async function heatMapGet() {
const subscriptionId = process.env["TRAFFICMANAGER_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName =
process.env["TRAFFICMANAGER_RESOURCE_GROUP"] || "azuresdkfornetautoresttrafficmanager1323";
const profileName = "azuresdkfornetautoresttrafficmanager3880";
const credential = new DefaultAzureCredential();
const client = new TrafficManagerManagementClient(credential, subscriptionId);
const result = await client.heatMap.get(resourceGroupName, profileName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.TrafficManager.Models;
using Azure.ResourceManager.TrafficManager;
// Generated from example definition: specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET.json
// this example is just showing the usage of "HeatMap_Get" 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 TrafficManagerHeatMapResource created on azure
// for more information of creating TrafficManagerHeatMapResource, please refer to the document of TrafficManagerHeatMapResource
string subscriptionId = "{subscription-id}";
string resourceGroupName = "azuresdkfornetautoresttrafficmanager1323";
string profileName = "azuresdkfornetautoresttrafficmanager3880";
TrafficManagerHeatMapType heatMapType = TrafficManagerHeatMapType.Default;
ResourceIdentifier trafficManagerHeatMapResourceId = TrafficManagerHeatMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, profileName, heatMapType);
TrafficManagerHeatMapResource trafficManagerHeatMap = client.GetTrafficManagerHeatMapResource(trafficManagerHeatMapResourceId);
// invoke the operation
TrafficManagerHeatMapResource result = await trafficManagerHeatMap.GetAsync();
// the variable result 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
TrafficManagerHeatMapData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Resposta de exemplo
{
"id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/latencyVolumeByLocation",
"name": "default",
"type": "Microsoft.Network/trafficManagerProfiles/heatMaps/latencyVolumeByLocation",
"properties": {
"startTime": "2017-08-15T12:00:00Z",
"endTime": "2017-08-22T12:50:00Z",
"endpoints": [
{
"endpointId": 1,
"resourceId": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/externalEndpoints/azuresdkfornetautoresttrafficmanager3880"
},
{
"endpointId": 2,
"resourceId": "/subscriptions/562d4115-c01e-4m67-9bbd-c11c2d58ad73/resourceGroups/azuresdkfornetautoresttrafficmanager1300/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3885/externalEndpoints/azuresdkfornetautoresttrafficmanager3881"
}
],
"trafficFlows": [
{
"latitude": 99.99,
"longitude": 0,
"sourceIp": "1.1.1.1",
"queryExperiences": [
{
"endpointId": 1,
"latency": 99.222,
"queryCount": 1000000
},
{
"endpointId": 2,
"latency": 1.222,
"queryCount": 1
}
]
},
{
"latitude": -99.99,
"longitude": 1,
"sourceIp": "2.255.1.1",
"queryExperiences": [
{
"endpointId": 1,
"latency": 96.222,
"queryCount": 100
},
{
"endpointId": 2,
"latency": 4.222,
"queryCount": 500
}
]
}
]
}
}
HeatMap-GET-With-Null-Values
Solicitação de exemplo
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficmanagerprofiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/default?api-version=2022-04-01
/**
* Samples for HeatMap Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-Null-
* Values.json
*/
/**
* Sample code: HeatMap-GET-With-Null-Values.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void heatMapGETWithNullValues(com.azure.resourcemanager.AzureResourceManager azure) {
azure.trafficManagerProfiles().manager().serviceClient().getHeatMaps().getWithResponse(
"azuresdkfornetautoresttrafficmanager1323", "azuresdkfornetautoresttrafficmanager3880", null, null,
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.trafficmanager import TrafficManagerManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-trafficmanager
# USAGE
python heat_map_get_with_null_values.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 = TrafficManagerManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)
response = client.heat_map.get(
resource_group_name="azuresdkfornetautoresttrafficmanager1323",
profile_name="azuresdkfornetautoresttrafficmanager3880",
)
print(response)
# x-ms-original-file: specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-Null-Values.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 armtrafficmanager_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/trafficmanager/armtrafficmanager"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-Null-Values.json
func ExampleHeatMapClient_Get_heatMapGetWithNullValues() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armtrafficmanager.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewHeatMapClient().Get(ctx, "azuresdkfornetautoresttrafficmanager1323", "azuresdkfornetautoresttrafficmanager3880", &armtrafficmanager.HeatMapClientGetOptions{TopLeft: []float64{},
BotRight: []float64{},
})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.HeatMapModel = armtrafficmanager.HeatMapModel{
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Network/trafficManagerProfiles/heatMaps/default"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/default"),
// Properties: &armtrafficmanager.HeatMapProperties{
// EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-22T12:50:00.000Z"); return t}()),
// Endpoints: []*armtrafficmanager.HeatMapEndpoint{
// {
// EndpointID: to.Ptr[int32](0),
// ResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/externalEndpoints/azuresdkfornetautoresttrafficmanager3880"),
// },
// {
// EndpointID: to.Ptr[int32](1),
// ResourceID: to.Ptr("/subscriptions/562d4115-c01e-4m67-9bbd-c11c2d58ad73/resourceGroups/azuresdkfornetautoresttrafficmanager1300/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3885/externalEndpoints/azuresdkfornetautoresttrafficmanager3881"),
// }},
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T12:00:00.000Z"); return t}()),
// TrafficFlows: []*armtrafficmanager.TrafficFlow{
// {
// Latitude: to.Ptr[float64](99.99),
// Longitude: to.Ptr[float64](0),
// QueryExperiences: []*armtrafficmanager.QueryExperience{
// {
// EndpointID: to.Ptr[int32](0),
// Latency: to.Ptr[float64](99),
// QueryCount: to.Ptr[int32](1000000),
// },
// {
// EndpointID: to.Ptr[int32](1),
// Latency: to.Ptr[float64](1),
// QueryCount: to.Ptr[int32](1),
// }},
// SourceIP: to.Ptr("1.1.1.1"),
// },
// {
// Latitude: to.Ptr[float64](1.11),
// Longitude: to.Ptr[float64](-2.35),
// QueryExperiences: []*armtrafficmanager.QueryExperience{
// {
// EndpointID: to.Ptr[int32](0),
// QueryCount: to.Ptr[int32](100),
// },
// {
// EndpointID: to.Ptr[int32](1),
// Latency: to.Ptr[float64](4.222),
// QueryCount: to.Ptr[int32](500),
// }},
// SourceIP: to.Ptr("2.255.1.1"),
// }},
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { TrafficManagerManagementClient } = require("@azure/arm-trafficmanager");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets latest heatmap for Traffic Manager profile.
*
* @summary Gets latest heatmap for Traffic Manager profile.
* x-ms-original-file: specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-Null-Values.json
*/
async function heatMapGetWithNullValues() {
const subscriptionId = process.env["TRAFFICMANAGER_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName =
process.env["TRAFFICMANAGER_RESOURCE_GROUP"] || "azuresdkfornetautoresttrafficmanager1323";
const profileName = "azuresdkfornetautoresttrafficmanager3880";
const credential = new DefaultAzureCredential();
const client = new TrafficManagerManagementClient(credential, subscriptionId);
const result = await client.heatMap.get(resourceGroupName, profileName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.TrafficManager.Models;
using Azure.ResourceManager.TrafficManager;
// Generated from example definition: specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-Null-Values.json
// this example is just showing the usage of "HeatMap_Get" 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 TrafficManagerHeatMapResource created on azure
// for more information of creating TrafficManagerHeatMapResource, please refer to the document of TrafficManagerHeatMapResource
string subscriptionId = "{subscription-id}";
string resourceGroupName = "azuresdkfornetautoresttrafficmanager1323";
string profileName = "azuresdkfornetautoresttrafficmanager3880";
TrafficManagerHeatMapType heatMapType = TrafficManagerHeatMapType.Default;
ResourceIdentifier trafficManagerHeatMapResourceId = TrafficManagerHeatMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, profileName, heatMapType);
TrafficManagerHeatMapResource trafficManagerHeatMap = client.GetTrafficManagerHeatMapResource(trafficManagerHeatMapResourceId);
// invoke the operation
TrafficManagerHeatMapResource result = await trafficManagerHeatMap.GetAsync();
// the variable result 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
TrafficManagerHeatMapData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Resposta de exemplo
{
"id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/default",
"name": "default",
"type": "Microsoft.Network/trafficManagerProfiles/heatMaps/default",
"properties": {
"startTime": "2017-08-15T12:00:00Z",
"endTime": "2017-08-22T12:50:00Z",
"endpoints": [
{
"endpointId": 0,
"resourceId": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/externalEndpoints/azuresdkfornetautoresttrafficmanager3880"
},
{
"endpointId": 1,
"resourceId": "/subscriptions/562d4115-c01e-4m67-9bbd-c11c2d58ad73/resourceGroups/azuresdkfornetautoresttrafficmanager1300/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3885/externalEndpoints/azuresdkfornetautoresttrafficmanager3881"
}
],
"trafficFlows": [
{
"latitude": 99.99,
"longitude": 0,
"sourceIp": "1.1.1.1",
"queryExperiences": [
{
"endpointId": 0,
"latency": 99,
"queryCount": 1000000
},
{
"endpointId": 1,
"latency": 1,
"queryCount": 1
}
]
},
{
"latitude": 1.11,
"longitude": -2.35,
"sourceIp": "2.255.1.1",
"queryExperiences": [
{
"endpointId": 0,
"queryCount": 100
},
{
"endpointId": 1,
"latency": 4.222,
"queryCount": 500
}
]
}
]
}
}
HeatMap-GET-With-TopLeft-BotRight
Solicitação de exemplo
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficmanagerprofiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/default?topLeft=10,50.001&botRight=-50.001,80&api-version=2022-04-01
import java.util.Arrays;
/**
* Samples for HeatMap Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-
* TopLeft-BotRight.json
*/
/**
* Sample code: HeatMap-GET-With-TopLeft-BotRight.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void heatMapGETWithTopLeftBotRight(com.azure.resourcemanager.AzureResourceManager azure) {
azure.trafficManagerProfiles().manager().serviceClient().getHeatMaps().getWithResponse(
"azuresdkfornetautoresttrafficmanager1323", "azuresdkfornetautoresttrafficmanager3880",
Arrays.asList(10.0, 50.001), Arrays.asList(-50.001, 80.0), 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.trafficmanager import TrafficManagerManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-trafficmanager
# USAGE
python heat_map_get_with_top_left_bot_right.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 = TrafficManagerManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)
response = client.heat_map.get(
resource_group_name="azuresdkfornetautoresttrafficmanager1323",
profile_name="azuresdkfornetautoresttrafficmanager3880",
)
print(response)
# x-ms-original-file: specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-TopLeft-BotRight.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 armtrafficmanager_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/trafficmanager/armtrafficmanager"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-TopLeft-BotRight.json
func ExampleHeatMapClient_Get_heatMapGetWithTopLeftBotRight() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armtrafficmanager.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewHeatMapClient().Get(ctx, "azuresdkfornetautoresttrafficmanager1323", "azuresdkfornetautoresttrafficmanager3880", &armtrafficmanager.HeatMapClientGetOptions{TopLeft: []float64{
10,
50.001},
BotRight: []float64{
-50.001,
80},
})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.HeatMapModel = armtrafficmanager.HeatMapModel{
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Network/trafficManagerProfiles/heatMaps/latencyVolumeByLocation"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/latencyVolumeByLocation"),
// Properties: &armtrafficmanager.HeatMapProperties{
// EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-22T12:50:00.000Z"); return t}()),
// Endpoints: []*armtrafficmanager.HeatMapEndpoint{
// {
// EndpointID: to.Ptr[int32](1),
// ResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/externalEndpoints/azuresdkfornetautoresttrafficmanager3880"),
// },
// {
// EndpointID: to.Ptr[int32](2),
// ResourceID: to.Ptr("/subscriptions/562d4115-c01e-4m67-9bbd-c11c2d58ad73/resourceGroups/azuresdkfornetautoresttrafficmanager1300/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3885/externalEndpoints/azuresdkfornetautoresttrafficmanager3881"),
// }},
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T12:00:00.000Z"); return t}()),
// TrafficFlows: []*armtrafficmanager.TrafficFlow{
// {
// Latitude: to.Ptr[float64](9.99),
// Longitude: to.Ptr[float64](75.01),
// QueryExperiences: []*armtrafficmanager.QueryExperience{
// {
// EndpointID: to.Ptr[int32](1),
// Latency: to.Ptr[float64](99.222),
// QueryCount: to.Ptr[int32](1000000),
// },
// {
// EndpointID: to.Ptr[int32](2),
// Latency: to.Ptr[float64](1.222),
// QueryCount: to.Ptr[int32](1),
// }},
// SourceIP: to.Ptr("1.1.1.1"),
// },
// {
// Latitude: to.Ptr[float64](-49.99),
// Longitude: to.Ptr[float64](51),
// QueryExperiences: []*armtrafficmanager.QueryExperience{
// {
// EndpointID: to.Ptr[int32](1),
// Latency: to.Ptr[float64](96.222),
// QueryCount: to.Ptr[int32](100),
// },
// {
// EndpointID: to.Ptr[int32](2),
// Latency: to.Ptr[float64](4.222),
// QueryCount: to.Ptr[int32](500),
// }},
// SourceIP: to.Ptr("2.255.1.1"),
// }},
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { TrafficManagerManagementClient } = require("@azure/arm-trafficmanager");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets latest heatmap for Traffic Manager profile.
*
* @summary Gets latest heatmap for Traffic Manager profile.
* x-ms-original-file: specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-TopLeft-BotRight.json
*/
async function heatMapGetWithTopLeftBotRight() {
const subscriptionId = process.env["TRAFFICMANAGER_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName =
process.env["TRAFFICMANAGER_RESOURCE_GROUP"] || "azuresdkfornetautoresttrafficmanager1323";
const profileName = "azuresdkfornetautoresttrafficmanager3880";
const topLeft = [10, 50.001];
const botRight = [-50.001, 80];
const options = { topLeft, botRight };
const credential = new DefaultAzureCredential();
const client = new TrafficManagerManagementClient(credential, subscriptionId);
const result = await client.heatMap.get(resourceGroupName, profileName, options);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.TrafficManager.Models;
using Azure.ResourceManager.TrafficManager;
// Generated from example definition: specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-TopLeft-BotRight.json
// this example is just showing the usage of "HeatMap_Get" 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 TrafficManagerHeatMapResource created on azure
// for more information of creating TrafficManagerHeatMapResource, please refer to the document of TrafficManagerHeatMapResource
string subscriptionId = "{subscription-id}";
string resourceGroupName = "azuresdkfornetautoresttrafficmanager1323";
string profileName = "azuresdkfornetautoresttrafficmanager3880";
TrafficManagerHeatMapType heatMapType = TrafficManagerHeatMapType.Default;
ResourceIdentifier trafficManagerHeatMapResourceId = TrafficManagerHeatMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, profileName, heatMapType);
TrafficManagerHeatMapResource trafficManagerHeatMap = client.GetTrafficManagerHeatMapResource(trafficManagerHeatMapResourceId);
// invoke the operation
IEnumerable<double> topLeft = new double[]
{
10,50.001
};
IEnumerable<double> botRight = new double[]
{
-50.001,80
};
TrafficManagerHeatMapResource result = await trafficManagerHeatMap.GetAsync(topLeft: topLeft, botRight: botRight);
// the variable result 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
TrafficManagerHeatMapData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Resposta de exemplo
{
"id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/latencyVolumeByLocation",
"name": "default",
"type": "Microsoft.Network/trafficManagerProfiles/heatMaps/latencyVolumeByLocation",
"properties": {
"startTime": "2017-08-15T12:00:00Z",
"endTime": "2017-08-22T12:50:00Z",
"endpoints": [
{
"endpointId": 1,
"resourceId": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/externalEndpoints/azuresdkfornetautoresttrafficmanager3880"
},
{
"endpointId": 2,
"resourceId": "/subscriptions/562d4115-c01e-4m67-9bbd-c11c2d58ad73/resourceGroups/azuresdkfornetautoresttrafficmanager1300/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3885/externalEndpoints/azuresdkfornetautoresttrafficmanager3881"
}
],
"trafficFlows": [
{
"latitude": 9.99,
"longitude": 75.01,
"sourceIp": "1.1.1.1",
"queryExperiences": [
{
"endpointId": 1,
"latency": 99.222,
"queryCount": 1000000
},
{
"endpointId": 2,
"latency": 1.222,
"queryCount": 1
}
]
},
{
"latitude": -49.99,
"longitude": 51,
"sourceIp": "2.255.1.1",
"queryExperiences": [
{
"endpointId": 1,
"latency": 96.222,
"queryCount": 100
},
{
"endpointId": 2,
"latency": 4.222,
"queryCount": 500
}
]
}
]
}
}
Definições
Nome |
Description |
CloudError
|
Um erro retornado pelo Resource Manager do Azure
|
CloudErrorBody
|
O conteúdo de um erro retornado pelo Resource Manager do Azure
|
HeatMapEndpoint
|
Classe que é uma representação esparsa de um ponto de extremidade do Gerenciador de Tráfego.
|
HeatMapModel
|
Classe que representa um HeatMap do Gerenciador de Tráfego.
|
HeatMapType
|
O tipo de HeatMap para o perfil do Gerenciador de Tráfego.
|
QueryExperience
|
Classe que representa uma experiência de consulta HeatMap do Gerenciador de Tráfego.
|
TrafficFlow
|
Classe que representa as propriedades de fluxo de tráfego heatMap do Gerenciador de Tráfego.
|
CloudError
Um erro retornado pelo Resource Manager do Azure
CloudErrorBody
O conteúdo de um erro retornado pelo Resource Manager do Azure
Nome |
Tipo |
Description |
code
|
string
|
Código do erro
|
details
|
CloudErrorBody[]
|
Detalhes do erro
|
message
|
string
|
Mensagem de erro
|
target
|
string
|
Destino de erro
|
HeatMapEndpoint
Classe que é uma representação esparsa de um ponto de extremidade do Gerenciador de Tráfego.
Nome |
Tipo |
Description |
endpointId
|
integer
|
Um número que identifica exclusivamente esse ponto de extremidade em experiências de consulta.
|
resourceId
|
string
|
A ID de recurso do ARM desse ponto de extremidade do Gerenciador de Tráfego.
|
HeatMapModel
Classe que representa um HeatMap do Gerenciador de Tráfego.
Nome |
Tipo |
Description |
id
|
string
|
ID de recurso totalmente qualificada para o recurso. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
|
name
|
string
|
O nome do recurso
|
properties.endTime
|
string
|
O final da janela de tempo para este HeatMap, exclusivo.
|
properties.endpoints
|
HeatMapEndpoint[]
|
Os pontos de extremidade usados neste cálculo heatMap.
|
properties.startTime
|
string
|
O início da janela de tempo para este Mapa de Calor, inclusive.
|
properties.trafficFlows
|
TrafficFlow[]
|
Os fluxos de tráfego produzidos neste cálculo heatMap.
|
type
|
string
|
Tipo do recurso. Por exemplo, Microsoft.Network/trafficManagerProfiles.
|
HeatMapType
O tipo de HeatMap para o perfil do Gerenciador de Tráfego.
Nome |
Tipo |
Description |
default
|
string
|
|
QueryExperience
Classe que representa uma experiência de consulta HeatMap do Gerenciador de Tráfego.
Nome |
Tipo |
Description |
endpointId
|
integer
|
A ID do ponto de extremidade da matriz 'endpoints' para a qual essas consultas foram roteados.
|
latency
|
number
|
A latência experimentada por consultas originadas desse local.
|
queryCount
|
integer
|
O número de consultas provenientes desse local.
|
TrafficFlow
Classe que representa as propriedades de fluxo de tráfego heatMap do Gerenciador de Tráfego.
Nome |
Tipo |
Description |
latitude
|
number
|
A latitude aproximada da qual essas consultas se originaram.
|
longitude
|
number
|
A longitude aproximada da qual essas consultas se originaram.
|
queryExperiences
|
QueryExperience[]
|
As experiências de consulta produzidas neste cálculo heatMap.
|
sourceIp
|
string
|
O endereço IP do qual essa experiência de consulta se originou.
|