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
3 changes: 2 additions & 1 deletion sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2021-01-20)

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

## 1.0.0-beta.1 (2020-12-17)

Expand Down
18 changes: 17 additions & 1 deletion sdk/hdinsight/azure-resourcemanager-hdinsight/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ Azure Resource Manager HDInsight client library for Java.

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

## We'd love to hear your feedback

We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.

If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.

Thank you in advance for your collaboration. We really appreciate your time!

## Documentation

Various documentation is available to help you get started

- [API reference documentation][docs]

## Getting started

### Prerequisites
Expand All @@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for HDInsight Management SDK. HDInsigh
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-hdinsight</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -75,6 +89,8 @@ For details on contributing to this repository, see the [contributing guide](htt
1. Create new Pull Request

<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,31 @@ public HDInsightManager authenticate(TokenCredential credential, AzureProfile pr
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder
.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.hdinsight")
.append("/")
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.name"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version"))
.append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}

if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies
.add(
new UserAgentPolicy(
null,
"com.azure.resourcemanager.hdinsight",
"1.0.0-beta.1",
Configuration.getGlobalConfiguration()));
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.hdinsight.models.BillingResources;
import com.azure.resourcemanager.hdinsight.models.VmSizeCompatibilityFilterV2;
import com.azure.resourcemanager.hdinsight.models.VmSizeProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
Expand All @@ -23,13 +24,25 @@ public final class BillingResponseListResultInner {
@JsonProperty(value = "vmSizes")
private List<String> vmSizes;

/*
* The vm sizes which enable encryption at host.
*/
@JsonProperty(value = "vmSizesWithEncryptionAtHost")
private List<String> vmSizesWithEncryptionAtHost;

/*
* The virtual machine filtering mode. Effectively this can enabling or
* disabling the virtual machine sizes in a particular set.
*/
@JsonProperty(value = "vmSizeFilters")
private List<VmSizeCompatibilityFilterV2> vmSizeFilters;

/*
* The vm size properties.
*/
@JsonProperty(value = "vmSizeProperties", access = JsonProperty.Access.WRITE_ONLY)
private List<VmSizeProperty> vmSizeProperties;

/*
* The billing and managed disk billing resources for a region.
*/
Expand All @@ -56,6 +69,26 @@ public BillingResponseListResultInner withVmSizes(List<String> vmSizes) {
return this;
}

/**
* Get the vmSizesWithEncryptionAtHost property: The vm sizes which enable encryption at host.
*
* @return the vmSizesWithEncryptionAtHost value.
*/
public List<String> vmSizesWithEncryptionAtHost() {
return this.vmSizesWithEncryptionAtHost;
}

/**
* Set the vmSizesWithEncryptionAtHost property: The vm sizes which enable encryption at host.
*
* @param vmSizesWithEncryptionAtHost the vmSizesWithEncryptionAtHost value to set.
* @return the BillingResponseListResultInner object itself.
*/
public BillingResponseListResultInner withVmSizesWithEncryptionAtHost(List<String> vmSizesWithEncryptionAtHost) {
this.vmSizesWithEncryptionAtHost = vmSizesWithEncryptionAtHost;
return this;
}

/**
* Get the vmSizeFilters property: The virtual machine filtering mode. Effectively this can enabling or disabling
* the virtual machine sizes in a particular set.
Expand All @@ -78,6 +111,15 @@ public BillingResponseListResultInner withVmSizeFilters(List<VmSizeCompatibility
return this;
}

/**
* Get the vmSizeProperties property: The vm size properties.
*
* @return the vmSizeProperties value.
*/
public List<VmSizeProperty> vmSizeProperties() {
return this.vmSizeProperties;
}

/**
* Get the billingResources property: The billing and managed disk billing resources for a region.
*
Expand Down Expand Up @@ -107,6 +149,9 @@ public void validate() {
if (vmSizeFilters() != null) {
vmSizeFilters().forEach(e -> e.validate());
}
if (vmSizeProperties() != null) {
vmSizeProperties().forEach(e -> e.validate());
}
if (billingResources() != null) {
billingResources().forEach(e -> e.validate());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.hdinsight.models.OperationDisplay;
import com.azure.resourcemanager.hdinsight.models.OperationProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

Expand All @@ -27,6 +28,12 @@ public final class OperationInner {
@JsonProperty(value = "display")
private OperationDisplay display;

/*
* The operation properties.
*/
@JsonProperty(value = "properties")
private OperationProperties properties;

/**
* Get the name property: The operation name: {provider}/{resource}/{operation}.
*
Expand Down Expand Up @@ -67,6 +74,26 @@ public OperationInner withDisplay(OperationDisplay display) {
return this;
}

/**
* Get the properties property: The operation properties.
*
* @return the properties value.
*/
public OperationProperties properties() {
return this.properties;
}

/**
* Set the properties property: The operation properties.
*
* @param properties the properties value to set.
* @return the OperationInner object itself.
*/
public OperationInner withProperties(OperationProperties properties) {
this.properties = properties;
return this;
}

/**
* Validates the instance.
*
Expand All @@ -76,5 +103,8 @@ public void validate() {
if (display() != null) {
display().validate();
}
if (properties() != null) {
properties().validate();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Mono<Response<Flux<ByteBuffer>>> create(
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters"
+ "/{clusterName}/applications/{applicationName}")
@ExpectedResponses({200, 202})
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> delete(
@HostParam("$host") String endpoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.azure.resourcemanager.hdinsight.models.BillingResources;
import com.azure.resourcemanager.hdinsight.models.BillingResponseListResult;
import com.azure.resourcemanager.hdinsight.models.VmSizeCompatibilityFilterV2;
import com.azure.resourcemanager.hdinsight.models.VmSizeProperty;
import java.util.Collections;
import java.util.List;

Expand All @@ -31,6 +32,15 @@ public List<String> vmSizes() {
}
}

public List<String> vmSizesWithEncryptionAtHost() {
List<String> inner = this.innerModel().vmSizesWithEncryptionAtHost();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
return Collections.emptyList();
}
}

public List<VmSizeCompatibilityFilterV2> vmSizeFilters() {
List<VmSizeCompatibilityFilterV2> inner = this.innerModel().vmSizeFilters();
if (inner != null) {
Expand All @@ -40,6 +50,15 @@ public List<VmSizeCompatibilityFilterV2> vmSizeFilters() {
}
}

public List<VmSizeProperty> vmSizeProperties() {
List<VmSizeProperty> inner = this.innerModel().vmSizeProperties();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
return Collections.emptyList();
}
}

public List<BillingResources> billingResources() {
List<BillingResources> inner = this.innerModel().billingResources();
if (inner != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@

package com.azure.resourcemanager.hdinsight.implementation;

import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.hdinsight.HDInsightManager;
import com.azure.resourcemanager.hdinsight.fluent.models.ClusterInner;
import com.azure.resourcemanager.hdinsight.models.Cluster;
import com.azure.resourcemanager.hdinsight.models.ClusterCreateParametersExtended;
import com.azure.resourcemanager.hdinsight.models.ClusterCreateProperties;
import com.azure.resourcemanager.hdinsight.models.ClusterDiskEncryptionParameters;
import com.azure.resourcemanager.hdinsight.models.ClusterGetProperties;
import com.azure.resourcemanager.hdinsight.models.ClusterIdentity;
import com.azure.resourcemanager.hdinsight.models.ClusterPatchParameters;
import com.azure.resourcemanager.hdinsight.models.ExecuteScriptActionParameters;
import com.azure.resourcemanager.hdinsight.models.GatewaySettings;
import com.azure.resourcemanager.hdinsight.models.UpdateGatewaySettingsParameters;
import java.util.Collections;
import java.util.Map;

Expand Down Expand Up @@ -165,6 +170,38 @@ public Cluster refresh(Context context) {
return this;
}

public void rotateDiskEncryptionKey(ClusterDiskEncryptionParameters parameters) {
serviceManager.clusters().rotateDiskEncryptionKey(resourceGroupName, clusterName, parameters);
}

public void rotateDiskEncryptionKey(ClusterDiskEncryptionParameters parameters, Context context) {
serviceManager.clusters().rotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, context);
}

public GatewaySettings getGatewaySettings() {
return serviceManager.clusters().getGatewaySettings(resourceGroupName, clusterName);
}

public Response<GatewaySettings> getGatewaySettingsWithResponse(Context context) {
return serviceManager.clusters().getGatewaySettingsWithResponse(resourceGroupName, clusterName, context);
}

public void updateGatewaySettings(UpdateGatewaySettingsParameters parameters) {
serviceManager.clusters().updateGatewaySettings(resourceGroupName, clusterName, parameters);
}

public void updateGatewaySettings(UpdateGatewaySettingsParameters parameters, Context context) {
serviceManager.clusters().updateGatewaySettings(resourceGroupName, clusterName, parameters, context);
}

public void executeScriptActions(ExecuteScriptActionParameters parameters) {
serviceManager.clusters().executeScriptActions(resourceGroupName, clusterName, parameters);
}

public void executeScriptActions(ExecuteScriptActionParameters parameters, Context context) {
serviceManager.clusters().executeScriptActions(resourceGroupName, clusterName, parameters, context);
}

public ClusterImpl withRegion(Region location) {
this.createParameters.withLocation(location.toString());
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Mono<Response<ClusterInner>> update(
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters"
+ "/{clusterName}")
@ExpectedResponses({200, 202})
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> delete(
@HostParam("$host") String endpoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Mono<Response<ClusterMonitoringResponseInner>> getMonitoringStatus(
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters"
+ "/{clusterName}/extensions/clustermonitoring")
@ExpectedResponses({200, 202})
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> disableMonitoring(
@HostParam("$host") String endpoint,
Expand Down Expand Up @@ -147,7 +147,7 @@ Mono<Response<ExtensionInner>> get(
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters"
+ "/{clusterName}/extensions/{extensionName}")
@ExpectedResponses({200, 202})
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> delete(
@HostParam("$host") String endpoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.azure.resourcemanager.hdinsight.fluent.models.OperationInner;
import com.azure.resourcemanager.hdinsight.models.Operation;
import com.azure.resourcemanager.hdinsight.models.OperationDisplay;
import com.azure.resourcemanager.hdinsight.models.OperationProperties;

public final class OperationImpl implements Operation {
private OperationInner innerObject;
Expand All @@ -27,6 +28,10 @@ public OperationDisplay display() {
return this.innerModel().display();
}

public OperationProperties properties() {
return this.innerModel().properties();
}

public OperationInner innerModel() {
return this.innerObject;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private interface ScriptActionsService {
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters"
+ "/{clusterName}/scriptActions/{scriptName}")
@ExpectedResponses({200})
@ExpectedResponses({200, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Void>> delete(
@HostParam("$host") String endpoint,
Expand Down
Loading