Skip to content

Commit a923bb5

Browse files
author
SDKAuto
committed
CodeGen from PR 34558 in Azure/azure-rest-api-specs
Merge d647d5c5c399829b076a2ea8b7a5253f613dacbf into 761d8b58e465b26eddb8ad70dda3cde7b4228bdf
1 parent 0ad6db6 commit a923bb5

File tree

198 files changed

+6174
-9184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+6174
-9184
lines changed

sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md

+448-4
Large diffs are not rendered by default.

sdk/hdinsight/azure-resourcemanager-hdinsight/README.md

+57-66
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager HDInsight client library for Java.
44

5-
This package contains Microsoft Azure SDK for HDInsight Management SDK. HDInsight Management Client. Package tag package-2024-08-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for HDInsight Management SDK. HDInsight Management Client. Package tag package-2025-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
HDInsightManager manager = HDInsightManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -71,75 +71,68 @@ See [API design][design] for general introduction on design and key concepts on
7171
## Examples
7272

7373
```java
74-
com.azure.resourcemanager.storage.models.StorageAccount storageAccount =
75-
storageManager.storageAccounts().define(storageName)
76-
.withRegion(REGION)
77-
.withExistingResourceGroup(resourceGroupName)
78-
.withSku(StorageAccountSkuType.STANDARD_LRS)
79-
.withMinimumTlsVersion(MinimumTlsVersion.TLS1_0)
80-
.withAccessFromAzureServices()
81-
.withAccessFromAllNetworks()
82-
.create();
74+
com.azure.resourcemanager.storage.models.StorageAccount storageAccount = storageManager.storageAccounts()
75+
.define(storageName)
76+
.withRegion(REGION)
77+
.withExistingResourceGroup(resourceGroupName)
78+
.withSku(StorageAccountSkuType.STANDARD_LRS)
79+
.withMinimumTlsVersion(MinimumTlsVersion.TLS1_0)
80+
.withAccessFromAzureServices()
81+
.withAccessFromAllNetworks()
82+
.create();
8383

8484
BlobContainer blobContainer = storageManager.blobContainers()
8585
.defineContainer(containerName)
8686
.withExistingStorageAccount(storageAccount)
8787
.withPublicAccess(PublicAccess.NONE)
8888
.create();
8989

90-
cluster = hdInsightManager.clusters()
91-
.define(clusterName)
92-
.withExistingResourceGroup(resourceGroupName)
93-
.withRegion(REGION)
94-
.withProperties(
95-
new ClusterCreateProperties()
96-
.withClusterVersion("4.0.3000.1")
97-
.withOsType(OSType.LINUX)
98-
.withClusterDefinition(
99-
new ClusterDefinition()
100-
.withKind("SPARK")
90+
cluster
91+
= hdInsightManager.clusters()
92+
.define(clusterName)
93+
.withExistingResourceGroup(resourceGroupName)
94+
.withRegion(REGION)
95+
.withProperties(
96+
new ClusterCreateProperties().withClusterVersion("4.0.3000.1")
97+
.withOsType(OSType.LINUX)
98+
.withClusterDefinition(new ClusterDefinition().withKind("SPARK")
10199
.withConfigurations(Collections.unmodifiableMap(clusterDefinition)))
102-
.withComputeProfile(
103-
new ComputeProfile()
104-
.withRoles(
105-
Arrays.asList(
106-
new Role().withName("headnode")
107-
.withTargetInstanceCount(2)
108-
.withHardwareProfile(new HardwareProfile().withVmSize("standard_e8_v3"))
109-
.withOsProfile(osProfile)
110-
.withEncryptDataDisks(false),
111-
new Role().withName("workernode")
112-
.withTargetInstanceCount(4)
113-
.withHardwareProfile(new HardwareProfile().withVmSize("standard_e8_v3"))
114-
.withOsProfile(osProfile)
115-
.withEncryptDataDisks(false),
116-
new Role().withName("zookeepernode")
117-
.withTargetInstanceCount(3)
118-
.withHardwareProfile(new HardwareProfile().withVmSize("standard_a2_v2"))
119-
.withOsProfile(osProfile)
120-
.withEncryptDataDisks(false)
121-
)))
122-
.withTier(Tier.STANDARD)
123-
.withEncryptionInTransitProperties(
124-
new EncryptionInTransitProperties()
125-
.withIsEncryptionInTransitEnabled(false))
126-
.withStorageProfile(
127-
new StorageProfile()
128-
.withStorageaccounts(
129-
Arrays.asList(
130-
new StorageAccount()
131-
.withName(storageName + ".blob.core.windows.net")
132-
.withResourceId(storageAccount.id())
133-
.withContainer(blobContainer.name())
134-
.withIsDefault(true)
135-
.withKey(storageAccount.getKeys().iterator().next().value()))
136-
))
137-
.withMinSupportedTlsVersion("1.2")
138-
.withComputeIsolationProperties(
139-
new ComputeIsolationProperties()
140-
.withEnableComputeIsolation(false))
141-
)
142-
.create();
100+
.withComputeProfile(
101+
new ComputeProfile()
102+
.withRoles(
103+
Arrays
104+
.asList(
105+
new Role().withName("headnode")
106+
.withTargetInstanceCount(2)
107+
.withHardwareProfile(
108+
new HardwareProfile().withVmSize("standard_e8_v3"))
109+
.withOsProfile(osProfile)
110+
.withEncryptDataDisks(false),
111+
new Role().withName("workernode")
112+
.withTargetInstanceCount(4)
113+
.withHardwareProfile(
114+
new HardwareProfile().withVmSize("standard_e8_v3"))
115+
.withOsProfile(osProfile)
116+
.withEncryptDataDisks(false),
117+
new Role().withName("zookeepernode")
118+
.withTargetInstanceCount(3)
119+
.withHardwareProfile(
120+
new HardwareProfile().withVmSize("standard_a2_v2"))
121+
.withOsProfile(osProfile)
122+
.withEncryptDataDisks(false))))
123+
.withTier(Tier.STANDARD)
124+
.withEncryptionInTransitProperties(
125+
new EncryptionInTransitProperties().withIsEncryptionInTransitEnabled(false))
126+
.withStorageProfile(new StorageProfile().withStorageaccounts(
127+
Arrays.asList(new StorageAccount().withName(storageName + ".blob.core.windows.net")
128+
.withResourceId(storageAccount.id())
129+
.withContainer(blobContainer.name())
130+
.withIsDefault(true)
131+
.withKey(storageAccount.getKeys().iterator().next().value()))))
132+
.withMinSupportedTlsVersion("1.2")
133+
.withComputeIsolationProperties(
134+
new ComputeIsolationProperties().withEnableComputeIsolation(false)))
135+
.create();
143136
```
144137
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md)
145138

@@ -171,5 +164,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
171164
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
172165
[coc]: https://opensource.microsoft.com/codeofconduct/
173166
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
174-
175-

0 commit comments

Comments
 (0)