Obtiene el mapa térmico más reciente del perfil de Traffic Manager.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/default?api-version=2022-04-01
Con parámetros opcionales:
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 identificador URI
Nombre |
En |
Requerido |
Tipo |
Description |
heatMapType
|
path |
True
|
HeatMapType
|
Tipo de Mapa térmico para el perfil de Traffic Manager.
|
profileName
|
path |
True
|
string
|
Nombre del perfil de Traffic Manager.
|
resourceGroupName
|
path |
True
|
string
|
Nombre del grupo de recursos. El nombre distingue mayúsculas de minúsculas.
|
subscriptionId
|
path |
True
|
string
|
Obtiene las credenciales de suscripción que identifican a la suscripción de Microsoft Azure de forma única. El identificador de suscripción forma parte del URI para cada llamada al servicio.
|
api-version
|
query |
True
|
string
|
Versión de api de cliente.
|
botRight
|
query |
|
number[]
|
El par de latitud inferior derecha, longitud de la ventanilla rectangular para la que se va a consultar.
|
topLeft
|
query |
|
number[]
|
Par de latitud y longitud superior izquierda de la ventanilla rectangular para la que se va a consultar.
|
Respuestas
Nombre |
Tipo |
Description |
200 OK
|
HeatMapModel
|
Mapa térmico de Traffic Manager.
|
Other Status Codes
|
CloudError
|
Respuesta predeterminada. Se deserializará según la definición de error.
|
Seguridad
azure_auth
Flujo OAuth2 de Azure Active Directory
Tipo:
oauth2
Flujo:
implicit
Dirección URL de autorización:
https://login.microsoftonline.com/common/oauth2/authorize
Ámbitos
Nombre |
Description |
user_impersonation
|
suplantación de su cuenta de usuario
|
Ejemplos
HeatMap-GET
Solicitud de ejemplo
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
Respuesta de muestra
{
"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
Solicitud de ejemplo
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
Respuesta de muestra
{
"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
Solicitud de ejemplo
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
Respuesta de muestra
{
"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
}
]
}
]
}
}
Definiciones
Nombre |
Description |
CloudError
|
Error devuelto por azure Resource Manager
|
CloudErrorBody
|
El contenido de un error devuelto por azure Resource Manager
|
HeatMapEndpoint
|
Clase que es una representación dispersa de un punto de conexión de Traffic Manager.
|
HeatMapModel
|
Clase que representa un mapa térmico de Traffic Manager.
|
HeatMapType
|
Tipo de Mapa térmico para el perfil de Traffic Manager.
|
QueryExperience
|
Clase que representa las propiedades de la experiencia de consulta de Traffic Manager HeatMap.
|
TrafficFlow
|
Clase que representa las propiedades de flujo de tráfico de Traffic Manager HeatMap.
|
CloudError
Error devuelto por azure Resource Manager
CloudErrorBody
El contenido de un error devuelto por azure Resource Manager
Nombre |
Tipo |
Description |
code
|
string
|
Código de error
|
details
|
CloudErrorBody[]
|
Detalles del error
|
message
|
string
|
Mensaje de error
|
target
|
string
|
Destino de error
|
HeatMapEndpoint
Clase que es una representación dispersa de un punto de conexión de Traffic Manager.
Nombre |
Tipo |
Description |
endpointId
|
integer
|
Número que identifica de forma única este punto de conexión en las experiencias de consulta.
|
resourceId
|
string
|
Identificador de recurso de ARM de este punto de conexión de Traffic Manager.
|
HeatMapModel
Clase que representa un mapa térmico de Traffic Manager.
Nombre |
Tipo |
Description |
id
|
string
|
Identificador de recurso completo para el recurso. Por ejemplo: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
|
name
|
string
|
Nombre del recurso.
|
properties.endTime
|
string
|
El final de la ventana de tiempo para este HeatMap, exclusivo.
|
properties.endpoints
|
HeatMapEndpoint[]
|
Los puntos de conexión usados en este cálculo de HeatMap.
|
properties.startTime
|
string
|
El principio del período de tiempo para este HeatMap, ambos incluidos.
|
properties.trafficFlows
|
TrafficFlow[]
|
Los flujos de tráfico generados en este cálculo de HeatMap.
|
type
|
string
|
Tipo de recurso. Por ejemplo, Microsoft.Network/trafficManagerProfiles.
|
HeatMapType
Tipo de Mapa térmico para el perfil de Traffic Manager.
Nombre |
Tipo |
Description |
default
|
string
|
|
QueryExperience
Clase que representa las propiedades de la experiencia de consulta de Traffic Manager HeatMap.
Nombre |
Tipo |
Description |
endpointId
|
integer
|
Identificador del punto de conexión de la matriz "endpoints" a la que se enrutaron estas consultas.
|
latency
|
number
|
La latencia experimentada por las consultas que se originan en esta ubicación.
|
queryCount
|
integer
|
Número de consultas que se originan en esta ubicación.
|
TrafficFlow
Clase que representa las propiedades de flujo de tráfico de Traffic Manager HeatMap.
Nombre |
Tipo |
Description |
latitude
|
number
|
Latitud aproximada de la que se originaron estas consultas.
|
longitude
|
number
|
Longitud aproximada de la que se originaron estas consultas.
|
queryExperiences
|
QueryExperience[]
|
Las experiencias de consulta generadas en este cálculo de HeatMap.
|
sourceIp
|
string
|
Dirección IP de la que se originó esta experiencia de consulta.
|