Azure Traffic Manager libraries for Java
Overview
Control the distribution of user traffic for service endpoints in different datacenters with Azure Traffic Manager.
To get started with Azure Traffic Manager, see Create a Traffic Manager profile.
Management API
Create Traffic Manager profiles, define endpoints, and change the routing method with the management API.
Add a dependency to your Maven pom.xml
file to use the management API in your project.
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-mgmt-trafficmanager</artifactId>
<version>1.3.0</version>
</dependency>
Example
Create a Traffic Manager profile and assign a single endpoint.
TrafficManagerProfile tmProfile = azure.trafficManagerProfiles().define("testTMProfile")
.withNewResourceGroup(Region.US_EAST)
.withLeafDomainLabel("testTMProfile")
.withPriorityBasedRouting()
.defineAzureTargetEndpoint("endpoint")
.toResourceId(webAppId)
.withRoutingPriority(1)
.attach()
.create();
Samples
Balance web app traffic across multiple regions
Explore more sample Java code for Azure Traffic Manager you can use in your apps.
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Azure SDK for Java
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기