Skip to content
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

[AutoPR azure-resourcemanager-recoveryservices] Adding api-version 2020-10-01 in readme.azureresourceschema.md #7566

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,7 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2021-02-22)

- Azure Resource Manager RecoveryServices client library for Java. This package contains Microsoft Azure SDK for RecoveryServices Management SDK. Recovery Services Client. Package tag package-2020-10. 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-18)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,21 @@

Azure Resource Manager RecoveryServices client library for Java.

This package contains Microsoft Azure SDK for RecoveryServices Management SDK. Recovery Services Client. Package tag package-2016-06. 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 RecoveryServices Management SDK. Recovery Services Client. Package tag package-2020-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

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

Expand All @@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for RecoveryServices Management SDK. R
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-recoveryservices</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 @@ -13,7 +13,7 @@
<packaging>jar</packaging>

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

<licenses>
Expand Down Expand Up @@ -41,6 +41,11 @@
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.13.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-management</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.azure.resourcemanager.recoveryservices.implementation.RecoveryServicesManagementClientBuilder;
import com.azure.resourcemanager.recoveryservices.implementation.RegisteredIdentitiesImpl;
import com.azure.resourcemanager.recoveryservices.implementation.ReplicationUsagesImpl;
import com.azure.resourcemanager.recoveryservices.implementation.ResourceProvidersImpl;
import com.azure.resourcemanager.recoveryservices.implementation.UsagesImpl;
import com.azure.resourcemanager.recoveryservices.implementation.VaultCertificatesImpl;
import com.azure.resourcemanager.recoveryservices.implementation.VaultExtendedInfoesImpl;
Expand All @@ -36,6 +37,7 @@
import com.azure.resourcemanager.recoveryservices.models.RecoveryServices;
import com.azure.resourcemanager.recoveryservices.models.RegisteredIdentities;
import com.azure.resourcemanager.recoveryservices.models.ReplicationUsages;
import com.azure.resourcemanager.recoveryservices.models.ResourceProviders;
import com.azure.resourcemanager.recoveryservices.models.Usages;
import com.azure.resourcemanager.recoveryservices.models.VaultCertificates;
import com.azure.resourcemanager.recoveryservices.models.VaultExtendedInfoes;
Expand Down Expand Up @@ -64,6 +66,8 @@ public final class RecoveryServicesManager {

private VaultExtendedInfoes vaultExtendedInfoes;

private ResourceProviders resourceProviders;

private Usages usages;

private final RecoveryServicesManagementClient clientObject;
Expand Down Expand Up @@ -184,17 +188,31 @@ public RecoveryServicesManager authenticate(TokenCredential credential, AzurePro
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.recoveryservices")
.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.recoveryservices",
"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 Expand Up @@ -279,6 +297,14 @@ public VaultExtendedInfoes vaultExtendedInfoes() {
return vaultExtendedInfoes;
}

/** @return Resource collection API of ResourceProviders. */
public ResourceProviders resourceProviders() {
if (this.resourceProviders == null) {
this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
}
return resourceProviders;
}

/** @return Resource collection API of Usages. */
public Usages usages() {
if (this.usages == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ public interface RecoveryServicesManagementClient {
*/
VaultExtendedInfoesClient getVaultExtendedInfoes();

/**
* Gets the ResourceProvidersClient object to access its operations.
*
* @return the ResourceProvidersClient object.
*/
ResourceProvidersClient getResourceProviders();

/**
* Gets the UsagesClient object to access its operations.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.recoveryservices.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.recoveryservices.fluent.models.OperationResourceInner;
import com.azure.resourcemanager.recoveryservices.fluent.models.VaultInner;

/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
public interface ResourceProvidersClient {
/**
* Gets the operation status for a resource.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @param operationId The operationId parameter.
* @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 the operation status for a resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
OperationResourceInner getOperationStatus(String resourceGroupName, String vaultName, String operationId);

/**
* Gets the operation status for a resource.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @param operationId The operationId parameter.
* @param context The context to associate with this operation.
* @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 the operation status for a resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<OperationResourceInner> getOperationStatusWithResponse(
String resourceGroupName, String vaultName, String operationId, Context context);

/**
* Gets the operation result for a resource.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @param operationId The operationId parameter.
* @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 the operation result for a resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<VaultInner>, VaultInner> beginGetOperationResult(
String resourceGroupName, String vaultName, String operationId);

/**
* Gets the operation result for a resource.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @param operationId The operationId parameter.
* @param context The context to associate with this operation.
* @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 the operation result for a resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<VaultInner>, VaultInner> beginGetOperationResult(
String resourceGroupName, String vaultName, String operationId, Context context);

/**
* Gets the operation result for a resource.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @param operationId The operationId parameter.
* @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 the operation result for a resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
VaultInner getOperationResult(String resourceGroupName, String vaultName, String operationId);

/**
* Gets the operation result for a resource.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @param operationId The operationId parameter.
* @param context The context to associate with this operation.
* @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 the operation result for a resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
VaultInner getOperationResult(String resourceGroupName, String vaultName, String operationId, Context context);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.recoveryservices.fluent.models.VaultInner;
import com.azure.resourcemanager.recoveryservices.models.PatchVault;

Expand Down Expand Up @@ -100,7 +102,8 @@ public interface VaultsClient {
* @return resource information, as returned by the resource provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
VaultInner createOrUpdate(String resourceGroupName, String vaultName, VaultInner vault);
SyncPoller<PollResult<VaultInner>, VaultInner> beginCreateOrUpdate(
String resourceGroupName, String vaultName, VaultInner vault);

/**
* Creates or updates a Recovery Services vault.
Expand All @@ -115,9 +118,38 @@ public interface VaultsClient {
* @return resource information, as returned by the resource provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<VaultInner> createOrUpdateWithResponse(
SyncPoller<PollResult<VaultInner>, VaultInner> beginCreateOrUpdate(
String resourceGroupName, String vaultName, VaultInner vault, Context context);

/**
* Creates or updates a Recovery Services vault.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @param vault Recovery Services Vault to be created.
* @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 resource information, as returned by the resource provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
VaultInner createOrUpdate(String resourceGroupName, String vaultName, VaultInner vault);

/**
* Creates or updates a Recovery Services vault.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @param vault Recovery Services Vault to be created.
* @param context The context to associate with this operation.
* @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 resource information, as returned by the resource provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
VaultInner createOrUpdate(String resourceGroupName, String vaultName, VaultInner vault, Context context);

/**
* Deletes a vault.
*
Expand Down Expand Up @@ -156,7 +188,8 @@ Response<VaultInner> createOrUpdateWithResponse(
* @return resource information, as returned by the resource provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
VaultInner update(String resourceGroupName, String vaultName, PatchVault vault);
SyncPoller<PollResult<VaultInner>, VaultInner> beginUpdate(
String resourceGroupName, String vaultName, PatchVault vault);

/**
* Updates the vault.
Expand All @@ -171,6 +204,35 @@ Response<VaultInner> createOrUpdateWithResponse(
* @return resource information, as returned by the resource provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<VaultInner> updateWithResponse(
SyncPoller<PollResult<VaultInner>, VaultInner> beginUpdate(
String resourceGroupName, String vaultName, PatchVault vault, Context context);

/**
* Updates the vault.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @param vault Recovery Services Vault to be created.
* @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 resource information, as returned by the resource provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
VaultInner update(String resourceGroupName, String vaultName, PatchVault vault);

/**
* Updates the vault.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @param vault Recovery Services Vault to be created.
* @param context The context to associate with this operation.
* @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 resource information, as returned by the resource provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
VaultInner update(String resourceGroupName, String vaultName, PatchVault vault, Context context);
}
Loading