canonical: https://jentic.com/apis/azure.com/trafficmanagermanagementclient

# Microsoft Azure TrafficManagerManagementClient

Jentic publishes the only available OpenAPI specification for TrafficManagerManagementClient, keeping it validated and agent-ready. The Azure Traffic Manager Management Client is the ARM control plane for Microsoft.Network/trafficmanagerprofiles. It lets agents create, update, and delete Traffic Manager profiles, attach endpoints (Azure, external, or nested) for global DNS-level traffic routing, query geographic hierarchies for geo routing, manage user metrics keys for Real User Measurements, and pull heat map analytics. Authentication uses Azure Active Directory OAuth 2.0 against management.azure.com.

## For AI agents

Provisions Azure Traffic Manager profiles, attaches endpoints, and reads geographic hierarchies and heat map data so agents can configure global DNS-based traffic routing.

## Scope

Does not run authoritative DNS zones, terminate TLS, or balance traffic at the TCP layer - use Azure DNS, Application Gateway, or Front Door for those concerns; Traffic Manager only does DNS-level global routing.

## Capabilities

- Create, update, and delete Traffic Manager profiles to control global DNS-based routing across regions
- Attach Azure, external, or nested-profile endpoints to a profile and set their priority, weight, or geographic mapping
- Check whether a relative Traffic Manager domain name (the trafficmanager.net subdomain) is available before creating a profile
- Pull the geographic hierarchy used by Geographic routing so an agent can validate region codes before assigning them to endpoints
- Retrieve heat map data showing where end users are being routed for traffic-shape analysis
- Manage the per-subscription Real User Measurements key used to feed client-side telemetry into Traffic Manager

## Use cases

### Multi-region failover routing

An application with primary and secondary Azure regions needs DNS-level failover so that if the primary endpoint stops responding, traffic shifts to the secondary within the TTL window. The Traffic Manager Management Client creates a profile in priority routing mode, attaches both regional endpoints with priority 1 and 2, and configures the monitor settings (path, port, expected status). Failover is automatic once the probe marks the higher-priority endpoint Degraded.

Example prompt: Create a Traffic Manager profile named 'checkout-failover' in resource group 'web-rg' with trafficRoutingMethod=Priority, attach two AzureEndpoints pointing at the primary and secondary App Service hostnames with priorities 1 and 2, and verify both endpoints reach Online status.

### Weighted traffic split for canary release

Releasing a new build to 5% of users before ramping to 100% requires weighted DNS routing. The agent creates or updates a Traffic Manager profile with trafficRoutingMethod=Weighted and sets endpoint weights (95 for stable, 5 for canary). To shift traffic, the agent updates the endpoint weights through the trafficmanagerprofiles/{endpointType}/{endpointName} PATCH and Traffic Manager applies it on the next DNS resolution.

Example prompt: Update endpoint 'canary' on profile 'checkout' (resource group 'web-rg') to weight=20 and endpoint 'stable' to weight=80, then read the profile back and confirm the new weights are applied.

### Geographic routing with hierarchy validation

A regulated workload must route EU users to an EU endpoint and APAC users to an APAC endpoint. The agent first GETs the trafficManagerGeographicHierarchies/default resource to validate the region codes (e.g., GEO-EU, GEO-AP), then creates a profile with trafficRoutingMethod=Geographic and assigns those region codes to each endpoint. Validating against the live hierarchy prevents invalid-region 400s at create time.

Example prompt: Get the Traffic Manager geographic hierarchy, then create a profile 'geo-checkout' with two endpoints - one mapped to GEO-EU and one to GEO-AP - and verify the create response contains the expected geoMapping arrays.

### Agent-driven heat map analysis

An AI agent analyzing user distribution can fetch the Traffic Manager heat map for a profile and feed the latitude/longitude buckets into a downstream report. Through Jentic the agent searches once for 'Azure Traffic Manager heat map', loads the GET on heatMaps/{heatMapType}, and executes it with the profile name. The Azure AD token is issued from your Jentic One instance - no service principal credentials touch the agent.

Example prompt: Search Jentic for 'azure traffic manager heat map', then call the heatMaps GET on profile 'checkout-failover' in resource group 'web-rg' with heatMapType='default' and return the top 10 query buckets by query count.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles | List Traffic Manager profiles in the subscription |
| PUT | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName} | Create or update a Traffic Manager profile |
| PUT | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName} | Create or update an endpoint inside a profile |
| POST | /providers/Microsoft.Network/checkTrafficManagerNameAvailability | Check relative DNS name availability |
| GET | /providers/Microsoft.Network/trafficManagerGeographicHierarchies/default | Get the geographic hierarchy for geo routing |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType} | Read heat map analytics for a profile |

## Key resources

- **trafficmanagerprofiles** — Profile CRUD plus per-endpoint create/update/delete via the {endpointType}/{endpointName} sub-resource
- **checkTrafficManagerNameAvailability** — Validates that a relative DNS name on trafficmanager.net is free before profile creation
- **trafficManagerGeographicHierarchies** — Read-only hierarchy of region codes supported by Geographic routing
- **heatMaps** — Per-profile heat map analytics showing user query distribution
- **trafficManagerUserMetricsKeys** — Subscription-level key for Real User Measurements client-side telemetry

## Why Jentic

- **Setup:** Wiring TrafficManagerManagementClient by hand means configuring Azure AD OAuth 2.0 against management.azure.com, pinning the 2018-04-01 api-version, and coding the async polling of long-running profile PUTs plus ARM 429 back-off yourself before you can create a profile or attach an endpoint. Through Jentic you install once, import TrafficManagerManagementClient from the API Directory, store the Azure AD OAuth token once, and your agent calls it.
- **Permission scoping:** Subscription, resource group, profile, and endpoint names are URL path parameters (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}), so a rule can pin your agent to profiles in one resource group. You choose the operations it may call, so destructive ones like deleting a profile or deleting an endpoint are not included unless you add them.
- **Credential handling:** Your Azure AD OAuth token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create an Azure Traffic Manager profile' or 'read the heat map for a Traffic Manager profile', and Jentic returns the matching Microsoft.Network operation with its input schema for trafficRoutingMethod, endpoints, and monitor settings so the agent calls it without reading the ARM reference.

## Related APIs

- **DnsManagementClient** — Manages authoritative Azure DNS zones that often sit alongside Traffic Manager
- **NetworkManagementClient** — Provisions the underlying VNet, public IPs, and load balancers Traffic Manager routes to
- **PrivateDnsManagementClient** — Resolves names inside a virtual network without public DNS

## FAQ

### Why is there no official OpenAPI spec for TrafficManagerManagementClient?

Microsoft Azure does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call TrafficManagerManagementClient via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer .

### What authentication does the TrafficManagerManagementClient use?

It uses Azure Active Directory OAuth 2.0 with the user_impersonation scope against https://login.microsoftonline.com/common/oauth2/authorize. Jentic stores the Azure AD client secret encrypted in its vault and issues a short-lived bearer token to the agent at execution time, so the secret never enters agent context.

### Can I create a weighted routing profile with the TrafficManagerManagementClient?

Yes. PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName} with trafficRoutingMethod set to Weighted and per-endpoint weights creates the profile. You then PUT each endpoint via the {endpointType}/{endpointName} sub-resource.

### What are the rate limits for the TrafficManagerManagementClient?

Calls go through Azure Resource Manager and are subject to the standard ARM read and write throttling buckets (roughly 12,000 reads and 1,200 writes per hour per subscription per region). The exact limit is not in the spec; respect the Retry-After header on a 429.

### How do I attach an endpoint to a profile through Jentic?

Run pip install jentic, then client.search('add Azure Traffic Manager endpoint'), client.load on the returned operation (PUT on .../trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}), and client.execute with the endpoint payload (target, priority, weight, endpointStatus). Jentic injects the Azure AD token from the vault.

### How do I check whether a Traffic Manager DNS name is available?

Call POST /providers/Microsoft.Network/checkTrafficManagerNameAvailability with body {name, type:'Microsoft.Network/trafficManagerProfiles'}. The response indicates whether the requested {name}.trafficmanager.net is free or already taken.

### Can I limit what my agent is allowed to do with the Microsoft Azure Traffic Manager API?

Yes. Because you run Jentic One yourself, your own rules decide which Traffic Manager operations the agent may call and which Azure AD credentials it may use. Subscription, resource group, profile, and endpoint names are URL path parameters, so a rule can pin the agent to profiles inside a single resource group. You also pick the exact operations it can run, so destructive ones like deleting a profile or deleting an endpoint are excluded unless you add them, leaving the agent with only reads such as listing profiles or fetching the heat map if that is all you allow.
