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.3 (Unreleased)
## 1.0.0-beta.1 (2022-03-02)

- 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-preview-2022-03. 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-preview-2022-03. 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
379 changes: 355 additions & 24 deletions sdk/azurearcdata/azure-resourcemanager-azurearcdata/SAMPLE.md

Large diffs are not rendered by default.

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-preview-2022-03.</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 All @@ -21,20 +22,25 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.azurearcdata.fluent.AzureArcDataManagementClient;
import com.azure.resourcemanager.azurearcdata.implementation.ActiveDirectoryConnectorsImpl;
import com.azure.resourcemanager.azurearcdata.implementation.AzureArcDataManagementClientBuilder;
import com.azure.resourcemanager.azurearcdata.implementation.DataControllersImpl;
import com.azure.resourcemanager.azurearcdata.implementation.OperationsImpl;
import com.azure.resourcemanager.azurearcdata.implementation.PostgresInstancesImpl;
import com.azure.resourcemanager.azurearcdata.implementation.SqlManagedInstancesImpl;
import com.azure.resourcemanager.azurearcdata.implementation.SqlServerInstancesImpl;
import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectors;
import com.azure.resourcemanager.azurearcdata.models.DataControllers;
import com.azure.resourcemanager.azurearcdata.models.Operations;
import com.azure.resourcemanager.azurearcdata.models.PostgresInstances;
import com.azure.resourcemanager.azurearcdata.models.SqlManagedInstances;
import com.azure.resourcemanager.azurearcdata.models.SqlServerInstances;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
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 All @@ -49,6 +55,10 @@ public final class AzureArcDataManager {

private DataControllers dataControllers;

private ActiveDirectoryConnectors activeDirectoryConnectors;

private PostgresInstances postgresInstances;

private final AzureArcDataManagementClient clientObject;

private AzureArcDataManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Expand Down Expand Up @@ -185,7 +195,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 +218,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 Expand Up @@ -256,6 +279,23 @@ public DataControllers dataControllers() {
return dataControllers;
}

/** @return Resource collection API of ActiveDirectoryConnectors. */
public ActiveDirectoryConnectors activeDirectoryConnectors() {
if (this.activeDirectoryConnectors == null) {
this.activeDirectoryConnectors =
new ActiveDirectoryConnectorsImpl(clientObject.getActiveDirectoryConnectors(), this);
}
return activeDirectoryConnectors;
}

/** @return Resource collection API of PostgresInstances. */
public PostgresInstances postgresInstances() {
if (this.postgresInstances == null) {
this.postgresInstances = new PostgresInstancesImpl(clientObject.getPostgresInstances(), this);
}
return postgresInstances;
}

/**
* @return Wrapped service client AzureArcDataManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.azurearcdata.fluent;

import com.azure.core.annotation.ReturnType;
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.azurearcdata.fluent.models.ActiveDirectoryConnectorResourceInner;

/** An instance of this class provides access to all the operations defined in ActiveDirectoryConnectorsClient. */
public interface ActiveDirectoryConnectorsClient {
/**
* List the active directory connectors associated with the given data controller.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @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 a list of active directory connectors as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ActiveDirectoryConnectorResourceInner> list(String resourceGroupName, String dataControllerName);

/**
* List the active directory connectors associated with the given data controller.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @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 a list of active directory connectors as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ActiveDirectoryConnectorResourceInner> list(
String resourceGroupName, String dataControllerName, Context context);

/**
* Creates or replaces an Active Directory connector resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @param activeDirectoryConnectorName The name of the Active Directory connector instance.
* @param activeDirectoryConnectorResource desc.
* @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 {@link SyncPoller} for polling of active directory connector resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ActiveDirectoryConnectorResourceInner>, ActiveDirectoryConnectorResourceInner> beginCreate(
String resourceGroupName,
String dataControllerName,
String activeDirectoryConnectorName,
ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource);

/**
* Creates or replaces an Active Directory connector resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @param activeDirectoryConnectorName The name of the Active Directory connector instance.
* @param activeDirectoryConnectorResource desc.
* @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 {@link SyncPoller} for polling of active directory connector resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ActiveDirectoryConnectorResourceInner>, ActiveDirectoryConnectorResourceInner> beginCreate(
String resourceGroupName,
String dataControllerName,
String activeDirectoryConnectorName,
ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
Context context);

/**
* Creates or replaces an Active Directory connector resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @param activeDirectoryConnectorName The name of the Active Directory connector instance.
* @param activeDirectoryConnectorResource desc.
* @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 active directory connector resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ActiveDirectoryConnectorResourceInner create(
String resourceGroupName,
String dataControllerName,
String activeDirectoryConnectorName,
ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource);

/**
* Creates or replaces an Active Directory connector resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @param activeDirectoryConnectorName The name of the Active Directory connector instance.
* @param activeDirectoryConnectorResource desc.
* @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 active directory connector resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ActiveDirectoryConnectorResourceInner create(
String resourceGroupName,
String dataControllerName,
String activeDirectoryConnectorName,
ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
Context context);

/**
* Deletes an Active Directory connector resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @param activeDirectoryConnectorName The name of the Active Directory connector instance.
* @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 {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName);

/**
* Deletes an Active Directory connector resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @param activeDirectoryConnectorName The name of the Active Directory connector instance.
* @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 {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context);

/**
* Deletes an Active Directory connector resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @param activeDirectoryConnectorName The name of the Active Directory connector instance.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName);

/**
* Deletes an Active Directory connector resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @param activeDirectoryConnectorName The name of the Active Directory connector instance.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(
String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context);

/**
* Retrieves an Active Directory connector resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @param activeDirectoryConnectorName The name of the Active Directory connector instance.
* @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 active directory connector resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ActiveDirectoryConnectorResourceInner get(
String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName);

/**
* Retrieves an Active Directory connector resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The name of the data controller.
* @param activeDirectoryConnectorName The name of the Active Directory connector instance.
* @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 active directory connector resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ActiveDirectoryConnectorResourceInner> getWithResponse(
String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context);
}
Loading