Skip to content

Commit f89b36d

Browse files
Release 2.10.0
1 parent 24f6c24 commit f89b36d

File tree

4 files changed

+214
-135
lines changed

4 files changed

+214
-135
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extensions:
2323

2424
To run this sample:
2525

26-
See [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/identity/azure-identity#defaultazurecredential) and prepare the authentication works best for you. For more details on authentication, please refer to [AUTH.md](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md).
26+
See [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#defaultazurecredential) and prepare the authentication works best for you. For more details on authentication, please refer to [AUTH.md](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md).
2727

2828
git clone https://github.com/Azure-Samples/managed-disk-java-create-virtual-machine-using-specialized-disk-from-VHD.git
2929

pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,17 @@
5454
<dependency>
5555
<groupId>com.azure.resourcemanager</groupId>
5656
<artifactId>azure-resourcemanager</artifactId>
57-
<version>2.1.0</version>
57+
<version>2.10.0</version>
5858
</dependency>
5959
<dependency>
6060
<groupId>com.azure</groupId>
6161
<artifactId>azure-identity</artifactId>
62-
<version>1.2.0</version>
62+
<version>1.4.1</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>com.jcraft</groupId>
66+
<artifactId>jsch</artifactId>
67+
<version>0.1.55</version>
6368
</dependency>
6469
<dependency>
6570
<groupId>commons-net</groupId>

src/main/java/com/azure/resourcemanager/compute/samples/CreateVirtualMachineUsingSpecializedDiskFromVhd.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ public static boolean runSample(AzureResourceManager azureResourceManager) {
4646
final String publicIpDnsLabel = Utils.randomResourceName(azureResourceManager, "pip", 15);
4747
final String storageAccountName = Utils.randomResourceName(azureResourceManager, "stg", 15);
4848
final String userName = "tirekicker";
49-
final String password = Utils.password();
50-
final Region region = Region.US_WEST_CENTRAL;
49+
final String sshPublicKey = Utils.sshPublicKey();
50+
final Region region = Region.US_WEST;
5151

52-
final String apacheInstallScript = "https://raw.githubusercontent.com/Azure/azure-sdk-for-java/master/sdk/resourcemanager/azure-resourcemanager-samples/src/main/resources/install_apache.sh";
52+
final String apacheInstallScript = "https://raw.githubusercontent.com/Azure/azure-sdk-for-java/main/sdk/resourcemanager/azure-resourcemanager-samples/src/main/resources/install_apache.sh";
5353
final String apacheInstallCommand = "bash install_apache.sh";
5454
List<String> apacheInstallScriptUris = new ArrayList<>();
5555
apacheInstallScriptUris.add(apacheInstallScript);
@@ -67,7 +67,7 @@ public static boolean runSample(AzureResourceManager azureResourceManager) {
6767
.withNewPrimaryPublicIPAddress(publicIpDnsLabel)
6868
.withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS)
6969
.withRootUsername(userName)
70-
.withRootPassword(password)
70+
.withSsh(sshPublicKey)
7171
.withUnmanagedDisks()
7272
.defineUnmanagedDataDisk("disk-1")
7373
.withNewVhd(50)

0 commit comments

Comments
 (0)