diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/CHANGELOG.md b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/CHANGELOG.md
index ff68a1770306..0dc9b395d703 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/CHANGELOG.md
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0-beta.1 (2022-12-12)
+
+- 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-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/README.md b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/README.md
index 05139906ee43..5cd30ae7d820 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/README.md
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/README.md
@@ -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-06. 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
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-azurearcdata
- 1.0.0-beta.2
+ 1.0.0-beta.3
```
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
### Authentication
-By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
-In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-With above configuration, `azure` client can be authenticated by following code:
+With above configuration, `azure` client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide][cg].
-1. Fork it
-1. Create your feature branch (`git checkout -b my-new-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-new-feature`)
-1. Create new Pull Request
+This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
+[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/SAMPLE.md b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/SAMPLE.md
index c3d5163fe497..9b82c2a8d029 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/SAMPLE.md
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/SAMPLE.md
@@ -1,6 +1,13 @@
# Code snippets and samples
+## ActiveDirectoryConnectors
+
+- [Create](#activedirectoryconnectors_create)
+- [Delete](#activedirectoryconnectors_delete)
+- [Get](#activedirectoryconnectors_get)
+- [List](#activedirectoryconnectors_list)
+
## DataControllers
- [Delete](#datacontrollers_delete)
@@ -14,6 +21,15 @@
- [List](#operations_list)
+## PostgresInstances
+
+- [Create](#postgresinstances_create)
+- [Delete](#postgresinstances_delete)
+- [GetByResourceGroup](#postgresinstances_getbyresourcegroup)
+- [List](#postgresinstances_list)
+- [ListByResourceGroup](#postgresinstances_listbyresourcegroup)
+- [Update](#postgresinstances_update)
+
## SqlManagedInstances
- [Create](#sqlmanagedinstances_create)
@@ -23,6 +39,14 @@
- [ListByResourceGroup](#sqlmanagedinstances_listbyresourcegroup)
- [Update](#sqlmanagedinstances_update)
+## SqlServerDatabases
+
+- [Create](#sqlserverdatabases_create)
+- [Delete](#sqlserverdatabases_delete)
+- [Get](#sqlserverdatabases_get)
+- [List](#sqlserverdatabases_list)
+- [Update](#sqlserverdatabases_update)
+
## SqlServerInstances
- [Create](#sqlserverinstances_create)
@@ -31,6 +55,131 @@
- [List](#sqlserverinstances_list)
- [ListByResourceGroup](#sqlserverinstances_listbyresourcegroup)
- [Update](#sqlserverinstances_update)
+### ActiveDirectoryConnectors_Create
+
+```java
+import com.azure.resourcemanager.azurearcdata.models.AccountProvisioningMode;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorDnsDetails;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorDomainDetails;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorProperties;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorSpec;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryDomainController;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryDomainControllers;
+import java.util.Arrays;
+
+/** Samples for ActiveDirectoryConnectors Create. */
+public final class ActiveDirectoryConnectorsCreateSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/CreateOrUpdateActiveDirectoryConnector.json
+ */
+ /**
+ * Sample code: Create or update an Active Directory connector instance.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void createOrUpdateAnActiveDirectoryConnectorInstance(
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager
+ .activeDirectoryConnectors()
+ .define("testADConnector")
+ .withExistingDataController("testrg", "testdataController")
+ .withProperties(
+ new ActiveDirectoryConnectorProperties()
+ .withSpec(
+ new ActiveDirectoryConnectorSpec()
+ .withActiveDirectory(
+ new ActiveDirectoryConnectorDomainDetails()
+ .withRealm("CONTOSO.LOCAL")
+ .withServiceAccountProvisioning(AccountProvisioningMode.MANUAL)
+ .withDomainControllers(
+ new ActiveDirectoryDomainControllers()
+ .withPrimaryDomainController(
+ new ActiveDirectoryDomainController().withHostname("dc1.contoso.local"))
+ .withSecondaryDomainControllers(
+ Arrays
+ .asList(
+ new ActiveDirectoryDomainController()
+ .withHostname("dc2.contoso.local"),
+ new ActiveDirectoryDomainController()
+ .withHostname("dc3.contoso.local")))))
+ .withDns(
+ new ActiveDirectoryConnectorDnsDetails()
+ .withNameserverIpAddresses(Arrays.asList("11.11.111.111", "22.22.222.222"))
+ .withReplicas(1L)
+ .withPreferK8SDnsForPtrLookups(false))))
+ .create();
+ }
+}
+```
+
+### ActiveDirectoryConnectors_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ActiveDirectoryConnectors Delete. */
+public final class ActiveDirectoryConnectorsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/DeleteActiveDirectoryConnector.json
+ */
+ /**
+ * Sample code: Deletes an Active Directory connector instance.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void deletesAnActiveDirectoryConnectorInstance(
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager.activeDirectoryConnectors().delete("testrg", "testdataController", "testADConnector", Context.NONE);
+ }
+}
+```
+
+### ActiveDirectoryConnectors_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ActiveDirectoryConnectors Get. */
+public final class ActiveDirectoryConnectorsGetSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/GetActiveDirectoryConnector.json
+ */
+ /**
+ * Sample code: Retrieves an Active Directory connector resource.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void retrievesAnActiveDirectoryConnectorResource(
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager
+ .activeDirectoryConnectors()
+ .getWithResponse("testrg", "testdataController", "testADConnector", Context.NONE);
+ }
+}
+```
+
+### ActiveDirectoryConnectors_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ActiveDirectoryConnectors List. */
+public final class ActiveDirectoryConnectorsListSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/ListByDataControllerActiveDirectoryConnector.json
+ */
+ /**
+ * Sample code: Gets all Active Directory connectors associated with a data controller.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void getsAllActiveDirectoryConnectorsAssociatedWithADataController(
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager.activeDirectoryConnectors().list("testrg", "testdataController", Context.NONE);
+ }
+}
+```
+
### DataControllers_Delete
```java
@@ -39,7 +188,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/preview/2022-06-15-preview/examples/DeleteDataController.json
*/
/**
* Sample code: Delete a dataController.
@@ -60,7 +209,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/preview/2022-06-15-preview/examples/GetDataController.json
*/
/**
* Sample code: Get a data controller.
@@ -81,7 +230,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/preview/2022-06-15-preview/examples/ListSubscriptionDataController.json
*/
/**
* Sample code: Gets all dataControllers in a subscription.
@@ -103,7 +252,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/preview/2022-06-15-preview/examples/ListByResourceGroupDataController.json
*/
/**
* Sample code: Gets all dataControllers in a resource group.
@@ -128,7 +277,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/preview/2022-06-15-preview/examples/UpdateDataController.json
*/
/**
* Sample code: Updates a dataController tags.
@@ -177,7 +326,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/preview/2022-06-15-preview/examples/CreateOrUpdateDataController.json
*/
/**
* Sample code: Create or update a Data Controller.
@@ -197,24 +346,28 @@ public final class DataControllersPutDataControllerSamples {
.withOnPremiseProperty(
new OnPremiseProperty()
.withId(UUID.fromString("12345678-1234-1234-ab12-1a2b3c4d5e6f"))
- .withPublicSigningKey("publicOnPremSigningKey"))
+ .withPublicSigningKey("fakeTokenPlaceholder"))
.withUploadWatermark(
new UploadWatermark()
.withMetrics(OffsetDateTime.parse("2020-01-01T17:18:19.1234567Z"))
.withLogs(OffsetDateTime.parse("2020-01-01T17:18:19.1234567Z"))
.withUsages(OffsetDateTime.parse("2020-01-01T17:18:19.1234567Z")))
.withBasicLoginInformation(
- new BasicLoginInformation().withUsername("username").withPassword("********"))
+ new BasicLoginInformation().withUsername("username").withPassword("fakeTokenPlaceholder"))
+ .withMetricsDashboardCredential(
+ new BasicLoginInformation().withUsername("username").withPassword("fakeTokenPlaceholder"))
+ .withLogsDashboardCredential(
+ new BasicLoginInformation().withUsername("username").withPassword("fakeTokenPlaceholder"))
.withLogAnalyticsWorkspaceConfig(
new LogAnalyticsWorkspaceConfig()
.withWorkspaceId(UUID.fromString("00000000-1111-2222-3333-444444444444"))
- .withPrimaryKey("********"))
+ .withPrimaryKey("fakeTokenPlaceholder"))
.withUploadServicePrincipal(
new UploadServicePrincipal()
.withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444"))
.withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))
.withAuthority("https://login.microsoftonline.com/")
- .withClientSecret("********"))
+ .withClientSecret("fakeTokenPlaceholder"))
.withClusterId(
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s")
.withExtensionId(
@@ -249,7 +402,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/preview/2022-06-15-preview/examples/ListOperation.json
*/
/**
* Sample code: Lists all of the available Azure Data Services on Azure Arc API operations.
@@ -263,9 +416,195 @@ public final class OperationsListSamples {
}
```
+### PostgresInstances_Create
+
+```java
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.azurearcdata.models.BasicLoginInformation;
+import com.azure.resourcemanager.azurearcdata.models.ExtendedLocation;
+import com.azure.resourcemanager.azurearcdata.models.ExtendedLocationTypes;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceProperties;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceSku;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceSkuTier;
+import java.io.IOException;
+
+/** Samples for PostgresInstances Create. */
+public final class PostgresInstancesCreateSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/CreateOrUpdatePostgresInstance.json
+ */
+ /**
+ * Sample code: Create or update a Postgres Instance.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void createOrUpdateAPostgresInstance(
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) throws IOException {
+ manager
+ .postgresInstances()
+ .define("testpostgresInstance")
+ .withRegion("eastus")
+ .withExistingResourceGroup("testrg")
+ .withProperties(
+ new PostgresInstanceProperties()
+ .withDataControllerId("dataControllerId")
+ .withAdmin("admin")
+ .withBasicLoginInformation(
+ new BasicLoginInformation().withUsername("username").withPassword("fakeTokenPlaceholder"))
+ .withK8SRaw(
+ SerializerFactory
+ .createDefaultManagementSerializerAdapter()
+ .deserialize(
+ "{\"apiVersion\":\"apiVersion\",\"kind\":\"postgresql-12\",\"metadata\":{\"name\":\"pg1\",\"creationTimestamp\":\"2020-08-25T14:55:10Z\",\"generation\":1,\"namespace\":\"test\",\"resourceVersion\":\"527780\",\"selfLink\":\"/apis/arcdata.microsoft.com/v1alpha1/namespaces/test/postgresql-12s/pg1\",\"uid\":\"1111aaaa-ffff-ffff-ffff-99999aaaaaaa\"},\"spec\":{\"backups\":{\"deltaMinutes\":3,\"fullMinutes\":10,\"tiers\":[{\"retention\":{\"maximums\":[\"6\",\"512MB\"],\"minimums\":[\"3\"]},\"storage\":{\"volumeSize\":\"1Gi\"}}]},\"engine\":{\"extensions\":[{\"name\":\"citus\"}]},\"scale\":{\"shards\":3},\"scheduling\":{\"default\":{\"resources\":{\"requests\":{\"memory\":\"256Mi\"}}}},\"service\":{\"type\":\"NodePort\"},\"storage\":{\"data\":{\"className\":\"local-storage\",\"size\":\"5Gi\"},\"logs\":{\"className\":\"local-storage\",\"size\":\"5Gi\"}}},\"status\":{\"externalEndpoint\":null,\"readyPods\":\"4/4\",\"state\":\"Ready\"}}",
+ Object.class,
+ SerializerEncoding.JSON)))
+ .withExtendedLocation(
+ new ExtendedLocation()
+ .withName(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation")
+ .withType(ExtendedLocationTypes.CUSTOM_LOCATION))
+ .withSku(
+ new PostgresInstanceSku()
+ .withName("default")
+ .withDev(true)
+ .withTier(PostgresInstanceSkuTier.HYPERSCALE))
+ .create();
+ }
+}
+```
+
+### PostgresInstances_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PostgresInstances Delete. */
+public final class PostgresInstancesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/DeletePostgresInstance.json
+ */
+ /**
+ * Sample code: Deletes a PostgresInstances.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void deletesAPostgresInstances(com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager.postgresInstances().delete("testrg", "testpostgresInstance", Context.NONE);
+ }
+}
+```
+
+### PostgresInstances_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PostgresInstances GetByResourceGroup. */
+public final class PostgresInstancesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/GetPostgresInstance.json
+ */
+ /**
+ * Sample code: Gets a postgres Instances.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void getsAPostgresInstances(com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager.postgresInstances().getByResourceGroupWithResponse("testrg", "testpostgresInstances", Context.NONE);
+ }
+}
+```
+
+### PostgresInstances_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PostgresInstances List. */
+public final class PostgresInstancesListSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/ListSubscriptionPostgresInstance.json
+ */
+ /**
+ * Sample code: Gets all Postgres Instance in a subscription.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void getsAllPostgresInstanceInASubscription(
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager.postgresInstances().list(Context.NONE);
+ }
+}
+```
+
+### PostgresInstances_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PostgresInstances ListByResourceGroup. */
+public final class PostgresInstancesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/ListByResourceGroupPostgresInstance.json
+ */
+ /**
+ * Sample code: Gets all postgres Instances in a resource group.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void getsAllPostgresInstancesInAResourceGroup(
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager.postgresInstances().listByResourceGroup("testrg", Context.NONE);
+ }
+}
+```
+
+### PostgresInstances_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstance;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for PostgresInstances Update. */
+public final class PostgresInstancesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/UpdatePostgresInstance.json
+ */
+ /**
+ * Sample code: Updates a postgres Instances tags.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void updatesAPostgresInstancesTags(
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ PostgresInstance resource =
+ manager
+ .postgresInstances()
+ .getByResourceGroupWithResponse("testrg", "testpostgresInstance", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("mytag", "myval")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
### SqlManagedInstances_Create
```java
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryInformation;
import com.azure.resourcemanager.azurearcdata.models.ArcSqlManagedInstanceLicenseType;
import com.azure.resourcemanager.azurearcdata.models.BasicLoginInformation;
import com.azure.resourcemanager.azurearcdata.models.ExtendedLocation;
@@ -273,6 +612,7 @@ import com.azure.resourcemanager.azurearcdata.models.ExtendedLocationTypes;
import com.azure.resourcemanager.azurearcdata.models.K8SResourceRequirements;
import com.azure.resourcemanager.azurearcdata.models.K8SScheduling;
import com.azure.resourcemanager.azurearcdata.models.K8SSchedulingOptions;
+import com.azure.resourcemanager.azurearcdata.models.KeytabInformation;
import com.azure.resourcemanager.azurearcdata.models.SqlManagedInstanceK8SRaw;
import com.azure.resourcemanager.azurearcdata.models.SqlManagedInstanceK8SSpec;
import com.azure.resourcemanager.azurearcdata.models.SqlManagedInstanceProperties;
@@ -284,7 +624,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/preview/2022-06-15-preview/examples/CreateOrUpdateSqlManagedInstance.json
*/
/**
* Sample code: Create or update a SQL Managed Instance.
@@ -336,7 +676,10 @@ public final class SqlManagedInstancesCreateSamples {
.withAdditionalProperties(mapOf()))
.withAdditionalProperties(mapOf("additionalProperty", 1234)))
.withBasicLoginInformation(
- new BasicLoginInformation().withUsername("username").withPassword("********"))
+ new BasicLoginInformation().withUsername("username").withPassword("fakeTokenPlaceholder"))
+ .withActiveDirectoryInformation(
+ new ActiveDirectoryInformation()
+ .withKeytabInformation(new KeytabInformation().withKeytab("fakeTokenPlaceholder")))
.withLicenseType(ArcSqlManagedInstanceLicenseType.LICENSE_INCLUDED)
.withClusterId(
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s")
@@ -373,7 +716,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/preview/2022-06-15-preview/examples/DeleteSqlManagedInstance.json
*/
/**
* Sample code: Delete a SQL Instance.
@@ -394,7 +737,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/preview/2022-06-15-preview/examples/GetSqlManagedInstance.json
*/
/**
* Sample code: Updates a SQL Instance tags.
@@ -415,7 +758,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/preview/2022-06-15-preview/examples/ListSubscriptionSqlManagedInstance.json
*/
/**
* Sample code: Gets all SQL Instance in a subscription.
@@ -437,7 +780,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/preview/2022-06-15-preview/examples/ListByResourceGroupSqlManagedInstance.json
*/
/**
* Sample code: Gets all SQL Instance in a resource group.
@@ -462,7 +805,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/preview/2022-06-15-preview/examples/UpdateSqlManagedInstance.json
*/
/**
* Sample code: Updates a sql Instance tags.
@@ -491,6 +834,180 @@ public final class SqlManagedInstancesUpdateSamples {
}
```
+### SqlServerDatabases_Create
+
+```java
+import com.azure.resourcemanager.azurearcdata.models.DatabaseState;
+import com.azure.resourcemanager.azurearcdata.models.RecoveryMode;
+import com.azure.resourcemanager.azurearcdata.models.SqlServerDatabaseResourceProperties;
+import com.azure.resourcemanager.azurearcdata.models.SqlServerDatabaseResourcePropertiesBackupInformation;
+import com.azure.resourcemanager.azurearcdata.models.SqlServerDatabaseResourcePropertiesDatabaseOptions;
+import java.time.OffsetDateTime;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SqlServerDatabases Create. */
+public final class SqlServerDatabasesCreateSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/CreateOrUpdateArcSqlServerDatabase.json
+ */
+ /**
+ * Sample code: Create a Arc Sql Server database.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void createAArcSqlServerDatabase(com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager
+ .sqlServerDatabases()
+ .define("testdb")
+ .withRegion("southeastasia")
+ .withExistingSqlServerInstance("testrg", "testSqlServerInstance")
+ .withProperties(
+ new SqlServerDatabaseResourceProperties()
+ .withCollationName("SQL_Latin1_General_CP1_CI_AS")
+ .withDatabaseCreationDate(OffsetDateTime.parse("2022-04-05T16:26:33.883Z"))
+ .withCompatibilityLevel(150)
+ .withSizeMB(150.0F)
+ .withSpaceAvailableMB(100.0F)
+ .withState(DatabaseState.ONLINE)
+ .withIsReadOnly(true)
+ .withRecoveryMode(RecoveryMode.FULL)
+ .withDatabaseOptions(
+ new SqlServerDatabaseResourcePropertiesDatabaseOptions()
+ .withIsAutoCloseOn(true)
+ .withIsAutoShrinkOn(true)
+ .withIsAutoCreateStatsOn(true)
+ .withIsAutoUpdateStatsOn(true)
+ .withIsRemoteDataArchiveEnabled(true)
+ .withIsMemoryOptimizationEnabled(true)
+ .withIsEncrypted(true)
+ .withIsTrustworthyOn(true))
+ .withBackupInformation(
+ new SqlServerDatabaseResourcePropertiesBackupInformation()
+ .withLastFullBackup(OffsetDateTime.parse("2022-05-05T16:26:33.883Z"))
+ .withLastLogBackup(OffsetDateTime.parse("2022-05-10T16:26:33.883Z"))))
+ .withTags(mapOf("mytag", "myval"))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### SqlServerDatabases_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlServerDatabases Delete. */
+public final class SqlServerDatabasesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/DeleteArcSqlServerDatabase.json
+ */
+ /**
+ * Sample code: Deletes a database resource.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void deletesADatabaseResource(com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager.sqlServerDatabases().deleteWithResponse("testrg", "testsqlManagedInstance", "testdb", Context.NONE);
+ }
+}
+```
+
+### SqlServerDatabases_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlServerDatabases Get. */
+public final class SqlServerDatabasesGetSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/GetArcSqlServerDatabase.json
+ */
+ /**
+ * Sample code: Retrieves an Arc Sql Server database resource.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void retrievesAnArcSqlServerDatabaseResource(
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager.sqlServerDatabases().getWithResponse("testrg", "testSqlServerInstance", "testdb", Context.NONE);
+ }
+}
+```
+
+### SqlServerDatabases_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlServerDatabases List. */
+public final class SqlServerDatabasesListSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/ListBySqlServerInstanceDatabase.json
+ */
+ /**
+ * Sample code: Gets all databases associated with an Arc Enabled Sql server.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void getsAllDatabasesAssociatedWithAnArcEnabledSqlServer(
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ manager.sqlServerDatabases().list("testrg", "testSqlServerInstance", Context.NONE);
+ }
+}
+```
+
+### SqlServerDatabases_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurearcdata.models.SqlServerDatabaseResource;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SqlServerDatabases Update. */
+public final class SqlServerDatabasesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-06-15-preview/examples/UpdateSqlServerDatabase.json
+ */
+ /**
+ * Sample code: Update a database.
+ *
+ * @param manager Entry point to AzureArcDataManager.
+ */
+ public static void updateADatabase(com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) {
+ SqlServerDatabaseResource resource =
+ manager
+ .sqlServerDatabases()
+ .getWithResponse("testrg", "testsqlManagedInstance", "testdb", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("mytag", "myval1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
### SqlServerInstances_Create
```java
@@ -498,6 +1015,7 @@ import com.azure.resourcemanager.azurearcdata.models.ArcSqlServerLicenseType;
import com.azure.resourcemanager.azurearcdata.models.ConnectionStatus;
import com.azure.resourcemanager.azurearcdata.models.DefenderStatus;
import com.azure.resourcemanager.azurearcdata.models.EditionType;
+import com.azure.resourcemanager.azurearcdata.models.HostType;
import com.azure.resourcemanager.azurearcdata.models.SqlServerInstanceProperties;
import com.azure.resourcemanager.azurearcdata.models.SqlVersion;
import java.time.OffsetDateTime;
@@ -507,7 +1025,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/preview/2022-06-15-preview/examples/CreateOrUpdateSqlServerInstance.json
*/
/**
* Sample code: Updates a SQL Server Instance tags.
@@ -524,21 +1042,23 @@ public final class SqlServerInstancesCreateSamples {
.withTags(mapOf("mytag", "myval"))
.withProperties(
new SqlServerInstanceProperties()
- .withVersion(SqlVersion.SQL_SERVER_2017)
+ .withVersion(SqlVersion.SQL_SERVER_2012)
.withEdition(EditionType.DEVELOPER)
- .withContainerResourceId("Arc Machine Name")
+ .withContainerResourceId("Resource id of hosting Arc Machine")
.withVCore("4")
- .withStatus(ConnectionStatus.CONNECTED)
+ .withCores("4")
+ .withStatus(ConnectionStatus.REGISTERED)
.withPatchLevel("patchlevel")
.withCollation("collation")
- .withCurrentVersion("2008 R2")
+ .withCurrentVersion("2012")
.withInstanceName("name of instance")
.withTcpDynamicPorts("1433")
.withTcpStaticPorts("1433")
.withProductId("sql id")
.withLicenseType(ArcSqlServerLicenseType.FREE)
.withAzureDefenderStatusLastUpdated(OffsetDateTime.parse("2020-01-02T17:18:19.1234567Z"))
- .withAzureDefenderStatus(DefenderStatus.PROTECTED))
+ .withAzureDefenderStatus(DefenderStatus.PROTECTED)
+ .withHostType(HostType.PHYSICAL_SERVER))
.create();
}
@@ -563,7 +1083,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/preview/2022-06-15-preview/examples/DeleteSqlServerInstance.json
*/
/**
* Sample code: Delete a SQL Server Instance.
@@ -584,7 +1104,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/preview/2022-06-15-preview/examples/GetSqlServerInstance.json
*/
/**
* Sample code: Updates a SQL Server Instance tags.
@@ -606,7 +1126,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/preview/2022-06-15-preview/examples/ListSubscriptionSqlServerInstance.json
*/
/**
* Sample code: Gets all SQL Server Instance in a subscription.
@@ -628,7 +1148,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/preview/2022-06-15-preview/examples/ListByResourceGroupSqlServerInstance.json
*/
/**
* Sample code: Gets all SQL Server Instance in a resource group.
@@ -653,7 +1173,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/preview/2022-06-15-preview/examples/UpdateSqlServerInstance.json
*/
/**
* Sample code: Updates a SQL Server Instance tags.
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/pom.xml b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/pom.xml
index ae20e9fb76ca..0b49a003baa7 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/pom.xml
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/pom.xml
@@ -13,7 +13,7 @@
jarMicrosoft Azure SDK for AzureArcData Management
- 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.
+ 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-06.https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/AzureArcDataManager.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/AzureArcDataManager.java
index 24cc1eb8a59e..216d2189fd4b 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/AzureArcDataManager.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/AzureArcDataManager.java
@@ -8,12 +8,15 @@
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.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;
@@ -21,20 +24,27 @@
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.SqlServerDatabasesImpl;
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.SqlServerDatabases;
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
@@ -49,6 +59,12 @@ public final class AzureArcDataManager {
private DataControllers dataControllers;
+ private ActiveDirectoryConnectors activeDirectoryConnectors;
+
+ private PostgresInstances postgresInstances;
+
+ private SqlServerDatabases sqlServerDatabases;
+
private final AzureArcDataManagementClient clientObject;
private AzureArcDataManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -76,6 +92,19 @@ public static AzureArcDataManager authenticate(TokenCredential credential, Azure
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of AzureArcData service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the AzureArcData service API instance.
+ */
+ public static AzureArcDataManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new AzureArcDataManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create AzureArcDataManager with optional configuration.
*
@@ -87,13 +116,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -154,6 +184,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
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.
*
@@ -161,9 +204,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -185,7 +230,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(" (")
@@ -203,16 +248,34 @@ public AzureArcDataManager authenticate(TokenCredential credential, AzureProfile
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 policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
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 =
@@ -224,7 +287,11 @@ public AzureArcDataManager authenticate(TokenCredential credential, AzureProfile
}
}
- /** @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);
@@ -232,7 +299,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of SqlManagedInstances. */
+ /**
+ * Gets the resource collection API of SqlManagedInstances. It manages SqlManagedInstance.
+ *
+ * @return Resource collection API of SqlManagedInstances.
+ */
public SqlManagedInstances sqlManagedInstances() {
if (this.sqlManagedInstances == null) {
this.sqlManagedInstances = new SqlManagedInstancesImpl(clientObject.getSqlManagedInstances(), this);
@@ -240,7 +311,11 @@ public SqlManagedInstances sqlManagedInstances() {
return sqlManagedInstances;
}
- /** @return Resource collection API of SqlServerInstances. */
+ /**
+ * Gets the resource collection API of SqlServerInstances. It manages SqlServerInstance.
+ *
+ * @return Resource collection API of SqlServerInstances.
+ */
public SqlServerInstances sqlServerInstances() {
if (this.sqlServerInstances == null) {
this.sqlServerInstances = new SqlServerInstancesImpl(clientObject.getSqlServerInstances(), this);
@@ -248,7 +323,11 @@ public SqlServerInstances sqlServerInstances() {
return sqlServerInstances;
}
- /** @return Resource collection API of DataControllers. */
+ /**
+ * Gets the resource collection API of DataControllers. It manages DataControllerResource.
+ *
+ * @return Resource collection API of DataControllers.
+ */
public DataControllers dataControllers() {
if (this.dataControllers == null) {
this.dataControllers = new DataControllersImpl(clientObject.getDataControllers(), this);
@@ -256,6 +335,43 @@ public DataControllers dataControllers() {
return dataControllers;
}
+ /**
+ * Gets the resource collection API of ActiveDirectoryConnectors. It manages ActiveDirectoryConnectorResource.
+ *
+ * @return Resource collection API of ActiveDirectoryConnectors.
+ */
+ public ActiveDirectoryConnectors activeDirectoryConnectors() {
+ if (this.activeDirectoryConnectors == null) {
+ this.activeDirectoryConnectors =
+ new ActiveDirectoryConnectorsImpl(clientObject.getActiveDirectoryConnectors(), this);
+ }
+ return activeDirectoryConnectors;
+ }
+
+ /**
+ * Gets the resource collection API of PostgresInstances. It manages PostgresInstance.
+ *
+ * @return Resource collection API of PostgresInstances.
+ */
+ public PostgresInstances postgresInstances() {
+ if (this.postgresInstances == null) {
+ this.postgresInstances = new PostgresInstancesImpl(clientObject.getPostgresInstances(), this);
+ }
+ return postgresInstances;
+ }
+
+ /**
+ * Gets the resource collection API of SqlServerDatabases. It manages SqlServerDatabaseResource.
+ *
+ * @return Resource collection API of SqlServerDatabases.
+ */
+ public SqlServerDatabases sqlServerDatabases() {
+ if (this.sqlServerDatabases == null) {
+ this.sqlServerDatabases = new SqlServerDatabasesImpl(clientObject.getSqlServerDatabases(), this);
+ }
+ return sqlServerDatabases;
+ }
+
/**
* @return Wrapped service client AzureArcDataManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/ActiveDirectoryConnectorsClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/ActiveDirectoryConnectorsClient.java
new file mode 100644
index 000000000000..9ff9ecf9e920
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/ActiveDirectoryConnectorsClient.java
@@ -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 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 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, 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, 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, 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, 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.
+ * @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 getWithResponse(
+ 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);
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/AzureArcDataManagementClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/AzureArcDataManagementClient.java
index da11f09fe2a9..64c6fc8c919f 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/AzureArcDataManagementClient.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/AzureArcDataManagementClient.java
@@ -71,4 +71,25 @@ public interface AzureArcDataManagementClient {
* @return the DataControllersClient object.
*/
DataControllersClient getDataControllers();
+
+ /**
+ * Gets the ActiveDirectoryConnectorsClient object to access its operations.
+ *
+ * @return the ActiveDirectoryConnectorsClient object.
+ */
+ ActiveDirectoryConnectorsClient getActiveDirectoryConnectors();
+
+ /**
+ * Gets the PostgresInstancesClient object to access its operations.
+ *
+ * @return the PostgresInstancesClient object.
+ */
+ PostgresInstancesClient getPostgresInstances();
+
+ /**
+ * Gets the SqlServerDatabasesClient object to access its operations.
+ *
+ * @return the SqlServerDatabasesClient object.
+ */
+ SqlServerDatabasesClient getSqlServerDatabases();
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/DataControllersClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/DataControllersClient.java
index d8c03b698926..dcbaee8c705b 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/DataControllersClient.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/DataControllersClient.java
@@ -21,7 +21,7 @@ public interface DataControllersClient {
*
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -33,7 +33,7 @@ public interface DataControllersClient {
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -45,7 +45,7 @@ public interface DataControllersClient {
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -58,7 +58,7 @@ public interface DataControllersClient {
* @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 response.
+ * @return a list of data controllers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -67,14 +67,14 @@ public interface DataControllersClient {
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource 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 data controller resource.
+ * @return the {@link SyncPoller} for polling of data controller resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataControllerResourceInner> beginPutDataController(
String resourceGroupName, String dataControllerName, DataControllerResourceInner dataControllerResource);
@@ -82,15 +82,15 @@ SyncPoller, DataControllerResourceInner>
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource 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 data controller resource.
+ * @return the {@link SyncPoller} for polling of data controller resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataControllerResourceInner> beginPutDataController(
String resourceGroupName,
String dataControllerName,
@@ -101,7 +101,7 @@ SyncPoller, DataControllerResourceInner>
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -116,7 +116,7 @@ DataControllerResourceInner putDataController(
* Creates or replaces a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource desc.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -135,27 +135,27 @@ DataControllerResourceInner putDataController(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @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 the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String dataControllerName);
/**
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @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 the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String dataControllerName, Context context);
@@ -163,7 +163,7 @@ SyncPoller, Void> beginDelete(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @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.
@@ -175,7 +175,7 @@ SyncPoller, Void> beginDelete(
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @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.
@@ -188,35 +188,69 @@ SyncPoller, Void> beginDelete(
* Retrieves a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @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 data controller resource.
+ * @return data controller resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DataControllerResourceInner getByResourceGroup(String resourceGroupName, String dataControllerName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String dataControllerName, Context context);
/**
* Retrieves a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
- * @param context The context to associate with this operation.
+ * @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 data controller resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String dataControllerName, Context context);
+ DataControllerResourceInner getByResourceGroup(String resourceGroupName, String dataControllerName);
+
+ /**
+ * Updates a dataController resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
+ * @param dataControllerResource The update data controller resource.
+ * @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 data controller resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataControllerResourceInner> beginPatchDataController(
+ String resourceGroupName, String dataControllerName, DataControllerUpdate dataControllerResource);
/**
* Updates a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
+ * @param dataControllerResource The update data controller resource.
+ * @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 data controller resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataControllerResourceInner> beginPatchDataController(
+ String resourceGroupName,
+ String dataControllerName,
+ DataControllerUpdate dataControllerResource,
+ Context context);
+
+ /**
+ * Updates a dataController resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource The update data controller resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -231,7 +265,7 @@ DataControllerResourceInner patchDataController(
* Updates a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param dataControllerName The dataControllerName parameter.
+ * @param dataControllerName The name of the data controller.
* @param dataControllerResource The update data controller resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -240,7 +274,7 @@ DataControllerResourceInner patchDataController(
* @return data controller resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response patchDataControllerWithResponse(
+ DataControllerResourceInner patchDataController(
String resourceGroupName,
String dataControllerName,
DataControllerUpdate dataControllerResource,
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/OperationsClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/OperationsClient.java
index 41bea71529e2..532d935f2205 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/OperationsClient.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/OperationsClient.java
@@ -17,7 +17,8 @@ public interface OperationsClient {
*
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +30,8 @@ public interface OperationsClient {
* @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 result of the request to list Azure Data Services on Azure Arc operations.
+ * @return result of the request to list Azure Data Services on Azure Arc operations as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/PostgresInstancesClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/PostgresInstancesClient.java
new file mode 100644
index 000000000000..238a96a36109
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/PostgresInstancesClient.java
@@ -0,0 +1,242 @@
+// 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.PostgresInstanceInner;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceUpdate;
+
+/** An instance of this class provides access to all the operations defined in PostgresInstancesClient. */
+public interface PostgresInstancesClient {
+ /**
+ * List postgres Instance resources in the subscription.
+ *
+ * @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 PostgresInstance as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List postgres Instance resources in the subscription.
+ *
+ * @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 PostgresInstance as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List postgres Instance resources in the resource group
+ *
+ *
Get a postgres Instances list by Resource group name.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @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 postgres Instances list by Resource group name as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List postgres Instance resources in the resource group
+ *
+ *
Get a postgres Instances list by Resource group name.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @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 postgres Instances list by Resource group name as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Retrieves a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres 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 a Postgres Instance along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String postgresInstanceName, Context context);
+
+ /**
+ * Retrieves a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres 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 a Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PostgresInstanceInner getByResourceGroup(String resourceGroupName, String postgresInstanceName);
+
+ /**
+ * Creates or replaces a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param resource The postgres 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 a Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PostgresInstanceInner> beginCreate(
+ String resourceGroupName, String postgresInstanceName, PostgresInstanceInner resource);
+
+ /**
+ * Creates or replaces a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param resource The postgres 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 a Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PostgresInstanceInner> beginCreate(
+ String resourceGroupName, String postgresInstanceName, PostgresInstanceInner resource, Context context);
+
+ /**
+ * Creates or replaces a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param resource The postgres 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 a Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PostgresInstanceInner create(String resourceGroupName, String postgresInstanceName, PostgresInstanceInner resource);
+
+ /**
+ * Creates or replaces a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param resource The postgres 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 a Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PostgresInstanceInner create(
+ String resourceGroupName, String postgresInstanceName, PostgresInstanceInner resource, Context context);
+
+ /**
+ * Deletes a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres 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, Void> beginDelete(String resourceGroupName, String postgresInstanceName);
+
+ /**
+ * Deletes a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres 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, Void> beginDelete(
+ String resourceGroupName, String postgresInstanceName, Context context);
+
+ /**
+ * Deletes a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres 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 postgresInstanceName);
+
+ /**
+ * Deletes a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres 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 postgresInstanceName, Context context);
+
+ /**
+ * Updates a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param parameters The Postgres 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 a Postgres Instance along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String postgresInstanceName, PostgresInstanceUpdate parameters, Context context);
+
+ /**
+ * Updates a postgres Instance resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param postgresInstanceName Name of Postgres Instance.
+ * @param parameters The Postgres 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 a Postgres Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PostgresInstanceInner update(
+ String resourceGroupName, String postgresInstanceName, PostgresInstanceUpdate parameters);
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlManagedInstancesClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlManagedInstancesClient.java
index 6cb84258c3bb..ef7de143d658 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlManagedInstancesClient.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlManagedInstancesClient.java
@@ -21,7 +21,7 @@ public interface SqlManagedInstancesClient {
*
* @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 SqlManagedInstance.
+ * @return a list of SqlManagedInstance as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -33,32 +33,36 @@ public interface SqlManagedInstancesClient {
* @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 SqlManagedInstance.
+ * @return a list of SqlManagedInstance as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
/**
- * Gets all sqlManagedInstances in a resource group.
+ * List sqlManagedInstance resources in the resource group
+ *
+ *
Gets all sqlManagedInstances in a resource group.
*
* @param resourceGroupName The name of the Azure resource group.
* @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 all sqlManagedInstances in a resource group.
+ * @return all sqlManagedInstances in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Gets all sqlManagedInstances in a resource group.
+ * List sqlManagedInstance resources in the resource group
+ *
+ *
Gets all sqlManagedInstances in a resource group.
*
* @param resourceGroupName The name of the Azure resource group.
* @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 all sqlManagedInstances in a resource group.
+ * @return all sqlManagedInstances in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -68,41 +72,41 @@ public interface SqlManagedInstancesClient {
*
* @param resourceGroupName The name of the Azure resource group.
* @param sqlManagedInstanceName Name of SQL Managed 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 a SqlManagedInstance.
+ * @return a SqlManagedInstance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SqlManagedInstanceInner getByResourceGroup(String resourceGroupName, String sqlManagedInstanceName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sqlManagedInstanceName, Context context);
/**
* Retrieves a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param sqlManagedInstanceName Name of SQL Managed 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 a SqlManagedInstance.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String sqlManagedInstanceName, Context context);
+ SqlManagedInstanceInner getByResourceGroup(String resourceGroupName, String sqlManagedInstanceName);
/**
* Creates or replaces a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of SQL Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param sqlManagedInstance The SQL Managed Instance to be created or updated.
* @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 SqlManagedInstance.
+ * @return the {@link SyncPoller} for polling of a SqlManagedInstance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlManagedInstanceInner> beginCreate(
String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceInner sqlManagedInstance);
@@ -110,15 +114,15 @@ SyncPoller, SqlManagedInstanceInner> beginCr
* Creates or replaces a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of SQL Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param sqlManagedInstance The SQL Managed Instance to be created or updated.
* @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 SqlManagedInstance.
+ * @return the {@link SyncPoller} for polling of a SqlManagedInstance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlManagedInstanceInner> beginCreate(
String resourceGroupName,
String sqlManagedInstanceName,
@@ -129,7 +133,7 @@ SyncPoller, SqlManagedInstanceInner> beginCr
* Creates or replaces a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of SQL Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param sqlManagedInstance The SQL Managed Instance to be created or updated.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -144,7 +148,7 @@ SqlManagedInstanceInner create(
* Creates or replaces a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of SQL Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param sqlManagedInstance The SQL Managed Instance to be created or updated.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -163,27 +167,27 @@ SqlManagedInstanceInner create(
* Deletes a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of Sql Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed 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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String sqlManagedInstanceName);
/**
* Deletes a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of Sql Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed 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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlManagedInstanceName, Context context);
@@ -191,7 +195,7 @@ SyncPoller, Void> beginDelete(
* Deletes a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of Sql Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed 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.
@@ -203,7 +207,7 @@ SyncPoller, Void> beginDelete(
* Deletes a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName The name of Sql Managed Instances.
+ * @param sqlManagedInstanceName Name of SQL Managed 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.
@@ -216,30 +220,30 @@ SyncPoller, Void> beginDelete(
* Updates a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName Name of sqlManagedInstance.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param parameters The SQL Managed 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 a SqlManagedInstance.
+ * @return a SqlManagedInstance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SqlManagedInstanceInner update(
- String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceUpdate parameters);
+ Response updateWithResponse(
+ String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceUpdate parameters, Context context);
/**
* Updates a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlManagedInstanceName Name of sqlManagedInstance.
+ * @param sqlManagedInstanceName Name of SQL Managed Instance.
* @param parameters The SQL Managed 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 a SqlManagedInstance.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
- String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceUpdate parameters, Context context);
+ SqlManagedInstanceInner update(
+ String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceUpdate parameters);
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerDatabasesClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerDatabasesClient.java
new file mode 100644
index 000000000000..75c5aae7591d
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerDatabasesClient.java
@@ -0,0 +1,183 @@
+// 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.util.Context;
+import com.azure.resourcemanager.azurearcdata.fluent.models.SqlServerDatabaseResourceInner;
+import com.azure.resourcemanager.azurearcdata.models.SqlServerDatabaseUpdate;
+
+/** An instance of this class provides access to all the operations defined in SqlServerDatabasesClient. */
+public interface SqlServerDatabasesClient {
+ /**
+ * Creates or replaces an Arc Sql Server Database.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
+ * @param databaseName Name of the database.
+ * @param sqlServerDatabaseResource The request body for database resource.
+ * @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 arc Sql Server database along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createWithResponse(
+ String resourceGroupName,
+ String sqlServerInstanceName,
+ String databaseName,
+ SqlServerDatabaseResourceInner sqlServerDatabaseResource,
+ Context context);
+
+ /**
+ * Creates or replaces an Arc Sql Server Database.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
+ * @param databaseName Name of the database.
+ * @param sqlServerDatabaseResource The request body for database resource.
+ * @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 arc Sql Server database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlServerDatabaseResourceInner create(
+ String resourceGroupName,
+ String sqlServerInstanceName,
+ String databaseName,
+ SqlServerDatabaseResourceInner sqlServerDatabaseResource);
+
+ /**
+ * Deletes an Arc Sql Server database resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
+ * @param databaseName Name of the database.
+ * @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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String sqlServerInstanceName, String databaseName, Context context);
+
+ /**
+ * Deletes an Arc Sql Server database resource.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
+ * @param databaseName Name of the database.
+ * @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 sqlServerInstanceName, String databaseName);
+
+ /**
+ * Retrieves an Arc Sql Server database.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
+ * @param databaseName Name of the database.
+ * @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 arc Sql Server database along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String sqlServerInstanceName, String databaseName, Context context);
+
+ /**
+ * Retrieves an Arc Sql Server database.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
+ * @param databaseName Name of the database.
+ * @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 arc Sql Server database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlServerDatabaseResourceInner get(String resourceGroupName, String sqlServerInstanceName, String databaseName);
+
+ /**
+ * Updates an existing database.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
+ * @param databaseName Name of the database.
+ * @param sqlServerDatabaseUpdate The requested database resource state.
+ * @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 arc Sql Server database along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String sqlServerInstanceName,
+ String databaseName,
+ SqlServerDatabaseUpdate sqlServerDatabaseUpdate,
+ Context context);
+
+ /**
+ * Updates an existing database.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
+ * @param databaseName Name of the database.
+ * @param sqlServerDatabaseUpdate The requested database resource state.
+ * @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 arc Sql Server database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlServerDatabaseResourceInner update(
+ String resourceGroupName,
+ String sqlServerInstanceName,
+ String databaseName,
+ SqlServerDatabaseUpdate sqlServerDatabaseUpdate);
+
+ /**
+ * List the databases associated with the given Arc Sql Server.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param sqlServerInstanceName Name of SQL Server 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 a list of Arc Sql Server database as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String sqlServerInstanceName);
+
+ /**
+ * List the databases associated with the given Arc Sql Server.
+ *
+ * @param resourceGroupName The name of the Azure resource group.
+ * @param sqlServerInstanceName Name of SQL Server 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 a list of Arc Sql Server database as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName, String sqlServerInstanceName, Context context);
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerInstancesClient.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerInstancesClient.java
index 6e362cf1ec4a..961c481412a4 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerInstancesClient.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/SqlServerInstancesClient.java
@@ -21,7 +21,7 @@ public interface SqlServerInstancesClient {
*
* @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 SqlServerInstance.
+ * @return a list of SqlServerInstance as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -33,32 +33,36 @@ public interface SqlServerInstancesClient {
* @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 SqlServerInstance.
+ * @return a list of SqlServerInstance as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
/**
- * Gets all sqlServerInstances in a resource group.
+ * List sqlServerInstance resources in the resource group
+ *
+ *
Gets all sqlServerInstances in a resource group.
*
* @param resourceGroupName The name of the Azure resource group.
* @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 all sqlServerInstances in a resource group.
+ * @return all sqlServerInstances in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Gets all sqlServerInstances in a resource group.
+ * List sqlServerInstance resources in the resource group
+ *
+ *
Gets all sqlServerInstances in a resource group.
*
* @param resourceGroupName The name of the Azure resource group.
* @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 all sqlServerInstances in a resource group.
+ * @return all sqlServerInstances in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -68,41 +72,41 @@ public interface SqlServerInstancesClient {
*
* @param resourceGroupName The name of the Azure resource group.
* @param sqlServerInstanceName Name of SQL Server 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 a SqlServerInstance.
+ * @return a SqlServerInstance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SqlServerInstanceInner getByResourceGroup(String resourceGroupName, String sqlServerInstanceName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sqlServerInstanceName, Context context);
/**
* Retrieves a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param sqlServerInstanceName Name of SQL Server 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 a SqlServerInstance.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String sqlServerInstanceName, Context context);
+ SqlServerInstanceInner getByResourceGroup(String resourceGroupName, String sqlServerInstanceName);
/**
* Creates or replaces a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param sqlServerInstance The SQL Server Instance to be created or updated.
* @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 SqlServerInstance.
+ * @return the {@link SyncPoller} for polling of a SqlServerInstance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlServerInstanceInner> beginCreate(
String resourceGroupName, String sqlServerInstanceName, SqlServerInstanceInner sqlServerInstance);
@@ -110,15 +114,15 @@ SyncPoller, SqlServerInstanceInner> beginCrea
* Creates or replaces a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param sqlServerInstance The SQL Server Instance to be created or updated.
* @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 SqlServerInstance.
+ * @return the {@link SyncPoller} for polling of a SqlServerInstance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlServerInstanceInner> beginCreate(
String resourceGroupName,
String sqlServerInstanceName,
@@ -129,7 +133,7 @@ SyncPoller, SqlServerInstanceInner> beginCrea
* Creates or replaces a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param sqlServerInstance The SQL Server Instance to be created or updated.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -144,7 +148,7 @@ SqlServerInstanceInner create(
* Creates or replaces a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param sqlServerInstance The SQL Server Instance to be created or updated.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -163,27 +167,27 @@ SqlServerInstanceInner create(
* Deletes a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server 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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String sqlServerInstanceName);
/**
* Deletes a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server 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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlServerInstanceName, Context context);
@@ -191,7 +195,7 @@ SyncPoller, Void> beginDelete(
* Deletes a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server 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.
@@ -203,7 +207,7 @@ SyncPoller, Void> beginDelete(
* Deletes a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName The name of SQL Server Instance.
+ * @param sqlServerInstanceName Name of SQL Server 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.
@@ -216,30 +220,30 @@ SyncPoller, Void> beginDelete(
* Updates a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName Name of sqlServerInstance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param parameters The SQL Server 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 a SqlServerInstance.
+ * @return a SqlServerInstance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SqlServerInstanceInner update(
- String resourceGroupName, String sqlServerInstanceName, SqlServerInstanceUpdate parameters);
+ Response updateWithResponse(
+ String resourceGroupName, String sqlServerInstanceName, SqlServerInstanceUpdate parameters, Context context);
/**
* Updates a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
- * @param sqlServerInstanceName Name of sqlServerInstance.
+ * @param sqlServerInstanceName Name of SQL Server Instance.
* @param parameters The SQL Server 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 a SqlServerInstance.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
- String resourceGroupName, String sqlServerInstanceName, SqlServerInstanceUpdate parameters, Context context);
+ SqlServerInstanceInner update(
+ String resourceGroupName, String sqlServerInstanceName, SqlServerInstanceUpdate parameters);
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/ActiveDirectoryConnectorResourceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/ActiveDirectoryConnectorResourceInner.java
new file mode 100644
index 000000000000..040f024a5515
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/ActiveDirectoryConnectorResourceInner.java
@@ -0,0 +1,79 @@
+// 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.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Active directory connector resource. */
+@Fluent
+public final class ActiveDirectoryConnectorResourceInner extends ProxyResource {
+ /*
+ * null
+ */
+ @JsonProperty(value = "properties", required = true)
+ private ActiveDirectoryConnectorProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of ActiveDirectoryConnectorResourceInner class. */
+ public ActiveDirectoryConnectorResourceInner() {
+ }
+
+ /**
+ * Get the properties property: null.
+ *
+ * @return the properties value.
+ */
+ public ActiveDirectoryConnectorProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: null.
+ *
+ * @param properties the properties value to set.
+ * @return the ActiveDirectoryConnectorResourceInner object itself.
+ */
+ public ActiveDirectoryConnectorResourceInner withProperties(ActiveDirectoryConnectorProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property properties in model ActiveDirectoryConnectorResourceInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConnectorResourceInner.class);
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/DataControllerResourceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/DataControllerResourceInner.java
index e3519feb731f..17b7eedbd88c 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/DataControllerResourceInner.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/DataControllerResourceInner.java
@@ -10,15 +10,12 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.azurearcdata.models.DataControllerProperties;
import com.azure.resourcemanager.azurearcdata.models.ExtendedLocation;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Data controller resource. */
@Fluent
public final class DataControllerResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DataControllerResourceInner.class);
-
/*
* The extendedLocation of the resource.
*/
@@ -32,11 +29,15 @@ public final class DataControllerResourceInner extends Resource {
private DataControllerProperties properties;
/*
- * Read only system data
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /** Creates an instance of DataControllerResourceInner class. */
+ public DataControllerResourceInner() {
+ }
+
/**
* Get the extendedLocation property: The extendedLocation of the resource.
*
@@ -78,7 +79,7 @@ public DataControllerResourceInner withProperties(DataControllerProperties prope
}
/**
- * Get the systemData property: Read only system data.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -110,7 +111,7 @@ public void validate() {
extendedLocation().validate();
}
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property properties in model DataControllerResourceInner"));
@@ -118,4 +119,6 @@ public void validate() {
properties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DataControllerResourceInner.class);
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/OperationInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/OperationInner.java
index b57633882bc6..7671b9e3e146 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/OperationInner.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/OperationInner.java
@@ -8,7 +8,6 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.azurearcdata.models.OperationDisplay;
import com.azure.resourcemanager.azurearcdata.models.OperationOrigin;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -16,8 +15,6 @@
/** Azure Data Services on Azure Arc operation definition. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* The name of the operation being performed on this particular object.
*/
@@ -25,8 +22,7 @@ public final class OperationInner {
private String name;
/*
- * The localized display information for this particular operation /
- * action.
+ * The localized display information for this particular operation / action.
*/
@JsonProperty(value = "display", required = true)
private OperationDisplay display;
@@ -50,6 +46,10 @@ public final class OperationInner {
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map properties;
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
/**
* Get the name property: The name of the operation being performed on this particular object.
*
@@ -135,16 +135,18 @@ public Map properties() {
*/
public void validate() {
if (name() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property name in model OperationInner"));
}
if (display() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property display in model OperationInner"));
} else {
display().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperationInner.class);
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/PostgresInstanceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/PostgresInstanceInner.java
new file mode 100644
index 000000000000..20211e35ae36
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/PostgresInstanceInner.java
@@ -0,0 +1,154 @@
+// 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.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurearcdata.models.ExtendedLocation;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceProperties;
+import com.azure.resourcemanager.azurearcdata.models.PostgresInstanceSku;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** A Postgres Instance. */
+@Fluent
+public final class PostgresInstanceInner extends Resource {
+ /*
+ * The extendedLocation of the resource.
+ */
+ @JsonProperty(value = "extendedLocation")
+ private ExtendedLocation extendedLocation;
+
+ /*
+ * null
+ */
+ @JsonProperty(value = "properties", required = true)
+ private PostgresInstanceProperties properties;
+
+ /*
+ * Resource sku.
+ */
+ @JsonProperty(value = "sku")
+ private PostgresInstanceSku sku;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of PostgresInstanceInner class. */
+ public PostgresInstanceInner() {
+ }
+
+ /**
+ * Get the extendedLocation property: The extendedLocation of the resource.
+ *
+ * @return the extendedLocation value.
+ */
+ public ExtendedLocation extendedLocation() {
+ return this.extendedLocation;
+ }
+
+ /**
+ * Set the extendedLocation property: The extendedLocation of the resource.
+ *
+ * @param extendedLocation the extendedLocation value to set.
+ * @return the PostgresInstanceInner object itself.
+ */
+ public PostgresInstanceInner withExtendedLocation(ExtendedLocation extendedLocation) {
+ this.extendedLocation = extendedLocation;
+ return this;
+ }
+
+ /**
+ * Get the properties property: null.
+ *
+ * @return the properties value.
+ */
+ public PostgresInstanceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: null.
+ *
+ * @param properties the properties value to set.
+ * @return the PostgresInstanceInner object itself.
+ */
+ public PostgresInstanceInner withProperties(PostgresInstanceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the sku property: Resource sku.
+ *
+ * @return the sku value.
+ */
+ public PostgresInstanceSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: Resource sku.
+ *
+ * @param sku the sku value to set.
+ * @return the PostgresInstanceInner object itself.
+ */
+ public PostgresInstanceInner withSku(PostgresInstanceSku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public PostgresInstanceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public PostgresInstanceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (extendedLocation() != null) {
+ extendedLocation().validate();
+ }
+ if (properties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property properties in model PostgresInstanceInner"));
+ } else {
+ properties().validate();
+ }
+ if (sku() != null) {
+ sku().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(PostgresInstanceInner.class);
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlManagedInstanceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlManagedInstanceInner.java
index 4a4b565009b3..8a61124095f7 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlManagedInstanceInner.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlManagedInstanceInner.java
@@ -11,15 +11,12 @@
import com.azure.resourcemanager.azurearcdata.models.ExtendedLocation;
import com.azure.resourcemanager.azurearcdata.models.SqlManagedInstanceProperties;
import com.azure.resourcemanager.azurearcdata.models.SqlManagedInstanceSku;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** A SqlManagedInstance. */
@Fluent
public final class SqlManagedInstanceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlManagedInstanceInner.class);
-
/*
* null
*/
@@ -39,11 +36,15 @@ public final class SqlManagedInstanceInner extends Resource {
private SqlManagedInstanceSku sku;
/*
- * Read only system data
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /** Creates an instance of SqlManagedInstanceInner class. */
+ public SqlManagedInstanceInner() {
+ }
+
/**
* Get the properties property: null.
*
@@ -105,7 +106,7 @@ public SqlManagedInstanceInner withSku(SqlManagedInstanceSku sku) {
}
/**
- * Get the systemData property: Read only system data.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -134,7 +135,7 @@ public SqlManagedInstanceInner withTags(Map tags) {
*/
public void validate() {
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property properties in model SqlManagedInstanceInner"));
@@ -148,4 +149,6 @@ public void validate() {
sku().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(SqlManagedInstanceInner.class);
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerDatabaseResourceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerDatabaseResourceInner.java
new file mode 100644
index 000000000000..454f43305d47
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerDatabaseResourceInner.java
@@ -0,0 +1,94 @@
+// 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.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurearcdata.models.SqlServerDatabaseResourceProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Arc Sql Server database. */
+@Fluent
+public final class SqlServerDatabaseResourceInner extends Resource {
+ /*
+ * Properties of Arc Sql Server database
+ */
+ @JsonProperty(value = "properties", required = true)
+ private SqlServerDatabaseResourceProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of SqlServerDatabaseResourceInner class. */
+ public SqlServerDatabaseResourceInner() {
+ }
+
+ /**
+ * Get the properties property: Properties of Arc Sql Server database.
+ *
+ * @return the properties value.
+ */
+ public SqlServerDatabaseResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of Arc Sql Server database.
+ *
+ * @param properties the properties value to set.
+ * @return the SqlServerDatabaseResourceInner object itself.
+ */
+ public SqlServerDatabaseResourceInner withProperties(SqlServerDatabaseResourceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SqlServerDatabaseResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SqlServerDatabaseResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property properties in model SqlServerDatabaseResourceInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SqlServerDatabaseResourceInner.class);
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerInstanceInner.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerInstanceInner.java
index 81543824dc99..58e589c096ca 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerInstanceInner.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/fluent/models/SqlServerInstanceInner.java
@@ -7,17 +7,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.azurearcdata.models.SqlServerInstanceProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** A SqlServerInstance. */
@Fluent
public final class SqlServerInstanceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlServerInstanceInner.class);
-
/*
* null
*/
@@ -25,11 +21,15 @@ public final class SqlServerInstanceInner extends Resource {
private SqlServerInstanceProperties properties;
/*
- * Read only system data
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /** Creates an instance of SqlServerInstanceInner class. */
+ public SqlServerInstanceInner() {
+ }
+
/**
* Get the properties property: null.
*
@@ -51,7 +51,7 @@ public SqlServerInstanceInner withProperties(SqlServerInstanceProperties propert
}
/**
- * Get the systemData property: Read only system data.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorResourceImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorResourceImpl.java
new file mode 100644
index 000000000000..7aa76cbf5726
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorResourceImpl.java
@@ -0,0 +1,122 @@
+// 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.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurearcdata.fluent.models.ActiveDirectoryConnectorResourceInner;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorProperties;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorResource;
+
+public final class ActiveDirectoryConnectorResourceImpl
+ implements ActiveDirectoryConnectorResource, ActiveDirectoryConnectorResource.Definition {
+ private ActiveDirectoryConnectorResourceInner innerObject;
+
+ private final com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager;
+
+ ActiveDirectoryConnectorResourceImpl(
+ ActiveDirectoryConnectorResourceInner innerObject,
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public ActiveDirectoryConnectorProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ActiveDirectoryConnectorResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String dataControllerName;
+
+ private String activeDirectoryConnectorName;
+
+ public ActiveDirectoryConnectorResourceImpl withExistingDataController(
+ String resourceGroupName, String dataControllerName) {
+ this.resourceGroupName = resourceGroupName;
+ this.dataControllerName = dataControllerName;
+ return this;
+ }
+
+ public ActiveDirectoryConnectorResource create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActiveDirectoryConnectors()
+ .create(
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.innerModel(),
+ Context.NONE);
+ return this;
+ }
+
+ public ActiveDirectoryConnectorResource create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActiveDirectoryConnectors()
+ .create(
+ resourceGroupName, dataControllerName, activeDirectoryConnectorName, this.innerModel(), context);
+ return this;
+ }
+
+ ActiveDirectoryConnectorResourceImpl(
+ String name, com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager) {
+ this.innerObject = new ActiveDirectoryConnectorResourceInner();
+ this.serviceManager = serviceManager;
+ this.activeDirectoryConnectorName = name;
+ }
+
+ public ActiveDirectoryConnectorResource refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActiveDirectoryConnectors()
+ .getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ActiveDirectoryConnectorResource refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getActiveDirectoryConnectors()
+ .getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context)
+ .getValue();
+ return this;
+ }
+
+ public ActiveDirectoryConnectorResourceImpl withProperties(ActiveDirectoryConnectorProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsClientImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsClientImpl.java
new file mode 100644
index 000000000000..6958128e4304
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsClientImpl.java
@@ -0,0 +1,1206 @@
+// 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.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.azurearcdata.fluent.ActiveDirectoryConnectorsClient;
+import com.azure.resourcemanager.azurearcdata.fluent.models.ActiveDirectoryConnectorResourceInner;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorListResult;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ActiveDirectoryConnectorsClient. */
+public final class ActiveDirectoryConnectorsClientImpl implements ActiveDirectoryConnectorsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ActiveDirectoryConnectorsService service;
+
+ /** The service client containing this operation class. */
+ private final AzureArcDataManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ActiveDirectoryConnectorsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ActiveDirectoryConnectorsClientImpl(AzureArcDataManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ ActiveDirectoryConnectorsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureArcDataManagementClientActiveDirectoryConnectors to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureArcDataManageme")
+ public interface ActiveDirectoryConnectorsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/dataControllers/{dataControllerName}/activeDirectoryConnectors")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataControllerName") String dataControllerName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/dataControllers/{dataControllerName}/activeDirectoryConnectors/{activeDirectoryConnectorName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataControllerName") String dataControllerName,
+ @PathParam("activeDirectoryConnectorName") String activeDirectoryConnectorName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/dataControllers/{dataControllerName}/activeDirectoryConnectors/{activeDirectoryConnectorName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataControllerName") String dataControllerName,
+ @PathParam("activeDirectoryConnectorName") String activeDirectoryConnectorName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ + "/dataControllers/{dataControllerName}/activeDirectoryConnectors/{activeDirectoryConnectorName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("dataControllerName") String dataControllerName,
+ @PathParam("activeDirectoryConnectorName") String activeDirectoryConnectorName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * 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 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 along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String dataControllerName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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 along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String dataControllerName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * 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 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String dataControllerName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, dataControllerName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * 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 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String dataControllerName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, dataControllerName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * 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 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)
+ public PagedIterable list(
+ String resourceGroupName, String dataControllerName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, 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 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)
+ public PagedIterable list(
+ String resourceGroupName, String dataControllerName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, dataControllerName, 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 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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorResource == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorResource is required and cannot be null."));
+ } else {
+ activeDirectoryConnectorResource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ activeDirectoryConnectorResource,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorResource == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorResource is required and cannot be null."));
+ } else {
+ activeDirectoryConnectorResource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ activeDirectoryConnectorResource,
+ accept,
+ 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 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 PollerFlux} for polling of active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ActiveDirectoryConnectorResourceInner>
+ beginCreateAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource) {
+ Mono>> mono =
+ createWithResponseAsync(
+ resourceGroupName, dataControllerName, activeDirectoryConnectorName, activeDirectoryConnectorResource);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ActiveDirectoryConnectorResourceInner.class,
+ ActiveDirectoryConnectorResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * 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 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 PollerFlux} for polling of active directory connector resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ActiveDirectoryConnectorResourceInner>
+ beginCreateAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ activeDirectoryConnectorResource,
+ context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ActiveDirectoryConnectorResourceInner.class,
+ ActiveDirectoryConnectorResourceInner.class,
+ 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 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)
+ public SyncPoller, ActiveDirectoryConnectorResourceInner>
+ beginCreate(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource) {
+ return beginCreateAsync(
+ resourceGroupName, dataControllerName, activeDirectoryConnectorName, activeDirectoryConnectorResource)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 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)
+ public SyncPoller, ActiveDirectoryConnectorResourceInner>
+ beginCreate(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context) {
+ return beginCreateAsync(
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ activeDirectoryConnectorResource,
+ context)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource) {
+ return beginCreateAsync(
+ resourceGroupName, dataControllerName, activeDirectoryConnectorName, activeDirectoryConnectorResource)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context) {
+ return beginCreateAsync(
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ activeDirectoryConnectorResource,
+ context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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)
+ public ActiveDirectoryConnectorResourceInner create(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource) {
+ return createAsync(
+ resourceGroupName, dataControllerName, activeDirectoryConnectorName, activeDirectoryConnectorResource)
+ .block();
+ }
+
+ /**
+ * 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 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)
+ public ActiveDirectoryConnectorResourceInner create(
+ String resourceGroupName,
+ String dataControllerName,
+ String activeDirectoryConnectorName,
+ ActiveDirectoryConnectorResourceInner activeDirectoryConnectorResource,
+ Context context) {
+ return createAsync(
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ activeDirectoryConnectorResource,
+ context)
+ .block();
+ }
+
+ /**
+ * 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 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ accept,
+ 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 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 PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * 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 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 PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, 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 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)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ return beginDeleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName).getSyncPoller();
+ }
+
+ /**
+ * 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 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)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ return beginDeleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 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 {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ return beginDeleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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 {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ return beginDeleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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)
+ public void delete(String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ deleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName).block();
+ }
+
+ /**
+ * 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 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)
+ public void delete(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ deleteAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context).block();
+ }
+
+ /**
+ * 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 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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (dataControllerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter dataControllerName is required and cannot be null."));
+ }
+ if (activeDirectoryConnectorName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter activeDirectoryConnectorName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ dataControllerName,
+ activeDirectoryConnectorName,
+ this.client.getApiVersion(),
+ accept,
+ 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 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ return getWithResponseAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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 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)
+ public Response getWithResponse(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ return getWithResponseAsync(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context)
+ .block();
+ }
+
+ /**
+ * 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 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)
+ public ActiveDirectoryConnectorResourceInner get(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ return getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsImpl.java
new file mode 100644
index 000000000000..2fe937c8e39d
--- /dev/null
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/ActiveDirectoryConnectorsImpl.java
@@ -0,0 +1,214 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurearcdata.fluent.ActiveDirectoryConnectorsClient;
+import com.azure.resourcemanager.azurearcdata.fluent.models.ActiveDirectoryConnectorResourceInner;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectorResource;
+import com.azure.resourcemanager.azurearcdata.models.ActiveDirectoryConnectors;
+
+public final class ActiveDirectoryConnectorsImpl implements ActiveDirectoryConnectors {
+ private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConnectorsImpl.class);
+
+ private final ActiveDirectoryConnectorsClient innerClient;
+
+ private final com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager;
+
+ public ActiveDirectoryConnectorsImpl(
+ ActiveDirectoryConnectorsClient innerClient,
+ com.azure.resourcemanager.azurearcdata.AzureArcDataManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String dataControllerName) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, dataControllerName);
+ return Utils.mapPage(inner, inner1 -> new ActiveDirectoryConnectorResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String resourceGroupName, String dataControllerName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, dataControllerName, context);
+ return Utils.mapPage(inner, inner1 -> new ActiveDirectoryConnectorResourceImpl(inner1, this.manager()));
+ }
+
+ public void delete(String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ this.serviceClient().delete(resourceGroupName, dataControllerName, activeDirectoryConnectorName);
+ }
+
+ public void delete(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ this.serviceClient().delete(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context);
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ActiveDirectoryConnectorResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ActiveDirectoryConnectorResource get(
+ String resourceGroupName, String dataControllerName, String activeDirectoryConnectorName) {
+ ActiveDirectoryConnectorResourceInner inner =
+ this.serviceClient().get(resourceGroupName, dataControllerName, activeDirectoryConnectorName);
+ if (inner != null) {
+ return new ActiveDirectoryConnectorResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public ActiveDirectoryConnectorResource getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
+ if (dataControllerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'dataControllers'.", id)));
+ }
+ String activeDirectoryConnectorName = Utils.getValueFromIdByName(id, "activeDirectoryConnectors");
+ if (activeDirectoryConnectorName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConnectors'.",
+ id)));
+ }
+ return this
+ .getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
+ if (dataControllerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'dataControllers'.", id)));
+ }
+ String activeDirectoryConnectorName = Utils.getValueFromIdByName(id, "activeDirectoryConnectors");
+ if (activeDirectoryConnectorName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConnectors'.",
+ id)));
+ }
+ return this.getWithResponse(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
+ if (dataControllerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'dataControllers'.", id)));
+ }
+ String activeDirectoryConnectorName = Utils.getValueFromIdByName(id, "activeDirectoryConnectors");
+ if (activeDirectoryConnectorName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConnectors'.",
+ id)));
+ }
+ this.delete(resourceGroupName, dataControllerName, activeDirectoryConnectorName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String dataControllerName = Utils.getValueFromIdByName(id, "dataControllers");
+ if (dataControllerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'dataControllers'.", id)));
+ }
+ String activeDirectoryConnectorName = Utils.getValueFromIdByName(id, "activeDirectoryConnectors");
+ if (activeDirectoryConnectorName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConnectors'.",
+ id)));
+ }
+ this.delete(resourceGroupName, dataControllerName, activeDirectoryConnectorName, context);
+ }
+
+ private ActiveDirectoryConnectorsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager() {
+ return this.serviceManager;
+ }
+
+ public ActiveDirectoryConnectorResourceImpl define(String name) {
+ return new ActiveDirectoryConnectorResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientBuilder.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientBuilder.java
index 142dec68b8ef..e3b215d7bf7c 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientBuilder.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public AzureArcDataManagementClientBuilder environment(AzureEnvironment environm
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the AzureArcDataManagementClientBuilder.
*/
- public AzureArcDataManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public AzureArcDataManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the AzureArcDataManagementClientBuilder.
*/
- public AzureArcDataManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public AzureArcDataManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -120,27 +119,26 @@ public AzureArcDataManagementClientBuilder serializerAdapter(SerializerAdapter s
* @return an instance of AzureArcDataManagementClientImpl.
*/
public AzureArcDataManagementClientImpl buildClient() {
- if (endpoint == null) {
- this.endpoint = "https://management.azure.com";
- }
- if (environment == null) {
- this.environment = AzureEnvironment.AZURE;
- }
- if (defaultPollInterval == null) {
- this.defaultPollInterval = Duration.ofSeconds(30);
- }
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
- if (serializerAdapter == null) {
- this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
- }
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
AzureArcDataManagementClientImpl client =
new AzureArcDataManagementClientImpl(
- pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
return client;
}
}
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientImpl.java b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientImpl.java
index 257e747d16b1..3ba7a7bdb1b4 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientImpl.java
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/implementation/AzureArcDataManagementClientImpl.java
@@ -15,16 +15,20 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.azurearcdata.fluent.ActiveDirectoryConnectorsClient;
import com.azure.resourcemanager.azurearcdata.fluent.AzureArcDataManagementClient;
import com.azure.resourcemanager.azurearcdata.fluent.DataControllersClient;
import com.azure.resourcemanager.azurearcdata.fluent.OperationsClient;
+import com.azure.resourcemanager.azurearcdata.fluent.PostgresInstancesClient;
import com.azure.resourcemanager.azurearcdata.fluent.SqlManagedInstancesClient;
+import com.azure.resourcemanager.azurearcdata.fluent.SqlServerDatabasesClient;
import com.azure.resourcemanager.azurearcdata.fluent.SqlServerInstancesClient;
import java.io.IOException;
import java.lang.reflect.Type;
@@ -32,15 +36,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the AzureArcDataManagementClientImpl type. */
@ServiceClient(builder = AzureArcDataManagementClientBuilder.class)
public final class AzureArcDataManagementClientImpl implements AzureArcDataManagementClient {
- private final ClientLogger logger = new ClientLogger(AzureArcDataManagementClientImpl.class);
-
/** The ID of the Azure subscription. */
private final String subscriptionId;
@@ -161,6 +162,42 @@ public DataControllersClient getDataControllers() {
return this.dataControllers;
}
+ /** The ActiveDirectoryConnectorsClient object to access its operations. */
+ private final ActiveDirectoryConnectorsClient activeDirectoryConnectors;
+
+ /**
+ * Gets the ActiveDirectoryConnectorsClient object to access its operations.
+ *
+ * @return the ActiveDirectoryConnectorsClient object.
+ */
+ public ActiveDirectoryConnectorsClient getActiveDirectoryConnectors() {
+ return this.activeDirectoryConnectors;
+ }
+
+ /** The PostgresInstancesClient object to access its operations. */
+ private final PostgresInstancesClient postgresInstances;
+
+ /**
+ * Gets the PostgresInstancesClient object to access its operations.
+ *
+ * @return the PostgresInstancesClient object.
+ */
+ public PostgresInstancesClient getPostgresInstances() {
+ return this.postgresInstances;
+ }
+
+ /** The SqlServerDatabasesClient object to access its operations. */
+ private final SqlServerDatabasesClient sqlServerDatabases;
+
+ /**
+ * Gets the SqlServerDatabasesClient object to access its operations.
+ *
+ * @return the SqlServerDatabasesClient object.
+ */
+ public SqlServerDatabasesClient getSqlServerDatabases() {
+ return this.sqlServerDatabases;
+ }
+
/**
* Initializes an instance of AzureArcDataManagementClient client.
*
@@ -183,11 +220,14 @@ public DataControllersClient getDataControllers() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-08-01";
+ this.apiVersion = "2022-06-15-preview";
this.operations = new OperationsClientImpl(this);
this.sqlManagedInstances = new SqlManagedInstancesClientImpl(this);
this.sqlServerInstances = new SqlServerInstancesClientImpl(this);
this.dataControllers = new DataControllersClientImpl(this);
+ this.activeDirectoryConnectors = new ActiveDirectoryConnectorsClientImpl(this);
+ this.postgresInstances = new PostgresInstancesClientImpl(this);
+ this.sqlServerDatabases = new SqlServerDatabasesClientImpl(this);
}
/**
@@ -206,10 +246,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry