Skip to content

Commit

Permalink
CodeGen from PR 17182 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
update-typescript.md (Azure#17182)
  • Loading branch information
SDKAuto committed Jan 6, 2022
1 parent 988b2e7 commit 2496e88
Show file tree
Hide file tree
Showing 42 changed files with 211 additions and 289 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2022-01-06)

- Azure Resource Manager AzureArcData client library for Java. This package contains Microsoft Azure SDK for AzureArcData Management SDK. The AzureArcData management API provides a RESTful set of web APIs to manage Azure Data Services on Azure Arc Resources. Package tag package-2021-11-01. 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/azurearcdata/azure-resourcemanager-azurearcdata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager AzureArcData client library for Java.

This package contains Microsoft Azure SDK for AzureArcData Management SDK. The AzureArcData management API provides a RESTful set of web APIs to manage Azure Data Services on Azure Arc Resources. Package tag package-2021-08-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 AzureArcData Management SDK. The AzureArcData management API provides a RESTful set of web APIs to manage Azure Data Services on Azure Arc Resources. Package tag package-2021-11-01. 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-azurearcdata</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
42 changes: 23 additions & 19 deletions sdk/azurearcdata/azure-resourcemanager-azurearcdata/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import com.azure.core.util.Context;
/** Samples for DataControllers Delete. */
public final class DataControllersDeleteSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/DeleteDataController.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/DeleteDataController.json
*/
/**
* Sample code: Delete a dataController.
Expand All @@ -60,7 +60,7 @@ import com.azure.core.util.Context;
/** Samples for DataControllers GetByResourceGroup. */
public final class DataControllersGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/GetDataController.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/GetDataController.json
*/
/**
* Sample code: Get a data controller.
Expand All @@ -81,7 +81,7 @@ import com.azure.core.util.Context;
/** Samples for DataControllers List. */
public final class DataControllersListSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/ListSubscriptionDataController.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/ListSubscriptionDataController.json
*/
/**
* Sample code: Gets all dataControllers in a subscription.
Expand All @@ -103,7 +103,7 @@ import com.azure.core.util.Context;
/** Samples for DataControllers ListByResourceGroup. */
public final class DataControllersListByResourceGroupSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/ListByResourceGroupDataController.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/ListByResourceGroupDataController.json
*/
/**
* Sample code: Gets all dataControllers in a resource group.
Expand All @@ -128,7 +128,7 @@ import java.util.Map;
/** Samples for DataControllers PatchDataController. */
public final class DataControllersPatchDataControllerSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/UpdateDataController.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/UpdateDataController.json
*/
/**
* Sample code: Updates a dataController tags.
Expand Down Expand Up @@ -177,7 +177,7 @@ import java.util.UUID;
/** Samples for DataControllers PutDataController. */
public final class DataControllersPutDataControllerSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/CreateOrUpdateDataController.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/CreateOrUpdateDataController.json
*/
/**
* Sample code: Create or update a Data Controller.
Expand Down Expand Up @@ -205,6 +205,10 @@ public final class DataControllersPutDataControllerSamples {
.withUsages(OffsetDateTime.parse("2020-01-01T17:18:19.1234567Z")))
.withBasicLoginInformation(
new BasicLoginInformation().withUsername("username").withPassword("********"))
.withMetricsDashboardCredential(
new BasicLoginInformation().withUsername("username").withPassword("********"))
.withLogsDashboardCredential(
new BasicLoginInformation().withUsername("username").withPassword("********"))
.withLogAnalyticsWorkspaceConfig(
new LogAnalyticsWorkspaceConfig()
.withWorkspaceId(UUID.fromString("00000000-1111-2222-3333-444444444444"))
Expand Down Expand Up @@ -249,7 +253,7 @@ import com.azure.core.util.Context;
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/ListOperation.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/ListOperation.json
*/
/**
* Sample code: Lists all of the available Azure Data Services on Azure Arc API operations.
Expand Down Expand Up @@ -284,7 +288,7 @@ import java.util.Map;
/** Samples for SqlManagedInstances Create. */
public final class SqlManagedInstancesCreateSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/CreateOrUpdateSqlManagedInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/CreateOrUpdateSqlManagedInstance.json
*/
/**
* Sample code: Create or update a SQL Managed Instance.
Expand Down Expand Up @@ -373,7 +377,7 @@ import com.azure.core.util.Context;
/** Samples for SqlManagedInstances Delete. */
public final class SqlManagedInstancesDeleteSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/DeleteSqlManagedInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/DeleteSqlManagedInstance.json
*/
/**
* Sample code: Delete a SQL Instance.
Expand All @@ -394,7 +398,7 @@ import com.azure.core.util.Context;
/** Samples for SqlManagedInstances GetByResourceGroup. */
public final class SqlManagedInstancesGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/GetSqlManagedInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/GetSqlManagedInstance.json
*/
/**
* Sample code: Updates a SQL Instance tags.
Expand All @@ -415,7 +419,7 @@ import com.azure.core.util.Context;
/** Samples for SqlManagedInstances List. */
public final class SqlManagedInstancesListSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/ListSubscriptionSqlManagedInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/ListSubscriptionSqlManagedInstance.json
*/
/**
* Sample code: Gets all SQL Instance in a subscription.
Expand All @@ -437,7 +441,7 @@ import com.azure.core.util.Context;
/** Samples for SqlManagedInstances ListByResourceGroup. */
public final class SqlManagedInstancesListByResourceGroupSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/ListByResourceGroupSqlManagedInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/ListByResourceGroupSqlManagedInstance.json
*/
/**
* Sample code: Gets all SQL Instance in a resource group.
Expand All @@ -462,7 +466,7 @@ import java.util.Map;
/** Samples for SqlManagedInstances Update. */
public final class SqlManagedInstancesUpdateSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/UpdateSqlManagedInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/UpdateSqlManagedInstance.json
*/
/**
* Sample code: Updates a sql Instance tags.
Expand Down Expand Up @@ -507,7 +511,7 @@ import java.util.Map;
/** Samples for SqlServerInstances Create. */
public final class SqlServerInstancesCreateSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/CreateOrUpdateSqlServerInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/CreateOrUpdateSqlServerInstance.json
*/
/**
* Sample code: Updates a SQL Server Instance tags.
Expand Down Expand Up @@ -563,7 +567,7 @@ import com.azure.core.util.Context;
/** Samples for SqlServerInstances Delete. */
public final class SqlServerInstancesDeleteSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/DeleteSqlServerInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/DeleteSqlServerInstance.json
*/
/**
* Sample code: Delete a SQL Server Instance.
Expand All @@ -584,7 +588,7 @@ import com.azure.core.util.Context;
/** Samples for SqlServerInstances GetByResourceGroup. */
public final class SqlServerInstancesGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/GetSqlServerInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/GetSqlServerInstance.json
*/
/**
* Sample code: Updates a SQL Server Instance tags.
Expand All @@ -606,7 +610,7 @@ import com.azure.core.util.Context;
/** Samples for SqlServerInstances List. */
public final class SqlServerInstancesListSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/ListSubscriptionSqlServerInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/ListSubscriptionSqlServerInstance.json
*/
/**
* Sample code: Gets all SQL Server Instance in a subscription.
Expand All @@ -628,7 +632,7 @@ import com.azure.core.util.Context;
/** Samples for SqlServerInstances ListByResourceGroup. */
public final class SqlServerInstancesListByResourceGroupSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/ListByResourceGroupSqlServerInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/ListByResourceGroupSqlServerInstance.json
*/
/**
* Sample code: Gets all SQL Server Instance in a resource group.
Expand All @@ -653,7 +657,7 @@ import java.util.Map;
/** Samples for SqlServerInstances Update. */
public final class SqlServerInstancesUpdateSamples {
/*
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-08-01/examples/UpdateSqlServerInstance.json
* x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/examples/UpdateSqlServerInstance.json
*/
/**
* Sample code: Updates a SQL Server Instance tags.
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 AzureArcData Management</name>
<description>This package contains Microsoft Azure SDK for AzureArcData Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The AzureArcData management API provides a RESTful set of web APIs to manage Azure Data Services on Azure Arc Resources. Package tag package-2021-08-01.</description>
<description>This package contains Microsoft Azure SDK for AzureArcData Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The AzureArcData management API provides a RESTful set of web APIs to manage Azure Data Services on Azure Arc Resources. Package tag package-2021-11-01.</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 @@ -8,6 +8,7 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
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.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
Expand Down Expand Up @@ -35,6 +36,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/**
* Entry point to AzureArcDataManager. The AzureArcData management API provides a RESTful set of web APIs to manage
Expand Down Expand Up @@ -185,7 +187,7 @@ public AzureArcDataManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.azurearcdata")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -208,11 +210,24 @@ public AzureArcDataManager authenticate(TokenCredential credential, AzureProfile
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies);
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public interface DataControllersClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return data controller resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<DataControllerResourceInner>, DataControllerResourceInner> beginPutDataController(
String resourceGroupName, String dataControllerName, DataControllerResourceInner dataControllerResource);

Expand All @@ -90,7 +90,7 @@ SyncPoller<PollResult<DataControllerResourceInner>, DataControllerResourceInner>
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return data controller resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<DataControllerResourceInner>, DataControllerResourceInner> beginPutDataController(
String resourceGroupName,
String dataControllerName,
Expand Down Expand Up @@ -141,7 +141,7 @@ DataControllerResourceInner putDataController(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String dataControllerName);

/**
Expand All @@ -155,7 +155,7 @@ DataControllerResourceInner putDataController(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String dataControllerName, Context context);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Response<SqlManagedInstanceInner> getByResourceGroupWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a SqlManagedInstance.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<SqlManagedInstanceInner>, SqlManagedInstanceInner> beginCreate(
String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceInner sqlManagedInstance);

Expand All @@ -118,7 +118,7 @@ SyncPoller<PollResult<SqlManagedInstanceInner>, SqlManagedInstanceInner> beginCr
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a SqlManagedInstance.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<SqlManagedInstanceInner>, SqlManagedInstanceInner> beginCreate(
String resourceGroupName,
String sqlManagedInstanceName,
Expand Down Expand Up @@ -169,7 +169,7 @@ SqlManagedInstanceInner create(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String sqlManagedInstanceName);

/**
Expand All @@ -183,7 +183,7 @@ SqlManagedInstanceInner create(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String sqlManagedInstanceName, Context context);

Expand Down
Loading

0 comments on commit 2496e88

Please sign in to comment.