Pobiera najnowszą mapę cieplną profilu usługi Traffic Manager.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/default?api-version=2022-04-01
Z parametrami opcjonalnymi:
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
Parametry identyfikatora URI
Nazwa |
W |
Wymagane |
Typ |
Opis |
heatMapType
|
path |
True
|
HeatMapType
|
Typ heatMap profilu usługi Traffic Manager.
|
profileName
|
path |
True
|
string
|
Nazwa profilu usługi Traffic Manager.
|
resourceGroupName
|
path |
True
|
string
|
Nazwa grupy zasobów. W nazwie jest uwzględniana wielkość liter.
|
subscriptionId
|
path |
True
|
string
|
Pobiera poświadczenia subskrypcji, które jednoznacznie identyfikują subskrypcję platformy Microsoft Azure. Identyfikator subskrypcji stanowi część identyfikatora URI dla każdego wywołania usługi.
|
api-version
|
query |
True
|
string
|
Wersja interfejsu API klienta.
|
botRight
|
query |
|
number[]
|
Prawa dolna szerokość geograficzna,długość geograficzna prostokątnegoportu do zapytania.
|
topLeft
|
query |
|
number[]
|
Lewa górna szerokość geograficzna,długość geograficzna prostokątnegoportu do zapytania.
|
Odpowiedzi
Nazwa |
Typ |
Opis |
200 OK
|
HeatMapModel
|
Mapa cieplna usługi Traffic Manager.
|
Other Status Codes
|
CloudError
|
Odpowiedź domyślna. Zostanie ona zdeserializowana zgodnie z definicją błędu.
|
Zabezpieczenia
azure_auth
Przepływ OAuth2 usługi Azure Active Directory
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
Nazwa |
Opis |
user_impersonation
|
personifikacja konta użytkownika
|
Przykłady
HeatMap-GET
Przykładowe żądanie
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
Przykładowa odpowiedź
{
"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
Przykładowe żądanie
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
Przykładowa odpowiedź
{
"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
Przykładowe żądanie
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
Przykładowa odpowiedź
{
"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
}
]
}
]
}
}
Definicje
Nazwa |
Opis |
CloudError
|
Błąd zwrócony przez usługę Azure Resource Manager
|
CloudErrorBody
|
Zawartość błędu zwróconego przez usługę Azure Resource Manager
|
HeatMapEndpoint
|
Klasa, która jest rozrzedliwą reprezentacją punktu końcowego usługi Traffic Manager.
|
HeatMapModel
|
Klasa reprezentująca mapę HeatMap usługi Traffic Manager.
|
HeatMapType
|
Typ heatMap profilu usługi Traffic Manager.
|
QueryExperience
|
Klasa reprezentująca właściwości środowiska zapytania Traffic Manager HeatMap.
|
TrafficFlow
|
Klasa reprezentująca właściwości przepływu ruchu usługi Traffic Manager HeatMap.
|
CloudError
Błąd zwrócony przez usługę Azure Resource Manager
CloudErrorBody
Zawartość błędu zwróconego przez usługę Azure Resource Manager
Nazwa |
Typ |
Opis |
code
|
string
|
Kod błędu
|
details
|
CloudErrorBody[]
|
Szczegóły błędu
|
message
|
string
|
Komunikat o błędzie
|
target
|
string
|
Błąd docelowy
|
HeatMapEndpoint
Klasa, która jest rozrzedliwą reprezentacją punktu końcowego usługi Traffic Manager.
Nazwa |
Typ |
Opis |
endpointId
|
integer
|
Liczba jednoznacznie identyfikujących ten punkt końcowy w środowiskach zapytań.
|
resourceId
|
string
|
Identyfikator zasobu usługi ARM tego punktu końcowego usługi Traffic Manager.
|
HeatMapModel
Klasa reprezentująca mapę HeatMap usługi Traffic Manager.
Nazwa |
Typ |
Opis |
id
|
string
|
W pełni kwalifikowany identyfikator zasobu dla zasobu. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
|
name
|
string
|
Nazwa zasobu
|
properties.endTime
|
string
|
Zakończenie przedziału czasu dla tej mapy cieplnej, wyłącznie.
|
properties.endpoints
|
HeatMapEndpoint[]
|
Punkty końcowe używane w tym obliczeniu HeatMap.
|
properties.startTime
|
string
|
Początek przedziału czasu dla tej mapy cieplnej włącznie.
|
properties.trafficFlows
|
TrafficFlow[]
|
Przepływy ruchu generowane w tym obliczeniu HeatMap.
|
type
|
string
|
Typ zasobu. Ex- Microsoft.Network/trafficManagerProfiles.
|
HeatMapType
Typ heatMap profilu usługi Traffic Manager.
Nazwa |
Typ |
Opis |
default
|
string
|
|
QueryExperience
Klasa reprezentująca właściwości środowiska zapytania Traffic Manager HeatMap.
Nazwa |
Typ |
Opis |
endpointId
|
integer
|
Identyfikator punktu końcowego z tablicy "endpoints", do której zostały kierowane te zapytania.
|
latency
|
number
|
Opóźnienie występujące przez zapytania pochodzące z tej lokalizacji.
|
queryCount
|
integer
|
Liczba zapytań pochodzących z tej lokalizacji.
|
TrafficFlow
Klasa reprezentująca właściwości przepływu ruchu usługi Traffic Manager HeatMap.
Nazwa |
Typ |
Opis |
latitude
|
number
|
Przybliżona szerokość geograficzna, z którego pochodzą te zapytania.
|
longitude
|
number
|
Przybliżona długość geograficzna, z którego pochodzą te zapytania.
|
queryExperiences
|
QueryExperience[]
|
Środowiska zapytań utworzone w tym obliczeniu HeatMap.
|
sourceIp
|
string
|
Adres IP, z którego pochodzi to zapytanie.
|