Obtém o mapa térmico mais recente para o perfil do Gestor 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 do URI
Name |
Em |
Necessário |
Tipo |
Description |
heatMapType
|
path |
True
|
HeatMapType
|
O tipo de Mapa Térmico para o perfil do Gestor de Tráfego.
|
profileName
|
path |
True
|
string
|
O nome do perfil do Gestor de Tráfego.
|
resourceGroupName
|
path |
True
|
string
|
O nome do grupo de recursos. O nome não é sensível a maiúsculas e minúsculas.
|
subscriptionId
|
path |
True
|
string
|
Obtém credenciais de subscrição que identificam exclusivamente a subscrição do Microsoft Azure. O ID da subscrição 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 viewport retangular para consultar.
|
topLeft
|
query |
|
number[]
|
O par de latitude superior esquerda, longitude do viewport retangular para consulta.
|
Respostas
Name |
Tipo |
Description |
200 OK
|
HeatMapModel
|
O mapa térmico do Gestor de Tráfego.
|
Other Status Codes
|
CloudError
|
Resposta predefinida. Será desserializada de acordo com a Definição de erro.
|
Segurança
azure_auth
Fluxo OAuth2 do Azure Active Directory
Tipo:
oauth2
Fluxo:
implicit
URL de Autorização:
https://login.microsoftonline.com/common/oauth2/authorize
Âmbitos
Name |
Description |
user_impersonation
|
representar a sua conta de utilizador
|
Exemplos
HeatMap-GET
Pedido de amostra
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 da amostra
{
"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
Pedido de amostra
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 da amostra
{
"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
Pedido de amostra
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 da amostra
{
"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
Name |
Description |
CloudError
|
Um erro devolvido pela Resource Manager do Azure
|
CloudErrorBody
|
O conteúdo de um erro devolvido pela Resource Manager do Azure
|
HeatMapEndpoint
|
Classe que é uma representação dispersa de um ponto final do Gestor de Tráfego.
|
HeatMapModel
|
Classe que representa um HeatMap do Gestor de Tráfego.
|
HeatMapType
|
O tipo de Mapa Térmico para o perfil do Gestor de Tráfego.
|
QueryExperience
|
Classe que representa as propriedades da experiência de consulta HeatMap do Gestor de Tráfego.
|
TrafficFlow
|
Classe que representa as propriedades do fluxo de tráfego HeatMap do Gestor de Tráfego.
|
CloudError
Um erro devolvido pela Resource Manager do Azure
CloudErrorBody
O conteúdo de um erro devolvido pela Resource Manager do Azure
Name |
Tipo |
Description |
code
|
string
|
Código de erro
|
details
|
CloudErrorBody[]
|
Detalhes do erro
|
message
|
string
|
Mensagem de erro
|
target
|
string
|
Destino do erro
|
HeatMapEndpoint
Classe que é uma representação dispersa de um ponto final do Gestor de Tráfego.
Name |
Tipo |
Description |
endpointId
|
integer
|
Um número que identifica exclusivamente este ponto final em experiências de consulta.
|
resourceId
|
string
|
O ID de Recurso do ARM deste ponto final do Gestor de Tráfego.
|
HeatMapModel
Classe que representa um HeatMap do Gestor de Tráfego.
Name |
Tipo |
Description |
id
|
string
|
ID de recurso completamente qualificado para o recurso. Por exemplo - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
|
name
|
string
|
O nome do recurso
|
properties.endTime
|
string
|
O fim da janela de tempo para este HeatMap, exclusivo.
|
properties.endpoints
|
HeatMapEndpoint[]
|
Os pontos finais utilizados neste cálculo heatMap.
|
properties.startTime
|
string
|
O início da janela de tempo para este HeatMap, inclusive.
|
properties.trafficFlows
|
TrafficFlow[]
|
Os fluxos de tráfego produzidos neste cálculo heatMap.
|
type
|
string
|
O tipo do recurso. Ex- Microsoft.Network/trafficManagerProfiles.
|
HeatMapType
O tipo de Mapa Térmico para o perfil do Gestor de Tráfego.
Name |
Tipo |
Description |
default
|
string
|
|
QueryExperience
Classe que representa as propriedades da experiência de consulta HeatMap do Gestor de Tráfego.
Name |
Tipo |
Description |
endpointId
|
integer
|
O ID do ponto final da matriz "pontos finais" para o qual estas consultas foram encaminhadas.
|
latency
|
number
|
A latência que as consultas têm origem nesta localização.
|
queryCount
|
integer
|
O número de consultas originárias desta localização.
|
TrafficFlow
Classe que representa as propriedades do fluxo de tráfego HeatMap do Gestor de Tráfego.
Name |
Tipo |
Description |
latitude
|
number
|
A latitude aproximada da qual estas consultas tiveram origem.
|
longitude
|
number
|
A longitude aproximada a partir da qual estas consultas tiveram origem.
|
queryExperiences
|
QueryExperience[]
|
As experiências de consulta produzidas neste cálculo heatMap.
|
sourceIp
|
string
|
O endereço IP do qual esta experiência de consulta teve origem.
|