Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2025-04-30)

- Azure Resource Manager HDInsightContainers client library for Java. This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. HDInsight Containers Management Client. Package tag package-preview-2024-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
HDInsightContainersManager manager = HDInsightContainersManager
.authenticate(credential, profile);
```

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

See [Authentication][authenticate] for more options.

Expand Down Expand Up @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/


1,258 changes: 629 additions & 629 deletions sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.5.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
Expand All @@ -63,6 +58,11 @@
<artifactId>azure-core-management</artifactId>
<version>1.17.0</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.5.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.hdinsight.containers.fluent.HDInsightContainersManagementClient;
import com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterPoolVersionsImpl;
Expand All @@ -30,10 +31,10 @@
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterJobsImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterLibrariesImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolAvailableUpgradesImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolsImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolUpgradeHistoriesImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClustersImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolsImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterUpgradeHistoriesImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClustersImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.HDInsightContainersManagementClientBuilder;
import com.azure.resourcemanager.hdinsight.containers.implementation.LocationsImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.OperationsImpl;
Expand All @@ -43,16 +44,17 @@
import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobs;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraries;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrades;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistories;
import com.azure.resourcemanager.hdinsight.containers.models.Clusters;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistories;
import com.azure.resourcemanager.hdinsight.containers.models.Clusters;
import com.azure.resourcemanager.hdinsight.containers.models.Locations;
import com.azure.resourcemanager.hdinsight.containers.models.Operations;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -137,6 +139,9 @@ public static Configurable configure() {
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private static final String SDK_VERSION = "version";
private static final Map<String, String> PROPERTIES
= CoreUtils.getProperties("azure-resourcemanager-hdinsight-containers.properties");

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -244,12 +249,14 @@ public HDInsightContainersManager authenticate(TokenCredential credential, Azure
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");

String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.hdinsight.containers")
.append("/")
.append("1.0.0-beta.3");
.append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down Expand Up @@ -282,7 +289,7 @@ public HDInsightContainersManager authenticate(TokenCredential credential, Azure
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ public final class ClusterAvailableUpgradeInner extends ProxyResource {
private SystemData systemData;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of ClusterAvailableUpgradeInner class.
Expand Down Expand Up @@ -79,13 +79,13 @@ public SystemData systemData() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -99,13 +99,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ public final class ClusterInner extends Resource {
private SystemData systemData;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of ClusterInner class.
Expand Down Expand Up @@ -80,13 +80,13 @@ public SystemData systemData() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -100,13 +100,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ public final class ClusterJobInner extends ProxyResource {
private SystemData systemData;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of ClusterJobInner class.
Expand Down Expand Up @@ -80,13 +80,13 @@ public SystemData systemData() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -100,13 +100,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ public final class ClusterLibraryInner extends ProxyResource {
private SystemData systemData;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of ClusterLibraryInner class.
Expand Down Expand Up @@ -80,13 +80,13 @@ public SystemData systemData() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -100,13 +100,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Loading