From 8bf2fda85471b7f88ecda7357d1f87aa05281d40 Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Wed, 8 Jul 2020 16:21:02 +0800 Subject: [PATCH 01/13] Create Migration Guide File --- sdk/management/docs/MIGRATION_GUIDE.md | 279 +++++++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 sdk/management/docs/MIGRATION_GUIDE.md diff --git a/sdk/management/docs/MIGRATION_GUIDE.md b/sdk/management/docs/MIGRATION_GUIDE.md new file mode 100644 index 000000000000..cc054a7281bc --- /dev/null +++ b/sdk/management/docs/MIGRATION_GUIDE.md @@ -0,0 +1,279 @@ +## Guide for migrating to `com.azure.resourcemanager.**` from `com.microsoft.azure-mgmt-**` + +This document is intended for users that are familiar with an older version of the Java SDK for managment libraries (`com.microsoft.azure-mgmt-**`) ad wish to migrate their application +to the next version of Azure resource management libraries (`com.microsoft.azure-mgmt-**`) + +For users new to the Java SDK for resource management libraries, please see the [README for 'com.azure.resourcemanager.*`](http://aka.ms/azure-sdk-java-mgmt) + +## Table of contents +* Prerequisites +* Updated Maven depedencies +* General Changes + * Authentication + * Customized Policy + * Custom HTTP Client + * Error Handling + * rxJava -> Reactor +* Additional Samples + +## Prerequisites + +Java Development Kit (JDK) with version 8 or above. + +## Updated Maven dependencies + +The latest dependencies for resource management libraries are [available here](https://azure.github.io/azure-sdk/releases/latest/all/java.html). Please look for packages that contains "azure-resourcemanager" in the namespace. + +## General Changes + +The latest Azure Java SDK for management libraries is a result of our efforts to create a resource management client library that is user-friendly and idiomatic to the Java ecosystem. + +Apart from redesigns resulting from the [new Azure SDK Design Guidelines for Java](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/DESIGN.md), the latest version improves on several areas from old version. + +While conforming to the new guideline, we have tried our best to minimize the breaking changes. Most of the interfaces / classes / methods have stayed the same to offer user an easier migration experience. + +The important breaking changes are listed in the following sections: + +### Authentication + +In old version (`com.microsoft.azure-mgmt-**`), ApplicationTokenCredentials is created with all the credential parameters. + +In new version (`com.azure.resourcemanager.**`), in order to provide an unified authentication based on Azure Identity for all Azure Java SDKs, the authentication mechanism has been re-designed and improved to offer a simpler interface. + +To the show the code snippets for the change: + +**In old version (`com.microsoft.azure-mgmt-**`)** + +```java +ApplicationTokenCredentials = new ApplicationTokenCredentials("", "", "", AzureEnvironment.AZURE) + .withDefaultSubscriptionId(""); +``` + +**Equivalent in new version (`com.azure.resourcemanager.**`)** + +```java +TokenCredential credential = new ClientSecretCredentialBuilder() + .clientId("") + .clientSecret("") + .tenantId("") + .build(); +AzureProfile profile = new AzureProfile("", "", AzureEnvironment.AZURE); +``` + +In addition to this change, the **support for using auth file has been removed**. In old version, the user can choose to authenticate via the auth file, like this: + +**In old version (`com.microsoft.azure-mgmt-**`)** + +```java +Azure azure = Azure.authenticate(new File("my.azureauth")).withDefaultSubscription(); +``` +**In new version, this feature has been removed.** If this creates concern on your side, please file an issue to let us know. + +For detailed information on the benefits of using the new authentication classes, please refer to [this page](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/AUTH.md) + +## Customized Policy + +Because of adopting Azure Core which is a shared library across all Azure SDKs, there is also a minor change regarding how customized policy in configured. + +In old version (`com.microsoft.azure-mgmt-**`), we use `withInterceptor` and pass the customized interceptor class to the Azure object + +In new version (`com.azure.resourcemanager.**`), we use `WithPolicy` instead and pass the customized policy to the Azure object + +So: + +**In old version (`com.microsoft.azure-mgmt-**`)** + +```java +Azure azure = Azure.configure() + .withInterceptor(new CustomizedInterceptor()) + .authenticate(credential) + .withDefaultSubscription(); +``` + +**Equivalent in new version (`com.azure.resourcemanager.**`)** + +```java +Azure azure = Azure.configure() + .withPolicy(new CustomizedPolicy()) + .authenticate(credential, profile) + .withDefaultSubscription(); +``` + +## Custom HTTP Client + +Similar to the customized policy, there are changes regarding how the custom HTTP client is configured as well. The re-designed HTTP client builder in the new version is more flexible and the user can choose their own implementation of HTTP client and plug in what they need into the configuration. + +**In old version (`com.microsoft.azure-mgmt-**`)** + +```java +OkHttpClient.Builder builder = new OkHttpClient.Builder().proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 8888))); +RestClient client = new RestClient.Builder(builder, new Retrofit.Builder()) + .withCredentials(credential) + .build(); + +Azure azure = Azure.authenticate(client, "") + .withDefaultSubscription(); +``` + +**Equivalent in new version (`com.azure.resourcemanager.**`)** + +```java +HttpClient client = new OkHttpAsyncHttpClientBuilder() + .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("127.0.0.1", 8888))) + .build(); + +Azure azure = Azure.configure() + .withHttpClient(client) + .authenticate(credential, profile) + .withDefaultSubscription(); +``` + +## Error Handling + +There is a minor namespace change in the exception class. To be specific, the previous `CloudException` has been re-named to `ManagementException`. + +**In old version (`com.microsoft.azure-mgmt-**`)** + +```java +final String resourceGroupName = random(8); +try { + ResourceGroup resourceGroup = azure.resourceGroups().getByName(resourceGroupName); +} catch (CloudException e) { + System.err.printf("Response code: %s%n", e.body().code()); + System.err.printf("Response message: %s%n", e.body().message()); +} +``` + +**Equivalent in new version (`com.azure.resourcemanager.**`)** + +```java +final String resourceGroupName = randomString("rg", 8); +try { + ResourceGroup resourceGroup = azure.resourceGroups().getByName(resourceGroupName); +} catch (ManagementException e) { + System.err.printf("Response code: %s%n", e.getValue().getCode()); + System.err.printf("Response message: %s%n", e.getValue().getMessage()); +} +``` + +## rxJava -> Reactor + +In old version (`com.microsoft.azure-mgmt-**`), `rxJava` is used for non-blocking applications + +In new version (`com.azure.resourcemanager.**`), we have adopted `Reactor` as the main library in replacement of `rxJava` due to the Azure Core adoption. + +**In old version (`com.microsoft.azure-mgmt-**`)** + +```java +azure.publicIPAddresses().define(publicIpName).withRegion(region).withExistingResourceGroup(rgName).withLeafDomainLabel(publicIpName).createAsync().flatMap(new Func1 < Indexable, Observable < Indexable >> () {@Override + public Observable < Indexable > call(Indexable indexable) { + if (indexable instanceof PublicIPAddress) { + PublicIPAddress publicIp = (PublicIPAddress) indexable; + //============================================================= + // Create an Internet facing load balancer with + // One frontend IP address + // Two backend address pools which contain network interfaces for the virtual + // machines to receive HTTP and HTTPS network traffic from the load balancer + // Two load balancing rules for HTTP and HTTPS to map public ports on the load + // balancer to ports in the backend address pool + // Two probes which contain HTTP and HTTPS health probes used to check availability + // of virtual machines in the backend address pool + // Three inbound NAT rules which contain rules that map a public port on the load + // balancer to a port for a specific virtual machine in the backend address pool + // - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23 + + System.out.println("Creating a Internet facing load balancer with ..."); + System.out.println("- A frontend IP address"); + System.out.println("- Two backend address pools which contain network interfaces for the virtual\n" + " machines to receive HTTP and HTTPS network traffic from the load balancer"); + System.out.println("- Two load balancing rules for HTTP and HTTPS to map public ports on the load\n" + " balancer to ports in the backend address pool"); + System.out.println("- Two probes which contain HTTP and HTTPS health probes used to check availability\n" + " of virtual machines in the backend address pool"); + System.out.println("- Two inbound NAT rules which contain rules that map a public port on the load\n" + " balancer to a port for a specific virtual machine in the backend address pool\n" + " - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23"); + + return Observable.merge( + Observable.just(indexable), azure.loadBalancers().define(loadBalancerName1).withRegion(region).withExistingResourceGroup(rgName) + // Add two rules that uses above backend and probe + .defineLoadBalancingRule(httpLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(80).toBackend(backendPoolName1).withProbe(httpProbe).attach().defineLoadBalancingRule(httpsLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(443).toBackend(backendPoolName2).withProbe(httpsProbe).attach() + // Add nat pools to enable direct VM connectivity for + // SSH to port 22 and TELNET to port 23 + .defineInboundNatPool(natPool50XXto22).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(5000, 5099).toBackendPort(22).attach().defineInboundNatPool(natPool60XXto23).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(6000, 6099).toBackendPort(23).attach() + + // Explicitly define the frontend + .definePublicFrontend(frontendName).withExistingPublicIPAddress(publicIp).attach() + + // Add two probes one per rule + .defineHttpProbe(httpProbe).withRequestPath("/").withPort(80).attach().defineHttpProbe(httpsProbe).withRequestPath("/").withPort(443).attach() + + .createAsync()); + } + return Observable.just(indexable); + } +})).toBlocking().subscribe(new Action1 < Indexable > () {@Override + public void call(Indexable indexable) { + createdResources.add(indexable); + } +}); +``` + +[**Link to full sample**](https://github.com/Azure/azure-libraries-for-java/blob/master/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageVirtualMachineScaleSetAsync.java#L100) + + +**Equivalent in new version (`com.azure.resourcemanager.**`)** + +```java +final List < Indexable > createdResources = new ArrayList < >(); + +azure.resourceGroups().define(rgName).withRegion(region).create(); + +Flux.merge( +azure.networks().define(vnetName).withRegion(region).withExistingResourceGroup(rgName).withAddressSpace("172.16.0.0/16").defineSubnet("Front-end").withAddressPrefix("172.16.1.0/24").attach().createAsync(), azure.publicIpAddresses().define(publicIpName).withRegion(region).withExistingResourceGroup(rgName).withLeafDomainLabel(publicIpName).createAsync().flatMap(indexable - >{ + if (indexable instanceof PublicIpAddress) { + PublicIpAddress publicIp = (PublicIpAddress) indexable; + //============================================================= + // Create an Internet facing load balancer with + // One frontend IP address + // Two backend address pools which contain network interfaces for the virtual + // machines to receive HTTP and HTTPS network traffic from the load balancer + // Two load balancing rules for HTTP and HTTPS to map public ports on the load + // balancer to ports in the backend address pool + // Two probes which contain HTTP and HTTPS health probes used to check availability + // of virtual machines in the backend address pool + // Three inbound NAT rules which contain rules that map a public port on the load + // balancer to a port for a specific virtual machine in the backend address pool + // - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23 + + System.out.println("Creating a Internet facing load balancer with ..."); + System.out.println("- A frontend IP address"); + System.out.println("- Two backend address pools which contain network interfaces for the virtual\n" + " machines to receive HTTP and HTTPS network traffic from the load balancer"); + System.out.println("- Two load balancing rules for HTTP and HTTPS to map public ports on the load\n" + " balancer to ports in the backend address pool"); + System.out.println("- Two probes which contain HTTP and HTTPS health probes used to check availability\n" + " of virtual machines in the backend address pool"); + System.out.println("- Two inbound NAT rules which contain rules that map a public port on the load\n" + " balancer to a port for a specific virtual machine in the backend address pool\n" + " - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23"); + + return Flux.merge( + Flux.just(indexable), azure.loadBalancers().define(loadBalancerName1).withRegion(region).withExistingResourceGroup(rgName) + // Add two rules that uses above backend and probe + .defineLoadBalancingRule(httpLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(80).toBackend(backendPoolName1).withProbe(httpProbe).attach().defineLoadBalancingRule(httpsLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(443).toBackend(backendPoolName2).withProbe(httpsProbe).attach() + // Add nat pools to enable direct VM connectivity for + // SSH to port 22 and TELNET to port 23 + .defineInboundNatPool(natPool50XXto22).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(5000, 5099).toBackendPort(22).attach().defineInboundNatPool(natPool60XXto23).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(6000, 6099).toBackendPort(23).attach() + + // Explicitly define the frontend + .definePublicFrontend(frontendName).withExistingPublicIpAddress(publicIp).attach() + + // Add two probes one per rule + .defineHttpProbe(httpProbe).withRequestPath("/").withPort(80).attach().defineHttpProbe(httpsProbe).withRequestPath("/").withPort(443).attach().createAsync()); + } + return Flux.just(indexable); +})).flatMap(indexable - >{ + createdResources.add(indexable); + return Flux.just(indexable); +}).last().block(); +``` + +[**Link to full sample**](https://github.com/Azure/azure-sdk-for-java/blob/7beda69/sdk/management/samples/src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineScaleSetAsync.java#L98) + +## Additional Samples + +More samples can be found at : +- [README for new version of SDK](http://aka.ms/azure-sdk-java-mgmt) +- [Code Samples for Resource Management Libraries](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/SAMPLE.md) +- [Authentication Documentation](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/AUTH.md) From 2101fad0fed9151908d0f4f6e3c6d3775598c84f Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Wed, 8 Jul 2020 16:40:23 +0800 Subject: [PATCH 02/13] Upgrade migration guide --- sdk/management/docs/MIGRATION_GUIDE.md | 27 ++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/sdk/management/docs/MIGRATION_GUIDE.md b/sdk/management/docs/MIGRATION_GUIDE.md index cc054a7281bc..10397db80f81 100644 --- a/sdk/management/docs/MIGRATION_GUIDE.md +++ b/sdk/management/docs/MIGRATION_GUIDE.md @@ -6,15 +6,17 @@ to the next version of Azure resource management libraries (`com.microsoft.azure For users new to the Java SDK for resource management libraries, please see the [README for 'com.azure.resourcemanager.*`](http://aka.ms/azure-sdk-java-mgmt) ## Table of contents -* Prerequisites -* Updated Maven depedencies -* General Changes - * Authentication - * Customized Policy - * Custom HTTP Client - * Error Handling - * rxJava -> Reactor -* Additional Samples + +* [Prerequisites](#prerequisites) +* [Updated Maven depedencies](#updated-maven-dependecies) +* [General Changes](#general-changes) + * [Authentication](#authentication) + * [Customized Policy](#customized-policy) + * [Custom HTTP Client](#custom-http-client) + * [Error Handling](#error-handling) + * [rxJava -> Reactor](#rxjava-to-reactor) +* [Additional Samples](#additional-samples) +* [Need Help](#need-help?) ## Prerequisites @@ -156,7 +158,7 @@ try { } ``` -## rxJava -> Reactor +## rxJava to Reactor In old version (`com.microsoft.azure-mgmt-**`), `rxJava` is used for non-blocking applications @@ -277,3 +279,8 @@ More samples can be found at : - [README for new version of SDK](http://aka.ms/azure-sdk-java-mgmt) - [Code Samples for Resource Management Libraries](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/SAMPLE.md) - [Authentication Documentation](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/AUTH.md) + +## Need help? +---------- + +If you have encountered an issue during migration, please file an issue via [Github Issues](https://github.com/Azure/azure-sdk-for-java/issues) and make sure you add the "Preview" label to the issue From c0504a85c68bbef0b3d43bb373b08ef28986efe4 Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Wed, 8 Jul 2020 16:40:54 +0800 Subject: [PATCH 03/13] Remove need help link --- sdk/management/docs/MIGRATION_GUIDE.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/management/docs/MIGRATION_GUIDE.md b/sdk/management/docs/MIGRATION_GUIDE.md index 10397db80f81..7f13f0b580ed 100644 --- a/sdk/management/docs/MIGRATION_GUIDE.md +++ b/sdk/management/docs/MIGRATION_GUIDE.md @@ -16,7 +16,6 @@ For users new to the Java SDK for resource management libraries, please see the * [Error Handling](#error-handling) * [rxJava -> Reactor](#rxjava-to-reactor) * [Additional Samples](#additional-samples) -* [Need Help](#need-help?) ## Prerequisites From 86d00f6db54ae46b22e51ccfe72d0d48671d071f Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Wed, 8 Jul 2020 16:41:22 +0800 Subject: [PATCH 04/13] Remove extra line --- sdk/management/docs/MIGRATION_GUIDE.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/management/docs/MIGRATION_GUIDE.md b/sdk/management/docs/MIGRATION_GUIDE.md index 7f13f0b580ed..5869cf901d4d 100644 --- a/sdk/management/docs/MIGRATION_GUIDE.md +++ b/sdk/management/docs/MIGRATION_GUIDE.md @@ -280,6 +280,5 @@ More samples can be found at : - [Authentication Documentation](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/AUTH.md) ## Need help? ----------- If you have encountered an issue during migration, please file an issue via [Github Issues](https://github.com/Azure/azure-sdk-for-java/issues) and make sure you add the "Preview" label to the issue From b4b37b717b014aaebe1925d9070183dbe58a19df Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Wed, 8 Jul 2020 16:42:30 +0800 Subject: [PATCH 05/13] Fix link --- sdk/management/docs/MIGRATION_GUIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/management/docs/MIGRATION_GUIDE.md b/sdk/management/docs/MIGRATION_GUIDE.md index 5869cf901d4d..49dd1bec7792 100644 --- a/sdk/management/docs/MIGRATION_GUIDE.md +++ b/sdk/management/docs/MIGRATION_GUIDE.md @@ -8,7 +8,7 @@ For users new to the Java SDK for resource management libraries, please see the ## Table of contents * [Prerequisites](#prerequisites) -* [Updated Maven depedencies](#updated-maven-dependecies) +* [Updated Maven depedencies](#updated-maven-dependencies) * [General Changes](#general-changes) * [Authentication](#authentication) * [Customized Policy](#customized-policy) From 1dcb49d82a4b984cde329ba140e610a9ee56eb5b Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Wed, 8 Jul 2020 16:49:28 +0800 Subject: [PATCH 06/13] Update readme --- sdk/management/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/management/README.md b/sdk/management/README.md index 874c196e932a..ffe7acb89905 100644 --- a/sdk/management/README.md +++ b/sdk/management/README.md @@ -3,9 +3,13 @@ The Azure Management Libraries for Java is a higher-level, object-oriented API for *managing* Azure resources, that is optimized for ease of use, succinctness and consistency. -- [API reference documentation][docs] +- **[API reference documentation][docs]** - **[Code snippets and samples][sample]** +## Migration from older version of Azure management library (``com.microsoft.azure-mgmt-**``) + +If you are an existing user of the older version of Azure management library for Java (the packages that contains ``com.microsoft.azure-mgmt-**``) and you are looking for a migration guide to the new version of the SDK, please refer to [this migration guide](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/MIGRATION_GUIDE.md) + ## Getting started ### Prerequisites From 149b62aa5050c81d3d0b6a21f3953461c977bc30 Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Wed, 8 Jul 2020 16:53:10 +0800 Subject: [PATCH 07/13] Update readme --- sdk/management/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/management/README.md b/sdk/management/README.md index ffe7acb89905..70f9490c953b 100644 --- a/sdk/management/README.md +++ b/sdk/management/README.md @@ -3,10 +3,14 @@ The Azure Management Libraries for Java is a higher-level, object-oriented API for *managing* Azure resources, that is optimized for ease of use, succinctness and consistency. +## Documentation + +Various documentation is available to help you get started + - **[API reference documentation][docs]** - **[Code snippets and samples][sample]** -## Migration from older version of Azure management library (``com.microsoft.azure-mgmt-**``) +## Migration from older version of Azure management library If you are an existing user of the older version of Azure management library for Java (the packages that contains ``com.microsoft.azure-mgmt-**``) and you are looking for a migration guide to the new version of the SDK, please refer to [this migration guide](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/MIGRATION_GUIDE.md) From f8266545fbe432a19885d08dcce3ed151953088a Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Wed, 8 Jul 2020 17:23:45 +0800 Subject: [PATCH 08/13] Review comments --- sdk/management/docs/MIGRATION_GUIDE.md | 226 +++++++++++++------------ 1 file changed, 122 insertions(+), 104 deletions(-) diff --git a/sdk/management/docs/MIGRATION_GUIDE.md b/sdk/management/docs/MIGRATION_GUIDE.md index 49dd1bec7792..ca29bbc6bdcc 100644 --- a/sdk/management/docs/MIGRATION_GUIDE.md +++ b/sdk/management/docs/MIGRATION_GUIDE.md @@ -1,7 +1,7 @@ -## Guide for migrating to `com.azure.resourcemanager.**` from `com.microsoft.azure-mgmt-**` +## Guide for migrating to `com.azure.resourcemanager.**` from `com.microsoft.azure.management.**` -This document is intended for users that are familiar with an older version of the Java SDK for managment libraries (`com.microsoft.azure-mgmt-**`) ad wish to migrate their application -to the next version of Azure resource management libraries (`com.microsoft.azure-mgmt-**`) +This document is intended for users that are familiar with an older version of the Java SDK for managment libraries (`com.microsoft.azure.management.**`) ad wish to migrate their application +to the next version of Azure resource management libraries (`com.azure.resourcemanager.**`) For users new to the Java SDK for resource management libraries, please see the [README for 'com.azure.resourcemanager.*`](http://aka.ms/azure-sdk-java-mgmt) @@ -37,16 +37,16 @@ The important breaking changes are listed in the following sections: ### Authentication -In old version (`com.microsoft.azure-mgmt-**`), ApplicationTokenCredentials is created with all the credential parameters. +In old version (`com.microsoft.azure.management.**`), ApplicationTokenCredentials is created with all the credential parameters. In new version (`com.azure.resourcemanager.**`), in order to provide an unified authentication based on Azure Identity for all Azure Java SDKs, the authentication mechanism has been re-designed and improved to offer a simpler interface. To the show the code snippets for the change: -**In old version (`com.microsoft.azure-mgmt-**`)** +**In old version (`com.microsoft.azure.management.**`)** ```java -ApplicationTokenCredentials = new ApplicationTokenCredentials("", "", "", AzureEnvironment.AZURE) +ApplicationTokenCredential = new ApplicationTokenCredentials("", "", "", AzureEnvironment.AZURE) .withDefaultSubscriptionId(""); ``` @@ -63,7 +63,7 @@ AzureProfile profile = new AzureProfile("", "", AzureE In addition to this change, the **support for using auth file has been removed**. In old version, the user can choose to authenticate via the auth file, like this: -**In old version (`com.microsoft.azure-mgmt-**`)** +**In old version (`com.microsoft.azure.management.**`)** ```java Azure azure = Azure.authenticate(new File("my.azureauth")).withDefaultSubscription(); @@ -76,13 +76,13 @@ For detailed information on the benefits of using the new authentication classes Because of adopting Azure Core which is a shared library across all Azure SDKs, there is also a minor change regarding how customized policy in configured. -In old version (`com.microsoft.azure-mgmt-**`), we use `withInterceptor` and pass the customized interceptor class to the Azure object +In old version (`com.microsoft.azure.management.**`), we use `withInterceptor` and pass the customized interceptor class to the Azure object -In new version (`com.azure.resourcemanager.**`), we use `WithPolicy` instead and pass the customized policy to the Azure object +In new version (`com.azure.resourcemanager.**`), we use `WithPolicy` instead and pass the customized policy to the Azure object. It's also worth mentioning that the implementation of `HttpPipelinePolicy` is different from that of `Interceptor` from okhttp. So: -**In old version (`com.microsoft.azure-mgmt-**`)** +**In old version (`com.microsoft.azure.management.**`)** ```java Azure azure = Azure.configure() @@ -104,7 +104,7 @@ Azure azure = Azure.configure() Similar to the customized policy, there are changes regarding how the custom HTTP client is configured as well. The re-designed HTTP client builder in the new version is more flexible and the user can choose their own implementation of HTTP client and plug in what they need into the configuration. -**In old version (`com.microsoft.azure-mgmt-**`)** +**In old version (`com.microsoft.azure.management.**`)** ```java OkHttpClient.Builder builder = new OkHttpClient.Builder().proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 8888))); @@ -133,7 +133,7 @@ Azure azure = Azure.configure() There is a minor namespace change in the exception class. To be specific, the previous `CloudException` has been re-named to `ManagementException`. -**In old version (`com.microsoft.azure-mgmt-**`)** +**In old version (`com.microsoft.azure.management.**`)** ```java final String resourceGroupName = random(8); @@ -159,59 +159,65 @@ try { ## rxJava to Reactor -In old version (`com.microsoft.azure-mgmt-**`), `rxJava` is used for non-blocking applications +In old version (`com.microsoft.azure.management.**`), `rxJava` is used for non-blocking applications In new version (`com.azure.resourcemanager.**`), we have adopted `Reactor` as the main library in replacement of `rxJava` due to the Azure Core adoption. -**In old version (`com.microsoft.azure-mgmt-**`)** +**In old version (`com.microsoft.azure.management.**`)** ```java -azure.publicIPAddresses().define(publicIpName).withRegion(region).withExistingResourceGroup(rgName).withLeafDomainLabel(publicIpName).createAsync().flatMap(new Func1 < Indexable, Observable < Indexable >> () {@Override - public Observable < Indexable > call(Indexable indexable) { - if (indexable instanceof PublicIPAddress) { - PublicIPAddress publicIp = (PublicIPAddress) indexable; - //============================================================= - // Create an Internet facing load balancer with - // One frontend IP address - // Two backend address pools which contain network interfaces for the virtual - // machines to receive HTTP and HTTPS network traffic from the load balancer - // Two load balancing rules for HTTP and HTTPS to map public ports on the load - // balancer to ports in the backend address pool - // Two probes which contain HTTP and HTTPS health probes used to check availability - // of virtual machines in the backend address pool - // Three inbound NAT rules which contain rules that map a public port on the load - // balancer to a port for a specific virtual machine in the backend address pool - // - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23 - - System.out.println("Creating a Internet facing load balancer with ..."); - System.out.println("- A frontend IP address"); - System.out.println("- Two backend address pools which contain network interfaces for the virtual\n" + " machines to receive HTTP and HTTPS network traffic from the load balancer"); - System.out.println("- Two load balancing rules for HTTP and HTTPS to map public ports on the load\n" + " balancer to ports in the backend address pool"); - System.out.println("- Two probes which contain HTTP and HTTPS health probes used to check availability\n" + " of virtual machines in the backend address pool"); - System.out.println("- Two inbound NAT rules which contain rules that map a public port on the load\n" + " balancer to a port for a specific virtual machine in the backend address pool\n" + " - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23"); - - return Observable.merge( - Observable.just(indexable), azure.loadBalancers().define(loadBalancerName1).withRegion(region).withExistingResourceGroup(rgName) - // Add two rules that uses above backend and probe - .defineLoadBalancingRule(httpLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(80).toBackend(backendPoolName1).withProbe(httpProbe).attach().defineLoadBalancingRule(httpsLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(443).toBackend(backendPoolName2).withProbe(httpsProbe).attach() - // Add nat pools to enable direct VM connectivity for - // SSH to port 22 and TELNET to port 23 - .defineInboundNatPool(natPool50XXto22).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(5000, 5099).toBackendPort(22).attach().defineInboundNatPool(natPool60XXto23).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(6000, 6099).toBackendPort(23).attach() - - // Explicitly define the frontend - .definePublicFrontend(frontendName).withExistingPublicIPAddress(publicIp).attach() - - // Add two probes one per rule - .defineHttpProbe(httpProbe).withRequestPath("/").withPort(80).attach().defineHttpProbe(httpsProbe).withRequestPath("/").withPort(443).attach() - - .createAsync()); - } - return Observable.just(indexable); - } -})).toBlocking().subscribe(new Action1 < Indexable > () {@Override - public void call(Indexable indexable) { - createdResources.add(indexable); - } +azure.publicIPAddresses() + .define(publicIpName) + .withRegion(region) + .withExistingResourceGroup(rgName) + .withLeafDomainLabel(publicIpName) + .createAsync().flatMap(new Func1 < Indexable, Observable < Indexable >> () { + @Override + public Observable < Indexable > call(Indexable indexable) { + if (indexable instanceof PublicIPAddress) { + PublicIPAddress publicIp = (PublicIPAddress) indexable; + //============================================================= + // Create an Internet facing load balancer with + // One frontend IP address + // Two backend address pools which contain network interfaces for the virtual + // machines to receive HTTP and HTTPS network traffic from the load balancer + // Two load balancing rules for HTTP and HTTPS to map public ports on the load + // balancer to ports in the backend address pool + // Two probes which contain HTTP and HTTPS health probes used to check availability + // of virtual machines in the backend address pool + // Three inbound NAT rules which contain rules that map a public port on the load + // balancer to a port for a specific virtual machine in the backend address pool + // - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23 + System.out.println("Creating a Internet facing load balancer with ..."); + System.out.println("- A frontend IP address"); + System.out.println("- Two backend address pools which contain network interfaces for the virtual\n" + " machines to receive HTTP and HTTPS network traffic from the load balancer"); + System.out.println("- Two load balancing rules for HTTP and HTTPS to map public ports on the load\n" + " balancer to ports in the backend address pool"); + System.out.println("- Two probes which contain HTTP and HTTPS health probes used to check availability\n" + " of virtual machines in the backend address pool"); + System.out.println("- Two inbound NAT rules which contain rules that map a public port on the load\n" + " balancer to a port for a specific virtual machine in the backend address pool\n" + " - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23"); + + return Observable.merge( + Observable.just(indexable), azure.loadBalancers().define(loadBalancerName1).withRegion(region).withExistingResourceGroup(rgName) + // Add two rules that uses above backend and probe + .defineLoadBalancingRule(httpLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(80).toBackend(backendPoolName1).withProbe(httpProbe).attach().defineLoadBalancingRule(httpsLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(443).toBackend(backendPoolName2).withProbe(httpsProbe).attach() + // Add nat pools to enable direct VM connectivity for + // SSH to port 22 and TELNET to port 23 + + .defineInboundNatPool(natPool50XXto22).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(5000, 5099).toBackendPort(22).attach().defineInboundNatPool(natPool60XXto23).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(6000, 6099).toBackendPort(23).attach() + + // Explicitly define the frontend + .definePublicFrontend(frontendName).withExistingPublicIPAddress(publicIp).attach + + // Add two probes one per rule + .defineHttpProbe(httpProbe).withRequestPath("/").withPort(80).attach().defineHttpProbe(httpsProbe).withRequestPath("/").withPort(443).attach() + .createAsync()); + } + return Observable.just(indexable); + } + })).toBlocking().subscribe(new Action1 < Indexable > () { + @Override + public void call(Indexable indexable) { + createdResources.add(indexable); + } }); ``` @@ -221,52 +227,64 @@ azure.publicIPAddresses().define(publicIpName).withRegion(region).withExistingRe **Equivalent in new version (`com.azure.resourcemanager.**`)** ```java -final List < Indexable > createdResources = new ArrayList < >(); - +final List < Indexable > createdResources = new ArrayList < > (); azure.resourceGroups().define(rgName).withRegion(region).create(); - Flux.merge( -azure.networks().define(vnetName).withRegion(region).withExistingResourceGroup(rgName).withAddressSpace("172.16.0.0/16").defineSubnet("Front-end").withAddressPrefix("172.16.1.0/24").attach().createAsync(), azure.publicIpAddresses().define(publicIpName).withRegion(region).withExistingResourceGroup(rgName).withLeafDomainLabel(publicIpName).createAsync().flatMap(indexable - >{ - if (indexable instanceof PublicIpAddress) { - PublicIpAddress publicIp = (PublicIpAddress) indexable; - //============================================================= - // Create an Internet facing load balancer with - // One frontend IP address - // Two backend address pools which contain network interfaces for the virtual - // machines to receive HTTP and HTTPS network traffic from the load balancer - // Two load balancing rules for HTTP and HTTPS to map public ports on the load - // balancer to ports in the backend address pool - // Two probes which contain HTTP and HTTPS health probes used to check availability - // of virtual machines in the backend address pool - // Three inbound NAT rules which contain rules that map a public port on the load - // balancer to a port for a specific virtual machine in the backend address pool - // - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23 - - System.out.println("Creating a Internet facing load balancer with ..."); - System.out.println("- A frontend IP address"); - System.out.println("- Two backend address pools which contain network interfaces for the virtual\n" + " machines to receive HTTP and HTTPS network traffic from the load balancer"); - System.out.println("- Two load balancing rules for HTTP and HTTPS to map public ports on the load\n" + " balancer to ports in the backend address pool"); - System.out.println("- Two probes which contain HTTP and HTTPS health probes used to check availability\n" + " of virtual machines in the backend address pool"); - System.out.println("- Two inbound NAT rules which contain rules that map a public port on the load\n" + " balancer to a port for a specific virtual machine in the backend address pool\n" + " - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23"); - - return Flux.merge( - Flux.just(indexable), azure.loadBalancers().define(loadBalancerName1).withRegion(region).withExistingResourceGroup(rgName) - // Add two rules that uses above backend and probe - .defineLoadBalancingRule(httpLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(80).toBackend(backendPoolName1).withProbe(httpProbe).attach().defineLoadBalancingRule(httpsLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(443).toBackend(backendPoolName2).withProbe(httpsProbe).attach() - // Add nat pools to enable direct VM connectivity for - // SSH to port 22 and TELNET to port 23 - .defineInboundNatPool(natPool50XXto22).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(5000, 5099).toBackendPort(22).attach().defineInboundNatPool(natPool60XXto23).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(6000, 6099).toBackendPort(23).attach() - - // Explicitly define the frontend - .definePublicFrontend(frontendName).withExistingPublicIpAddress(publicIp).attach() - - // Add two probes one per rule - .defineHttpProbe(httpProbe).withRequestPath("/").withPort(80).attach().defineHttpProbe(httpsProbe).withRequestPath("/").withPort(443).attach().createAsync()); - } - return Flux.just(indexable); -})).flatMap(indexable - >{ - createdResources.add(indexable); - return Flux.just(indexable); + azure.networks() + .define(vnetName) + .withRegion(region) + .withExistingResourceGroup(rgName) + .withAddressSpace("172.16.0.0/16") + .defineSubnet("Front-end") + .withAddressPrefix("172.16.1.0/24") + .attach() + .createAsync(), + azure.publicIpAddresses() + .define(publicIpName) + .withRegion(region) + .withExistingResourceGroup(rgName) + .withLeafDomainLabel(publicIpName) + .createAsync().flatMap(indexable - > { + if (indexable instanceof PublicIpAddress) { + PublicIpAddress publicIp = (PublicIpAddress) indexable; + //============================================================= + // Create an Internet facing load balancer with + // One frontend IP address + // Two backend address pools which contain network interfaces for the virtual + // machines to receive HTTP and HTTPS network traffic from the load balancer + // Two load balancing rules for HTTP and HTTPS to map public ports on the load + // balancer to ports in the backend address pool + // Two probes which contain HTTP and HTTPS health probes used to check availability + // of virtual machines in the backend address pool + // Three inbound NAT rules which contain rules that map a public port on the load + // balancer to a port for a specific virtual machine in the backend address pool + // - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23 + + System.out.println("Creating a Internet facing load balancer with ..."); + System.out.println("- A frontend IP address"); + System.out.println("- Two backend address pools which contain network interfaces for the virtual\n" + " machines to receive HTTP and HTTPS network traffic from the load balancer"); + System.out.println("- Two load balancing rules for HTTP and HTTPS to map public ports on the load\n" + " balancer to ports in the backend address pool"); + System.out.println("- Two probes which contain HTTP and HTTPS health probes used to check availability\n" + " of virtual machines in the backend address pool"); + System.out.println("- Two inbound NAT rules which contain rules that map a public port on the load\n" + " balancer to a port for a specific virtual machine in the backend address pool\n" + " - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23"); + + return Flux.merge( + Flux.just(indexable), azure.loadBalancers().define(loadBalancerName1).withRegion(region).withExistingResourceGroup(rgName) + // Add two rules that uses above backend and probe + .defineLoadBalancingRule(httpLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(80).toBackend(backendPoolName1).withProbe(httpProbe).attach().defineLoadBalancingRule(httpsLoadBalancingRule).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPort(443).toBackend(backendPoolName2).withProbe(httpsProbe).attach() + // Add nat pools to enable direct VM connectivity for + // SSH to port 22 and TELNET to port 23 + .defineInboundNatPool(natPool50XXto22).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(5000, 5099).toBackendPort(22).attach().defineInboundNatPool(natPool60XXto23).withProtocol(TransportProtocol.TCP).fromFrontend(frontendName).fromFrontendPortRange(6000, 6099).toBackendPort(23).attach() + + // Explicitly define the frontend + .definePublicFrontend(frontendName).withExistingPublicIpAddress(publicIp).attach() + + // Add two probes one per rule + .defineHttpProbe(httpProbe).withRequestPath("/").withPort(80).attach().defineHttpProbe(httpsProbe).withRequestPath("/").withPort(443).attach().createAsync()); + } + return Flux.just(indexable); + })).flatMap(indexable - > { + createdResources.add(indexable); + return Flux.just(indexable); }).last().block(); ``` From 74b21e57876fa3b6385869c4df41fec721ea6208 Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Thu, 9 Jul 2020 10:21:37 +0800 Subject: [PATCH 09/13] Update resource group example --- sdk/management/docs/MIGRATION_GUIDE.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sdk/management/docs/MIGRATION_GUIDE.md b/sdk/management/docs/MIGRATION_GUIDE.md index ca29bbc6bdcc..f55ed9df2867 100644 --- a/sdk/management/docs/MIGRATION_GUIDE.md +++ b/sdk/management/docs/MIGRATION_GUIDE.md @@ -136,9 +136,11 @@ There is a minor namespace change in the exception class. To be specific, the pr **In old version (`com.microsoft.azure.management.**`)** ```java -final String resourceGroupName = random(8); +final String resourceGroupName = "invalid resource group name"; try { - ResourceGroup resourceGroup = azure.resourceGroups().getByName(resourceGroupName); + azure.resourceGroups().define(resourceGroupName) + .withRegion(Region.US_WEST2) + .create(); } catch (CloudException e) { System.err.printf("Response code: %s%n", e.body().code()); System.err.printf("Response message: %s%n", e.body().message()); @@ -148,9 +150,11 @@ try { **Equivalent in new version (`com.azure.resourcemanager.**`)** ```java -final String resourceGroupName = randomString("rg", 8); +final String resourceGroupName = "invalid resource group name"; try { - ResourceGroup resourceGroup = azure.resourceGroups().getByName(resourceGroupName); + azure.resourceGroups().define(resourceGroupName) + .withRegion(Region.US_WEST2) + .create(); } catch (ManagementException e) { System.err.printf("Response code: %s%n", e.getValue().getCode()); System.err.printf("Response message: %s%n", e.getValue().getMessage()); From be2ecf0ca5555628053ceca28ef9597eb8912d09 Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Thu, 9 Jul 2020 13:44:33 +0800 Subject: [PATCH 10/13] Update readme --- sdk/management/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/management/README.md b/sdk/management/README.md index 70f9490c953b..c467c3cb3b8f 100644 --- a/sdk/management/README.md +++ b/sdk/management/README.md @@ -12,7 +12,7 @@ Various documentation is available to help you get started ## Migration from older version of Azure management library -If you are an existing user of the older version of Azure management library for Java (the packages that contains ``com.microsoft.azure-mgmt-**``) and you are looking for a migration guide to the new version of the SDK, please refer to [this migration guide](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/MIGRATION_GUIDE.md) +If you are an existing user of the older version of Azure management library for Java (the packages that contains ``com.microsoft.azure.management.**``) and you are looking for a migration guide to the new version of the SDK, please refer to [this migration guide](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/MIGRATION_GUIDE.md) ## Getting started From 80ed80d3856fea3956cc8c94b8c11662ccb298d7 Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Thu, 9 Jul 2020 13:45:18 +0800 Subject: [PATCH 11/13] Update migration guide --- sdk/management/docs/MIGRATION_GUIDE.md | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/sdk/management/docs/MIGRATION_GUIDE.md b/sdk/management/docs/MIGRATION_GUIDE.md index f55ed9df2867..efd22e608f6e 100644 --- a/sdk/management/docs/MIGRATION_GUIDE.md +++ b/sdk/management/docs/MIGRATION_GUIDE.md @@ -192,13 +192,7 @@ azure.publicIPAddresses() // Three inbound NAT rules which contain rules that map a public port on the load // balancer to a port for a specific virtual machine in the backend address pool // - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23 - System.out.println("Creating a Internet facing load balancer with ..."); - System.out.println("- A frontend IP address"); - System.out.println("- Two backend address pools which contain network interfaces for the virtual\n" + " machines to receive HTTP and HTTPS network traffic from the load balancer"); - System.out.println("- Two load balancing rules for HTTP and HTTPS to map public ports on the load\n" + " balancer to ports in the backend address pool"); - System.out.println("- Two probes which contain HTTP and HTTPS health probes used to check availability\n" + " of virtual machines in the backend address pool"); - System.out.println("- Two inbound NAT rules which contain rules that map a public port on the load\n" + " balancer to a port for a specific virtual machine in the backend address pool\n" + " - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23"); - + return Observable.merge( Observable.just(indexable), azure.loadBalancers().define(loadBalancerName1).withRegion(region).withExistingResourceGroup(rgName) // Add two rules that uses above backend and probe @@ -263,14 +257,7 @@ Flux.merge( // Three inbound NAT rules which contain rules that map a public port on the load // balancer to a port for a specific virtual machine in the backend address pool // - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23 - - System.out.println("Creating a Internet facing load balancer with ..."); - System.out.println("- A frontend IP address"); - System.out.println("- Two backend address pools which contain network interfaces for the virtual\n" + " machines to receive HTTP and HTTPS network traffic from the load balancer"); - System.out.println("- Two load balancing rules for HTTP and HTTPS to map public ports on the load\n" + " balancer to ports in the backend address pool"); - System.out.println("- Two probes which contain HTTP and HTTPS health probes used to check availability\n" + " of virtual machines in the backend address pool"); - System.out.println("- Two inbound NAT rules which contain rules that map a public port on the load\n" + " balancer to a port for a specific virtual machine in the backend address pool\n" + " - this provides direct VM connectivity for SSH to port 22 and TELNET to port 23"); - + return Flux.merge( Flux.just(indexable), azure.loadBalancers().define(loadBalancerName1).withRegion(region).withExistingResourceGroup(rgName) // Add two rules that uses above backend and probe From 9c8e5f1956e423fba8ea684e4b4744cc88a8faff Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Thu, 9 Jul 2020 13:47:03 +0800 Subject: [PATCH 12/13] Update readme --- sdk/management/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/management/README.md b/sdk/management/README.md index c467c3cb3b8f..8d0560d12f78 100644 --- a/sdk/management/README.md +++ b/sdk/management/README.md @@ -12,7 +12,7 @@ Various documentation is available to help you get started ## Migration from older version of Azure management library -If you are an existing user of the older version of Azure management library for Java (the packages that contains ``com.microsoft.azure.management.**``) and you are looking for a migration guide to the new version of the SDK, please refer to [this migration guide](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/MIGRATION_GUIDE.md) +If you are an existing user of the older version of Azure management library for Java (the namespace of old packages contains ``com.microsoft.azure.management.**``) and you are looking for a migration guide to the new version of the SDK, please refer to [this migration guide](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/MIGRATION_GUIDE.md) ## Getting started From a37c04d2d1671ec5d12c89f0a310178f0bf063a8 Mon Sep 17 00:00:00 2001 From: nickzhums <56864335+nickzhums@users.noreply.github.com> Date: Thu, 9 Jul 2020 14:26:52 +0800 Subject: [PATCH 13/13] Update readme --- sdk/management/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/management/README.md b/sdk/management/README.md index 8d0560d12f78..647a346676d1 100644 --- a/sdk/management/README.md +++ b/sdk/management/README.md @@ -12,7 +12,7 @@ Various documentation is available to help you get started ## Migration from older version of Azure management library -If you are an existing user of the older version of Azure management library for Java (the namespace of old packages contains ``com.microsoft.azure.management.**``) and you are looking for a migration guide to the new version of the SDK, please refer to [this migration guide](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/MIGRATION_GUIDE.md) +If you are an existing user of the older version of Azure management library for Java (the namespace of old packages contains ``com.microsoft.azure.management.**``) and you are looking for a migration guide to the new version of the SDK, please refer to [this migration guide here](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/management/docs/MIGRATION_GUIDE.md) ## Getting started