Skip to content

[AutoPR azure-resourcemanager-batch] batch: the storageAccountId field is no longer required #2542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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
4 changes: 3 additions & 1 deletion sdk/batch/azure-resourcemanager-batch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2022-10-26)

- Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2022-10. 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
4 changes: 2 additions & 2 deletions sdk/batch/azure-resourcemanager-batch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager Batch client library for Java.

This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2022-10. 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

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-batch</artifactId>
<version>1.0.0</version>
<version>1.1.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
173 changes: 101 additions & 72 deletions sdk/batch/azure-resourcemanager-batch/SAMPLE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/batch/azure-resourcemanager-batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Batch Management</name>
<description>This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Batch Client. Package tag package-2022-01.</description>
<description>This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Batch Client. Package tag package-2022-10.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
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.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;
Expand Down Expand Up @@ -95,6 +97,19 @@ public static BatchManager authenticate(TokenCredential credential, AzureProfile
return configure().authenticate(credential, profile);
}

/**
* Creates an instance of Batch service API entry point.
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the Batch service API instance.
*/
public static BatchManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
return new BatchManager(httpPipeline, profile, null);
}

/**
* Gets a Configurable instance that can be used to create BatchManager with optional configuration.
*
Expand All @@ -113,6 +128,7 @@ public static final class Configurable {
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
private final List<String> scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private RetryOptions retryOptions;
private Duration defaultPollInterval;

private Configurable() {
Expand Down Expand Up @@ -173,6 +189,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}

/**
* Sets the retry options for the HTTP pipeline retry policy.
*
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
*/
public Configurable withRetryOptions(RetryOptions retryOptions) {
this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
return this;
}

/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
Expand Down Expand Up @@ -206,7 +235,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
.append("-")
.append("com.azure.resourcemanager.batch")
.append("/")
.append("1.0.0-beta.3");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -224,10 +253,15 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
if (retryOptions != null) {
retryPolicy = new RetryPolicy(retryOptions);
} else {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
Expand Down Expand Up @@ -258,63 +292,95 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
}
}

/** @return Resource collection API of BatchAccounts. */
/**
* Gets the resource collection API of BatchAccounts. It manages BatchAccount.
*
* @return Resource collection API of BatchAccounts.
*/
public BatchAccounts batchAccounts() {
if (this.batchAccounts == null) {
this.batchAccounts = new BatchAccountsImpl(clientObject.getBatchAccounts(), this);
}
return batchAccounts;
}

/** @return Resource collection API of ApplicationPackages. */
/**
* Gets the resource collection API of ApplicationPackages. It manages ApplicationPackage.
*
* @return Resource collection API of ApplicationPackages.
*/
public ApplicationPackages applicationPackages() {
if (this.applicationPackages == null) {
this.applicationPackages = new ApplicationPackagesImpl(clientObject.getApplicationPackages(), this);
}
return applicationPackages;
}

/** @return Resource collection API of Applications. */
/**
* Gets the resource collection API of Applications. It manages Application.
*
* @return Resource collection API of Applications.
*/
public Applications applications() {
if (this.applications == null) {
this.applications = new ApplicationsImpl(clientObject.getApplications(), this);
}
return applications;
}

/** @return Resource collection API of Locations. */
/**
* Gets the resource collection API of Locations.
*
* @return Resource collection API of Locations.
*/
public Locations locations() {
if (this.locations == null) {
this.locations = new LocationsImpl(clientObject.getLocations(), this);
}
return locations;
}

/** @return Resource collection API of Operations. */
/**
* Gets the resource collection API of Operations.
*
* @return Resource collection API of Operations.
*/
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
return operations;
}

/** @return Resource collection API of Certificates. */
/**
* Gets the resource collection API of Certificates. It manages Certificate.
*
* @return Resource collection API of Certificates.
*/
public Certificates certificates() {
if (this.certificates == null) {
this.certificates = new CertificatesImpl(clientObject.getCertificates(), this);
}
return certificates;
}

/** @return Resource collection API of PrivateLinkResources. */
/**
* Gets the resource collection API of PrivateLinkResources.
*
* @return Resource collection API of PrivateLinkResources.
*/
public PrivateLinkResources privateLinkResources() {
if (this.privateLinkResources == null) {
this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
}
return privateLinkResources;
}

/** @return Resource collection API of PrivateEndpointConnections. */
/**
* Gets the resource collection API of PrivateEndpointConnections.
*
* @return Resource collection API of PrivateEndpointConnections.
*/
public PrivateEndpointConnections privateEndpointConnections() {
if (this.privateEndpointConnections == null) {
this.privateEndpointConnections =
Expand All @@ -323,7 +389,11 @@ public PrivateEndpointConnections privateEndpointConnections() {
return privateEndpointConnections;
}

/** @return Resource collection API of Pools. */
/**
* Gets the resource collection API of Pools. It manages Pool.
*
* @return Resource collection API of Pools.
*/
public Pools pools() {
if (this.pools == null) {
this.pools = new PoolsImpl(clientObject.getPools(), this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,6 @@

/** An instance of this class provides access to all the operations defined in ApplicationPackagesClient. */
public interface ApplicationPackagesClient {
/**
* Activates the specified application package. This should be done after the `ApplicationPackage` was created and
* uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks.
*
* @param resourceGroupName The name of the resource group that contains the Batch account.
* @param accountName The name of the Batch account.
* @param applicationName The name of the application. This must be unique within the account.
* @param versionName The version of the application.
* @param parameters The parameters for the request.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return an application package which represents a particular version of an application.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ApplicationPackageInner activate(
String resourceGroupName,
String accountName,
String applicationName,
String versionName,
ActivateApplicationPackageParameters parameters);

/**
* Activates the specified application package. This should be done after the `ApplicationPackage` was created and
* uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks.
Expand All @@ -62,22 +40,26 @@ Response<ApplicationPackageInner> activateWithResponse(
Context context);

/**
* Creates an application package record. The record contains a storageUrl where the package should be uploaded to.
* Once it is uploaded the `ApplicationPackage` needs to be activated using `ApplicationPackageActive` before it can
* be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS.
* Activates the specified application package. This should be done after the `ApplicationPackage` was created and
* uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks.
*
* @param resourceGroupName The name of the resource group that contains the Batch account.
* @param accountName The name of the Batch account.
* @param applicationName The name of the application. This must be unique within the account.
* @param versionName The version of the application.
* @param parameters The parameters for the request.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return an application package which represents a particular version of an application.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ApplicationPackageInner create(
String resourceGroupName, String accountName, String applicationName, String versionName);
ApplicationPackageInner activate(
String resourceGroupName,
String accountName,
String applicationName,
String versionName,
ActivateApplicationPackageParameters parameters);

/**
* Creates an application package record. The record contains a storageUrl where the package should be uploaded to.
Expand Down Expand Up @@ -106,7 +88,9 @@ Response<ApplicationPackageInner> createWithResponse(
Context context);

/**
* Deletes an application package record and its associated binary file.
* Creates an application package record. The record contains a storageUrl where the package should be uploaded to.
* Once it is uploaded the `ApplicationPackage` needs to be activated using `ApplicationPackageActive` before it can
* be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS.
*
* @param resourceGroupName The name of the resource group that contains the Batch account.
* @param accountName The name of the Batch account.
Expand All @@ -115,9 +99,11 @@ Response<ApplicationPackageInner> createWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return an application package which represents a particular version of an application.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String accountName, String applicationName, String versionName);
ApplicationPackageInner create(
String resourceGroupName, String accountName, String applicationName, String versionName);

/**
* Deletes an application package record and its associated binary file.
Expand All @@ -137,7 +123,7 @@ Response<Void> deleteWithResponse(
String resourceGroupName, String accountName, String applicationName, String versionName, Context context);

/**
* Gets information about the specified application package.
* Deletes an application package record and its associated binary file.
*
* @param resourceGroupName The name of the resource group that contains the Batch account.
* @param accountName The name of the Batch account.
Expand All @@ -146,11 +132,9 @@ Response<Void> deleteWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about the specified application package.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ApplicationPackageInner get(
String resourceGroupName, String accountName, String applicationName, String versionName);
void delete(String resourceGroupName, String accountName, String applicationName, String versionName);

/**
* Gets information about the specified application package.
Expand All @@ -169,6 +153,22 @@ ApplicationPackageInner get(
Response<ApplicationPackageInner> getWithResponse(
String resourceGroupName, String accountName, String applicationName, String versionName, Context context);

/**
* Gets information about the specified application package.
*
* @param resourceGroupName The name of the resource group that contains the Batch account.
* @param accountName The name of the Batch account.
* @param applicationName The name of the application. This must be unique within the account.
* @param versionName The version of the application.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about the specified application package.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ApplicationPackageInner get(
String resourceGroupName, String accountName, String applicationName, String versionName);

/**
* Lists all of the application packages in the specified application.
*
Expand Down
Loading