diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 207e867f8dae6..3f4dad0f361ca 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -322,6 +322,7 @@ com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.1;1.
com.azure.resourcemanager:azure-resourcemanager-logz;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-dataprotection;1.0.0-beta.1;1.0.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-cosmos-generated;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/CHANGELOG.md b/sdk/cosmos/azure-resourcemanager-cosmos-generated/CHANGELOG.md
new file mode 100644
index 0000000000000..186caa5cad062
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-11-09)
+
+- Azure Resource Manager CosmosDB client library for Java. This package contains Microsoft Azure SDK for CosmosDB Management SDK. Azure Cosmos DB Database Service Resource Provider REST API. Package tag package-2021-07-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/README.md b/sdk/cosmos/azure-resourcemanager-cosmos-generated/README.md
new file mode 100644
index 0000000000000..3bd6c147545a1
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager CosmosDB client library for Java
+
+Azure Resource Manager CosmosDB client library for Java.
+
+This package contains Microsoft Azure SDK for CosmosDB Management SDK. Azure Cosmos DB Database Service Resource Provider REST API. Package tag package-2021-07-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-cosmos-generated;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-cosmos-generated
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+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.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of 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`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+CosmosDBManager manager = CosmosDBManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmos/azure-resourcemanager-cosmos-generated/SAMPLE.md)
+
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+
+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
+
+
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
+[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
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/SAMPLE.md b/sdk/cosmos/azure-resourcemanager-cosmos-generated/SAMPLE.md
new file mode 100644
index 0000000000000..3da1feafa4e79
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/SAMPLE.md
@@ -0,0 +1,5720 @@
+# Code snippets and samples
+
+
+## CassandraClusters
+
+- [CreateUpdate](#cassandraclusters_createupdate)
+- [Delete](#cassandraclusters_delete)
+- [FetchNodeStatus](#cassandraclusters_fetchnodestatus)
+- [GetBackup](#cassandraclusters_getbackup)
+- [GetByResourceGroup](#cassandraclusters_getbyresourcegroup)
+- [List](#cassandraclusters_list)
+- [ListBackups](#cassandraclusters_listbackups)
+- [ListByResourceGroup](#cassandraclusters_listbyresourcegroup)
+- [RequestRepair](#cassandraclusters_requestrepair)
+- [Update](#cassandraclusters_update)
+
+## CassandraDataCenters
+
+- [CreateUpdate](#cassandradatacenters_createupdate)
+- [Delete](#cassandradatacenters_delete)
+- [Get](#cassandradatacenters_get)
+- [List](#cassandradatacenters_list)
+- [Update](#cassandradatacenters_update)
+
+## CassandraResources
+
+- [CreateUpdateCassandraKeyspace](#cassandraresources_createupdatecassandrakeyspace)
+- [CreateUpdateCassandraTable](#cassandraresources_createupdatecassandratable)
+- [CreateUpdateCassandraView](#cassandraresources_createupdatecassandraview)
+- [DeleteCassandraKeyspace](#cassandraresources_deletecassandrakeyspace)
+- [DeleteCassandraTable](#cassandraresources_deletecassandratable)
+- [DeleteCassandraView](#cassandraresources_deletecassandraview)
+- [GetCassandraKeyspace](#cassandraresources_getcassandrakeyspace)
+- [GetCassandraKeyspaceThroughput](#cassandraresources_getcassandrakeyspacethroughput)
+- [GetCassandraTable](#cassandraresources_getcassandratable)
+- [GetCassandraTableThroughput](#cassandraresources_getcassandratablethroughput)
+- [GetCassandraView](#cassandraresources_getcassandraview)
+- [GetCassandraViewThroughput](#cassandraresources_getcassandraviewthroughput)
+- [ListCassandraKeyspaces](#cassandraresources_listcassandrakeyspaces)
+- [ListCassandraTables](#cassandraresources_listcassandratables)
+- [ListCassandraViews](#cassandraresources_listcassandraviews)
+- [MigrateCassandraKeyspaceToAutoscale](#cassandraresources_migratecassandrakeyspacetoautoscale)
+- [MigrateCassandraKeyspaceToManualThroughput](#cassandraresources_migratecassandrakeyspacetomanualthroughput)
+- [MigrateCassandraTableToAutoscale](#cassandraresources_migratecassandratabletoautoscale)
+- [MigrateCassandraTableToManualThroughput](#cassandraresources_migratecassandratabletomanualthroughput)
+- [MigrateCassandraViewToAutoscale](#cassandraresources_migratecassandraviewtoautoscale)
+- [MigrateCassandraViewToManualThroughput](#cassandraresources_migratecassandraviewtomanualthroughput)
+- [UpdateCassandraKeyspaceThroughput](#cassandraresources_updatecassandrakeyspacethroughput)
+- [UpdateCassandraTableThroughput](#cassandraresources_updatecassandratablethroughput)
+- [UpdateCassandraViewThroughput](#cassandraresources_updatecassandraviewthroughput)
+
+## Collection
+
+- [ListMetricDefinitions](#collection_listmetricdefinitions)
+- [ListMetrics](#collection_listmetrics)
+- [ListUsages](#collection_listusages)
+
+## CollectionPartition
+
+- [ListMetrics](#collectionpartition_listmetrics)
+- [ListUsages](#collectionpartition_listusages)
+
+## CollectionPartitionRegion
+
+- [ListMetrics](#collectionpartitionregion_listmetrics)
+
+## CollectionRegion
+
+- [ListMetrics](#collectionregion_listmetrics)
+
+## Database
+
+- [ListMetricDefinitions](#database_listmetricdefinitions)
+- [ListMetrics](#database_listmetrics)
+- [ListUsages](#database_listusages)
+
+## DatabaseAccountRegion
+
+- [ListMetrics](#databaseaccountregion_listmetrics)
+
+## DatabaseAccounts
+
+- [CheckNameExists](#databaseaccounts_checknameexists)
+- [CreateOrUpdate](#databaseaccounts_createorupdate)
+- [Delete](#databaseaccounts_delete)
+- [FailoverPriorityChange](#databaseaccounts_failoverprioritychange)
+- [GetByResourceGroup](#databaseaccounts_getbyresourcegroup)
+- [GetReadOnlyKeys](#databaseaccounts_getreadonlykeys)
+- [List](#databaseaccounts_list)
+- [ListByResourceGroup](#databaseaccounts_listbyresourcegroup)
+- [ListConnectionStrings](#databaseaccounts_listconnectionstrings)
+- [ListKeys](#databaseaccounts_listkeys)
+- [ListMetricDefinitions](#databaseaccounts_listmetricdefinitions)
+- [ListMetrics](#databaseaccounts_listmetrics)
+- [ListReadOnlyKeys](#databaseaccounts_listreadonlykeys)
+- [ListUsages](#databaseaccounts_listusages)
+- [OfflineRegion](#databaseaccounts_offlineregion)
+- [OnlineRegion](#databaseaccounts_onlineregion)
+- [RegenerateKey](#databaseaccounts_regeneratekey)
+- [Update](#databaseaccounts_update)
+
+## GraphResources
+
+- [CreateUpdateGraph](#graphresources_createupdategraph)
+- [DeleteGraphResource](#graphresources_deletegraphresource)
+- [GetGraph](#graphresources_getgraph)
+- [ListGraphs](#graphresources_listgraphs)
+
+## GremlinResources
+
+- [CreateUpdateGremlinDatabase](#gremlinresources_createupdategremlindatabase)
+- [CreateUpdateGremlinGraph](#gremlinresources_createupdategremlingraph)
+- [DeleteGremlinDatabase](#gremlinresources_deletegremlindatabase)
+- [DeleteGremlinGraph](#gremlinresources_deletegremlingraph)
+- [GetGremlinDatabase](#gremlinresources_getgremlindatabase)
+- [GetGremlinDatabaseThroughput](#gremlinresources_getgremlindatabasethroughput)
+- [GetGremlinGraph](#gremlinresources_getgremlingraph)
+- [GetGremlinGraphThroughput](#gremlinresources_getgremlingraphthroughput)
+- [ListGremlinDatabases](#gremlinresources_listgremlindatabases)
+- [ListGremlinGraphs](#gremlinresources_listgremlingraphs)
+- [MigrateGremlinDatabaseToAutoscale](#gremlinresources_migrategremlindatabasetoautoscale)
+- [MigrateGremlinDatabaseToManualThroughput](#gremlinresources_migrategremlindatabasetomanualthroughput)
+- [MigrateGremlinGraphToAutoscale](#gremlinresources_migrategremlingraphtoautoscale)
+- [MigrateGremlinGraphToManualThroughput](#gremlinresources_migrategremlingraphtomanualthroughput)
+- [UpdateGremlinDatabaseThroughput](#gremlinresources_updategremlindatabasethroughput)
+- [UpdateGremlinGraphThroughput](#gremlinresources_updategremlingraphthroughput)
+
+## MongoDBResources
+
+- [CreateUpdateMongoDBCollection](#mongodbresources_createupdatemongodbcollection)
+- [CreateUpdateMongoDBDatabase](#mongodbresources_createupdatemongodbdatabase)
+- [DeleteMongoDBCollection](#mongodbresources_deletemongodbcollection)
+- [DeleteMongoDBDatabase](#mongodbresources_deletemongodbdatabase)
+- [GetMongoDBCollection](#mongodbresources_getmongodbcollection)
+- [GetMongoDBCollectionThroughput](#mongodbresources_getmongodbcollectionthroughput)
+- [GetMongoDBDatabase](#mongodbresources_getmongodbdatabase)
+- [GetMongoDBDatabaseThroughput](#mongodbresources_getmongodbdatabasethroughput)
+- [ListMongoDBCollections](#mongodbresources_listmongodbcollections)
+- [ListMongoDBDatabases](#mongodbresources_listmongodbdatabases)
+- [MigrateMongoDBCollectionToAutoscale](#mongodbresources_migratemongodbcollectiontoautoscale)
+- [MigrateMongoDBCollectionToManualThroughput](#mongodbresources_migratemongodbcollectiontomanualthroughput)
+- [MigrateMongoDBDatabaseToAutoscale](#mongodbresources_migratemongodbdatabasetoautoscale)
+- [MigrateMongoDBDatabaseToManualThroughput](#mongodbresources_migratemongodbdatabasetomanualthroughput)
+- [UpdateMongoDBCollectionThroughput](#mongodbresources_updatemongodbcollectionthroughput)
+- [UpdateMongoDBDatabaseThroughput](#mongodbresources_updatemongodbdatabasethroughput)
+
+## NotebookWorkspaces
+
+- [CreateOrUpdate](#notebookworkspaces_createorupdate)
+- [Delete](#notebookworkspaces_delete)
+- [Get](#notebookworkspaces_get)
+- [ListByDatabaseAccount](#notebookworkspaces_listbydatabaseaccount)
+- [ListConnectionInfo](#notebookworkspaces_listconnectioninfo)
+- [RegenerateAuthToken](#notebookworkspaces_regenerateauthtoken)
+- [Start](#notebookworkspaces_start)
+
+## Operations
+
+- [List](#operations_list)
+
+## PartitionKeyRangeId
+
+- [ListMetrics](#partitionkeyrangeid_listmetrics)
+
+## PartitionKeyRangeIdRegion
+
+- [ListMetrics](#partitionkeyrangeidregion_listmetrics)
+
+## Percentile
+
+- [ListMetrics](#percentile_listmetrics)
+
+## PercentileSourceTarget
+
+- [ListMetrics](#percentilesourcetarget_listmetrics)
+
+## PercentileTarget
+
+- [ListMetrics](#percentiletarget_listmetrics)
+
+## PrivateEndpointConnections
+
+- [CreateOrUpdate](#privateendpointconnections_createorupdate)
+- [Delete](#privateendpointconnections_delete)
+- [Get](#privateendpointconnections_get)
+- [ListByDatabaseAccount](#privateendpointconnections_listbydatabaseaccount)
+
+## PrivateLinkResources
+
+- [Get](#privatelinkresources_get)
+- [ListByDatabaseAccount](#privatelinkresources_listbydatabaseaccount)
+
+## ResourceProvider
+
+- [List](#resourceprovider_list)
+- [LocationGet](#resourceprovider_locationget)
+
+## RestorableDatabaseAccounts
+
+- [GetByLocation](#restorabledatabaseaccounts_getbylocation)
+- [List](#restorabledatabaseaccounts_list)
+- [ListByLocation](#restorabledatabaseaccounts_listbylocation)
+
+## RestorableMongodbCollections
+
+- [List](#restorablemongodbcollections_list)
+
+## RestorableMongodbDatabases
+
+- [List](#restorablemongodbdatabases_list)
+
+## RestorableMongodbResources
+
+- [List](#restorablemongodbresources_list)
+
+## RestorableSqlContainers
+
+- [List](#restorablesqlcontainers_list)
+
+## RestorableSqlDatabases
+
+- [List](#restorablesqldatabases_list)
+
+## RestorableSqlResources
+
+- [List](#restorablesqlresources_list)
+
+## Service
+
+- [Create](#service_create)
+- [Delete](#service_delete)
+- [Get](#service_get)
+- [List](#service_list)
+
+## SqlResources
+
+- [CreateUpdateSqlContainer](#sqlresources_createupdatesqlcontainer)
+- [CreateUpdateSqlDatabase](#sqlresources_createupdatesqldatabase)
+- [CreateUpdateSqlRoleAssignment](#sqlresources_createupdatesqlroleassignment)
+- [CreateUpdateSqlRoleDefinition](#sqlresources_createupdatesqlroledefinition)
+- [CreateUpdateSqlStoredProcedure](#sqlresources_createupdatesqlstoredprocedure)
+- [CreateUpdateSqlTrigger](#sqlresources_createupdatesqltrigger)
+- [CreateUpdateSqlUserDefinedFunction](#sqlresources_createupdatesqluserdefinedfunction)
+- [DeleteSqlContainer](#sqlresources_deletesqlcontainer)
+- [DeleteSqlDatabase](#sqlresources_deletesqldatabase)
+- [DeleteSqlRoleAssignment](#sqlresources_deletesqlroleassignment)
+- [DeleteSqlRoleDefinition](#sqlresources_deletesqlroledefinition)
+- [DeleteSqlStoredProcedure](#sqlresources_deletesqlstoredprocedure)
+- [DeleteSqlTrigger](#sqlresources_deletesqltrigger)
+- [DeleteSqlUserDefinedFunction](#sqlresources_deletesqluserdefinedfunction)
+- [GetSqlContainer](#sqlresources_getsqlcontainer)
+- [GetSqlContainerThroughput](#sqlresources_getsqlcontainerthroughput)
+- [GetSqlDatabase](#sqlresources_getsqldatabase)
+- [GetSqlDatabaseThroughput](#sqlresources_getsqldatabasethroughput)
+- [GetSqlRoleAssignment](#sqlresources_getsqlroleassignment)
+- [GetSqlRoleDefinition](#sqlresources_getsqlroledefinition)
+- [GetSqlStoredProcedure](#sqlresources_getsqlstoredprocedure)
+- [GetSqlTrigger](#sqlresources_getsqltrigger)
+- [GetSqlUserDefinedFunction](#sqlresources_getsqluserdefinedfunction)
+- [ListSqlContainers](#sqlresources_listsqlcontainers)
+- [ListSqlDatabases](#sqlresources_listsqldatabases)
+- [ListSqlRoleAssignments](#sqlresources_listsqlroleassignments)
+- [ListSqlRoleDefinitions](#sqlresources_listsqlroledefinitions)
+- [ListSqlStoredProcedures](#sqlresources_listsqlstoredprocedures)
+- [ListSqlTriggers](#sqlresources_listsqltriggers)
+- [ListSqlUserDefinedFunctions](#sqlresources_listsqluserdefinedfunctions)
+- [MigrateSqlContainerToAutoscale](#sqlresources_migratesqlcontainertoautoscale)
+- [MigrateSqlContainerToManualThroughput](#sqlresources_migratesqlcontainertomanualthroughput)
+- [MigrateSqlDatabaseToAutoscale](#sqlresources_migratesqldatabasetoautoscale)
+- [MigrateSqlDatabaseToManualThroughput](#sqlresources_migratesqldatabasetomanualthroughput)
+- [RetrieveContinuousBackupInformation](#sqlresources_retrievecontinuousbackupinformation)
+- [UpdateSqlContainerThroughput](#sqlresources_updatesqlcontainerthroughput)
+- [UpdateSqlDatabaseThroughput](#sqlresources_updatesqldatabasethroughput)
+
+## TableResources
+
+- [CreateUpdateTable](#tableresources_createupdatetable)
+- [DeleteTable](#tableresources_deletetable)
+- [GetTable](#tableresources_gettable)
+- [GetTableThroughput](#tableresources_gettablethroughput)
+- [ListTables](#tableresources_listtables)
+- [MigrateTableToAutoscale](#tableresources_migratetabletoautoscale)
+- [MigrateTableToManualThroughput](#tableresources_migratetabletomanualthroughput)
+- [UpdateTableThroughput](#tableresources_updatetablethroughput)
+### CassandraClusters_CreateUpdate
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.AuthenticationMethod;
+import com.azure.resourcemanager.cosmos.generated.models.Certificate;
+import com.azure.resourcemanager.cosmos.generated.models.ClusterResourceProperties;
+import com.azure.resourcemanager.cosmos.generated.models.SeedNode;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CassandraClusters CreateUpdate. */
+public final class CassandraClustersCreateUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraClusterCreate.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraClusterCreate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraClusterCreate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraClusters()
+ .define("cassandra-prod")
+ .withRegion("West US")
+ .withExistingResourceGroup("cassandra-prod-rg")
+ .withTags(mapOf())
+ .withProperties(
+ new ClusterResourceProperties()
+ .withDelegatedManagementSubnetId(
+ "/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management")
+ .withCassandraVersion("3.11")
+ .withClusterNameOverride("ClusterNameIllegalForAzureResource")
+ .withAuthenticationMethod(AuthenticationMethod.CASSANDRA)
+ .withInitialCassandraAdminPassword("mypassword")
+ .withHoursBetweenBackups(24)
+ .withClientCertificates(
+ Arrays
+ .asList(
+ new Certificate()
+ .withPem(
+ "-----BEGIN CERTIFICATE-----\n"
+ + "...Base64 encoded certificate...\n"
+ + "-----END CERTIFICATE-----")))
+ .withExternalGossipCertificates(
+ Arrays
+ .asList(
+ new Certificate()
+ .withPem(
+ "-----BEGIN CERTIFICATE-----\n"
+ + "...Base64 encoded certificate...\n"
+ + "-----END CERTIFICATE-----")))
+ .withExternalSeedNodes(
+ Arrays
+ .asList(
+ new SeedNode().withIpAddress("10.52.221.2"),
+ new SeedNode().withIpAddress("10.52.221.3"),
+ new SeedNode().withIpAddress("10.52.221.4"))))
+ .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;
+ }
+}
+```
+
+### CassandraClusters_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraClusters Delete. */
+public final class CassandraClustersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraClusterDelete.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraClusterDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraClusterDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraClusters().delete("cassandra-prod-rg", "cassandra-prod", Context.NONE);
+ }
+}
+```
+
+### CassandraClusters_FetchNodeStatus
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraClusters FetchNodeStatus. */
+public final class CassandraClustersFetchNodeStatusSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraClusterFetchNodeStatus.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraClusterFetchNodeStatus.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraClusterFetchNodeStatus(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraClusters().fetchNodeStatus("cassandra-prod-rg", "cassandra-prod", Context.NONE);
+ }
+}
+```
+
+### CassandraClusters_GetBackup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraClusters GetBackup. */
+public final class CassandraClustersGetBackupSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraBackup.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraBackup.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraBackup(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraClusters()
+ .getBackupWithResponse("cassandra-prod-rg", "cassandra-prod", "1611250348", Context.NONE);
+ }
+}
+```
+
+### CassandraClusters_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraClusters GetByResourceGroup. */
+public final class CassandraClustersGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraClusterGet.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraClusterGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraClusterGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraClusters().getByResourceGroupWithResponse("cassandra-prod-rg", "cassandra-prod", Context.NONE);
+ }
+}
+```
+
+### CassandraClusters_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraClusters List. */
+public final class CassandraClustersListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraClusterListBySubscription.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraClusterListBySubscription.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraClusterListBySubscription(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraClusters().list(Context.NONE);
+ }
+}
+```
+
+### CassandraClusters_ListBackups
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraClusters ListBackups. */
+public final class CassandraClustersListBackupsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraBackupsList.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraBackupsList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraBackupsList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraClusters().listBackups("cassandra-prod-rg", "cassandra-prod", Context.NONE);
+ }
+}
+```
+
+### CassandraClusters_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraClusters ListByResourceGroup. */
+public final class CassandraClustersListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraClusterListByResourceGroup.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraClusterListByResourceGroup(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraClusters().listByResourceGroup("cassandra-prod-rg", Context.NONE);
+ }
+}
+```
+
+### CassandraClusters_RequestRepair
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.RepairPostBody;
+import java.util.Arrays;
+
+/** Samples for CassandraClusters RequestRepair. */
+public final class CassandraClustersRequestRepairSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraRepair.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraRepair.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraRepair(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraClusters()
+ .requestRepair(
+ "cassandra-prod-rg",
+ "cassandra-prod",
+ new RepairPostBody().withKeyspace("my-keyspace").withTables(Arrays.asList("table1", "table42")),
+ Context.NONE);
+ }
+}
+```
+
+### CassandraClusters_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.AuthenticationMethod;
+import com.azure.resourcemanager.cosmos.generated.models.Certificate;
+import com.azure.resourcemanager.cosmos.generated.models.ClusterResource;
+import com.azure.resourcemanager.cosmos.generated.models.ClusterResourceProperties;
+import com.azure.resourcemanager.cosmos.generated.models.SeedNode;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CassandraClusters Update. */
+public final class CassandraClustersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraClusterPatch.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraClusterPatch.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraClusterPatch(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ ClusterResource resource =
+ manager
+ .cassandraClusters()
+ .getByResourceGroupWithResponse("cassandra-prod-rg", "cassandra-prod", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("owner", "mike"))
+ .withProperties(
+ new ClusterResourceProperties()
+ .withAuthenticationMethod(AuthenticationMethod.NONE)
+ .withHoursBetweenBackups(12)
+ .withExternalGossipCertificates(
+ Arrays
+ .asList(
+ new Certificate()
+ .withPem(
+ "-----BEGIN CERTIFICATE-----\n"
+ + "...Base64 encoded certificate...\n"
+ + "-----END CERTIFICATE-----")))
+ .withExternalSeedNodes(
+ Arrays
+ .asList(
+ new SeedNode().withIpAddress("10.52.221.2"),
+ new SeedNode().withIpAddress("10.52.221.3"),
+ new SeedNode().withIpAddress("10.52.221.4"))))
+ .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;
+ }
+}
+```
+
+### CassandraDataCenters_CreateUpdate
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.DataCenterResourceProperties;
+
+/** Samples for CassandraDataCenters CreateUpdate. */
+public final class CassandraDataCentersCreateUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraDataCenterCreate.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraDataCenterCreate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraDataCenterCreate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraDataCenters()
+ .define("dc1")
+ .withExistingCassandraCluster("cassandra-prod-rg", "cassandra-prod")
+ .withProperties(
+ new DataCenterResourceProperties()
+ .withDataCenterLocation("West US 2")
+ .withDelegatedSubnetId(
+ "/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1-subnet")
+ .withNodeCount(9)
+ .withBase64EncodedCassandraYamlFragment(
+ "Y29tcGFjdGlvbl90aHJvdWdocHV0X21iX3Blcl9zZWM6IDMyCmNvbXBhY3Rpb25fbGFyZ2VfcGFydGl0aW9uX3dhcm5pbmdfdGhyZXNob2xkX21iOiAxMDA="))
+ .create();
+ }
+}
+```
+
+### CassandraDataCenters_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraDataCenters Delete. */
+public final class CassandraDataCentersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraDataCenterDelete.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraDataCenterDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraDataCenterDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraDataCenters().delete("cassandra-prod-rg", "cassandra-prod", "dc1", Context.NONE);
+ }
+}
+```
+
+### CassandraDataCenters_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraDataCenters Get. */
+public final class CassandraDataCentersGetSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraDataCenterGet.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraDataCenterGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraDataCenterGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraDataCenters().getWithResponse("cassandra-prod-rg", "cassandra-prod", "dc1", Context.NONE);
+ }
+}
+```
+
+### CassandraDataCenters_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraDataCenters List. */
+public final class CassandraDataCentersListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraDataCenterList.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraDataCenterList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraDataCenterList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraDataCenters().list("cassandra-prod-rg", "cassandra-prod", Context.NONE);
+ }
+}
+```
+
+### CassandraDataCenters_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.DataCenterResource;
+import com.azure.resourcemanager.cosmos.generated.models.DataCenterResourceProperties;
+
+/** Samples for CassandraDataCenters Update. */
+public final class CassandraDataCentersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBManagedCassandraDataCenterPatch.json
+ */
+ /**
+ * Sample code: CosmosDBManagedCassandraDataCenterUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBManagedCassandraDataCenterUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ DataCenterResource resource =
+ manager
+ .cassandraDataCenters()
+ .getWithResponse("cassandra-prod-rg", "cassandra-prod", "dc1", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new DataCenterResourceProperties()
+ .withDataCenterLocation("West US 2")
+ .withDelegatedSubnetId(
+ "/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1-subnet")
+ .withNodeCount(9)
+ .withBase64EncodedCassandraYamlFragment(
+ "Y29tcGFjdGlvbl90aHJvdWdocHV0X21iX3Blcl9zZWM6IDMyCmNvbXBhY3Rpb25fbGFyZ2VfcGFydGl0aW9uX3dhcm5pbmdfdGhyZXNob2xkX21iOiAxMDA="))
+ .apply();
+ }
+}
+```
+
+### CassandraResources_CreateUpdateCassandraKeyspace
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CassandraKeyspaceResource;
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CassandraResources CreateUpdateCassandraKeyspace. */
+public final class CassandraResourcesCreateUpdateCassandraKeyspaceSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraKeyspaceCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraKeyspaceCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraKeyspaceCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .defineUpdateCassandraKeyspace("keyspaceName")
+ .withRegion("West US")
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .withResource(new CassandraKeyspaceResource().withId("keyspaceName"))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### CassandraResources_CreateUpdateCassandraTable
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CassandraPartitionKey;
+import com.azure.resourcemanager.cosmos.generated.models.CassandraSchema;
+import com.azure.resourcemanager.cosmos.generated.models.CassandraTableResource;
+import com.azure.resourcemanager.cosmos.generated.models.ClusterKey;
+import com.azure.resourcemanager.cosmos.generated.models.Column;
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CassandraResources CreateUpdateCassandraTable. */
+public final class CassandraResourcesCreateUpdateCassandraTableSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraTableCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraTableCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraTableCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .defineUpdateCassandraTable("tableName")
+ .withRegion("West US")
+ .withExistingCassandraKeyspace("rg1", "ddb1", "keyspaceName")
+ .withResource(
+ new CassandraTableResource()
+ .withId("tableName")
+ .withDefaultTtl(100)
+ .withSchema(
+ new CassandraSchema()
+ .withColumns(Arrays.asList(new Column().withName("columnA").withType("Ascii")))
+ .withPartitionKeys(Arrays.asList(new CassandraPartitionKey().withName("columnA")))
+ .withClusterKeys(Arrays.asList(new ClusterKey().withName("columnA").withOrderBy("Asc"))))
+ .withAnalyticalStorageTtl(500))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### CassandraResources_CreateUpdateCassandraView
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CassandraViewResource;
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CassandraResources CreateUpdateCassandraView. */
+public final class CassandraResourcesCreateUpdateCassandraViewSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraViewCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraViewCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraViewCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .defineUpdateCassandraView("viewname")
+ .withRegion((String) null)
+ .withExistingCassandraKeyspace("rg1", "ddb1", "keyspacename")
+ .withResource(
+ new CassandraViewResource()
+ .withId("viewname")
+ .withViewDefinition(
+ "SELECT columna, columnb, columnc FROM keyspacename.srctablename WHERE columna IS NOT NULL AND"
+ + " columnc IS NOT NULL PRIMARY (columnc, columna)"))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### CassandraResources_DeleteCassandraKeyspace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources DeleteCassandraKeyspace. */
+public final class CassandraResourcesDeleteCassandraKeyspaceSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraKeyspaceDelete.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraKeyspaceDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraKeyspaceDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraResources().deleteCassandraKeyspace("rg1", "ddb1", "keyspaceName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_DeleteCassandraTable
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources DeleteCassandraTable. */
+public final class CassandraResourcesDeleteCassandraTableSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraTableDelete.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraTableDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraTableDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraResources().deleteCassandraTable("rg1", "ddb1", "keyspaceName", "tableName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_DeleteCassandraView
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources DeleteCassandraView. */
+public final class CassandraResourcesDeleteCassandraViewSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraViewDelete.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraViewDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraViewDelete(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraResources().deleteCassandraView("rg1", "ddb1", "keyspacename", "viewname", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_GetCassandraKeyspace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources GetCassandraKeyspace. */
+public final class CassandraResourcesGetCassandraKeyspaceSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraKeyspaceGet.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraKeyspaceGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraKeyspaceGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraResources().getCassandraKeyspaceWithResponse("rg1", "ddb1", "keyspaceName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_GetCassandraKeyspaceThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources GetCassandraKeyspaceThroughput. */
+public final class CassandraResourcesGetCassandraKeyspaceThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraKeyspaceThroughputGet.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraKeyspaceThroughputGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraKeyspaceThroughputGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .getCassandraKeyspaceThroughputWithResponse("rg1", "ddb1", "keyspaceName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_GetCassandraTable
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources GetCassandraTable. */
+public final class CassandraResourcesGetCassandraTableSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraTableGet.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraTableGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraTableGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .getCassandraTableWithResponse("rg1", "ddb1", "keyspaceName", "tableName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_GetCassandraTableThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources GetCassandraTableThroughput. */
+public final class CassandraResourcesGetCassandraTableThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraTableThroughputGet.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraTableThroughputGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraTableThroughputGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .getCassandraTableThroughputWithResponse("rg1", "ddb1", "keyspaceName", "tableName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_GetCassandraView
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources GetCassandraView. */
+public final class CassandraResourcesGetCassandraViewSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraViewGet.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraViewGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraViewGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .getCassandraViewWithResponse("rg1", "ddb1", "keyspacename", "viewname", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_GetCassandraViewThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources GetCassandraViewThroughput. */
+public final class CassandraResourcesGetCassandraViewThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraViewThroughputGet.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraViewThroughputGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraViewThroughputGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .getCassandraViewThroughputWithResponse("rg1", "ddb1", "keyspacename", "viewname", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_ListCassandraKeyspaces
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources ListCassandraKeyspaces. */
+public final class CassandraResourcesListCassandraKeyspacesSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraKeyspaceList.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraKeyspaceList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraKeyspaceList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraResources().listCassandraKeyspaces("rgName", "ddb1", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_ListCassandraTables
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources ListCassandraTables. */
+public final class CassandraResourcesListCassandraTablesSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraTableList.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraTableList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraTableList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraResources().listCassandraTables("rgName", "ddb1", "keyspaceName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_ListCassandraViews
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources ListCassandraViews. */
+public final class CassandraResourcesListCassandraViewsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraViewList.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraViewList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraViewList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraResources().listCassandraViews("rgName", "ddb1", "keyspacename", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_MigrateCassandraKeyspaceToAutoscale
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources MigrateCassandraKeyspaceToAutoscale. */
+public final class CassandraResourcesMigrateCassandraKeyspaceToAutoscaleSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraKeyspaceMigrateToAutoscale.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraKeyspaceMigrateToAutoscale(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.cassandraResources().migrateCassandraKeyspaceToAutoscale("rg1", "ddb1", "keyspaceName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_MigrateCassandraKeyspaceToManualThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources MigrateCassandraKeyspaceToManualThroughput. */
+public final class CassandraResourcesMigrateCassandraKeyspaceToManualThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraKeyspaceMigrateToManualThroughput.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraKeyspaceMigrateToManualThroughput(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .migrateCassandraKeyspaceToManualThroughput("rg1", "ddb1", "keyspaceName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_MigrateCassandraTableToAutoscale
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources MigrateCassandraTableToAutoscale. */
+public final class CassandraResourcesMigrateCassandraTableToAutoscaleSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraTableMigrateToAutoscale.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraTableMigrateToAutoscale.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraTableMigrateToAutoscale(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .migrateCassandraTableToAutoscale("rg1", "ddb1", "keyspaceName", "tableName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_MigrateCassandraTableToManualThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources MigrateCassandraTableToManualThroughput. */
+public final class CassandraResourcesMigrateCassandraTableToManualThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraTableMigrateToManualThroughput.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraTableMigrateToManualThroughput.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraTableMigrateToManualThroughput(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .migrateCassandraTableToManualThroughput("rg1", "ddb1", "keyspaceName", "tableName", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_MigrateCassandraViewToAutoscale
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources MigrateCassandraViewToAutoscale. */
+public final class CassandraResourcesMigrateCassandraViewToAutoscaleSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraViewMigrateToAutoscale.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraViewMigrateToAutoscale.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraViewMigrateToAutoscale(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .migrateCassandraViewToAutoscale("rg1", "ddb1", "keyspacename", "viewname", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_MigrateCassandraViewToManualThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CassandraResources MigrateCassandraViewToManualThroughput. */
+public final class CassandraResourcesMigrateCassandraViewToManualThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraViewMigrateToManualThroughput.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraViewMigrateToManualThroughput.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraViewMigrateToManualThroughput(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .migrateCassandraViewToManualThroughput("rg1", "ddb1", "keyspacename", "viewname", Context.NONE);
+ }
+}
+```
+
+### CassandraResources_UpdateCassandraKeyspaceThroughput
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsResource;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CassandraResources UpdateCassandraKeyspaceThroughput. */
+public final class CassandraResourcesUpdateCassandraKeyspaceThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraKeyspaceThroughputUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraKeyspaceThroughputUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .updateCassandraKeyspaceThroughput(
+ "rg1",
+ "ddb1",
+ "keyspaceName",
+ new ThroughputSettingsUpdateParameters()
+ .withLocation("West US")
+ .withTags(mapOf())
+ .withResource(new ThroughputSettingsResource().withThroughput(400)),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### CassandraResources_UpdateCassandraTableThroughput
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsResource;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CassandraResources UpdateCassandraTableThroughput. */
+public final class CassandraResourcesUpdateCassandraTableThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraTableThroughputUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraTableThroughputUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraTableThroughputUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .updateCassandraTableThroughput(
+ "rg1",
+ "ddb1",
+ "keyspaceName",
+ "tableName",
+ new ThroughputSettingsUpdateParameters()
+ .withLocation("West US")
+ .withTags(mapOf())
+ .withResource(new ThroughputSettingsResource().withThroughput(400)),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### CassandraResources_UpdateCassandraViewThroughput
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsResource;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CassandraResources UpdateCassandraViewThroughput. */
+public final class CassandraResourcesUpdateCassandraViewThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCassandraViewThroughputUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBCassandraViewThroughputUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCassandraViewThroughputUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .cassandraResources()
+ .updateCassandraViewThroughput(
+ "rg1",
+ "ddb1",
+ "keyspacename",
+ "viewname",
+ new ThroughputSettingsUpdateParameters()
+ .withTags(mapOf())
+ .withResource(new ThroughputSettingsResource().withThroughput(400)),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### Collection_ListMetricDefinitions
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Collection ListMetricDefinitions. */
+public final class CollectionListMetricDefinitionsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCollectionGetMetricDefinitions.json
+ */
+ /**
+ * Sample code: CosmosDBCollectionGetMetricDefinitions.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCollectionGetMetricDefinitions(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.collections().listMetricDefinitions("rg1", "ddb1", "databaseRid", "collectionRid", Context.NONE);
+ }
+}
+```
+
+### Collection_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Collection ListMetrics. */
+public final class CollectionListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCollectionGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBCollectionGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCollectionGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .collections()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "databaseRid",
+ "collectionRid",
+ "$filter=(name.value eq 'Total Requests') and timeGrain eq duration'PT5M' and startTime eq"
+ + " '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### Collection_ListUsages
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Collection ListUsages. */
+public final class CollectionListUsagesSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCollectionGetUsages.json
+ */
+ /**
+ * Sample code: CosmosDBCollectionGetUsages.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCollectionGetUsages(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .collections()
+ .listUsages("rg1", "ddb1", "databaseRid", "collectionRid", "$filter=name.value eq 'Storage'", Context.NONE);
+ }
+}
+```
+
+### CollectionPartition_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CollectionPartition ListMetrics. */
+public final class CollectionPartitionListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCollectionPartitionGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountRegionGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountRegionGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .collectionPartitions()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "databaseRid",
+ "collectionRid",
+ "$filter=(name.value eq 'Max RUs Per Second') and timeGrain eq duration'PT1M' and startTime eq"
+ + " '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T23:58:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### CollectionPartition_ListUsages
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CollectionPartition ListUsages. */
+public final class CollectionPartitionListUsagesSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCollectionPartitionGetUsages.json
+ */
+ /**
+ * Sample code: CosmosDBCollectionGetUsages.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBCollectionGetUsages(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .collectionPartitions()
+ .listUsages(
+ "rg1",
+ "ddb1",
+ "databaseRid",
+ "collectionRid",
+ "$filter=name.value eq 'Partition Storage'",
+ Context.NONE);
+ }
+}
+```
+
+### CollectionPartitionRegion_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CollectionPartitionRegion ListMetrics. */
+public final class CollectionPartitionRegionListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBCollectionPartitionRegionGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountRegionGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountRegionGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .collectionPartitionRegions()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "North Europe",
+ "databaseRid",
+ "collectionRid",
+ "$filter=(name.value eq 'Max RUs Per Second') and timeGrain eq duration'PT1M' and startTime eq"
+ + " '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T23:58:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### CollectionRegion_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CollectionRegion ListMetrics. */
+public final class CollectionRegionListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRegionCollectionGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBRegionCollectionGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRegionCollectionGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .collectionRegions()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "North Europe",
+ "databaseRid",
+ "collectionRid",
+ "$filter=(name.value eq 'Total Requests') and timeGrain eq duration'PT5M' and startTime eq"
+ + " '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### Database_ListMetricDefinitions
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Database ListMetricDefinitions. */
+public final class DatabaseListMetricDefinitionsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseGetMetricDefinitions.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseGetMetricDefinitions.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseGetMetricDefinitions(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databases().listMetricDefinitions("rg1", "ddb1", "databaseRid", Context.NONE);
+ }
+}
+```
+
+### Database_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Database ListMetrics. */
+public final class DatabaseListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseGetMetrics(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .databases()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "rid",
+ "$filter=(name.value eq 'Total Requests') and timeGrain eq duration'PT5M' and startTime eq"
+ + " '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### Database_ListUsages
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Database ListUsages. */
+public final class DatabaseListUsagesSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseGetUsages.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseGetUsages.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseGetUsages(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databases().listUsages("rg1", "ddb1", "databaseRid", "$filter=name.value eq 'Storage'", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccountRegion_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccountRegion ListMetrics. */
+public final class DatabaseAccountRegionListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountRegionGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountRegionGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountRegionGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .databaseAccountRegions()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "North Europe",
+ "$filter=(name.value eq 'Total Requests') and timeGrain eq duration'PT5M' and startTime eq"
+ + " '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_CheckNameExists
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts CheckNameExists. */
+public final class DatabaseAccountsCheckNameExistsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountCheckNameExists.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountCheckNameExists.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountCheckNameExists(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().checkNameExistsWithResponse("ddb1", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.cosmos.generated.fluent.models.DatabaseRestoreResourceInner;
+import com.azure.resourcemanager.cosmos.generated.models.AnalyticalStorageConfiguration;
+import com.azure.resourcemanager.cosmos.generated.models.AnalyticalStorageSchemaType;
+import com.azure.resourcemanager.cosmos.generated.models.ApiProperties;
+import com.azure.resourcemanager.cosmos.generated.models.BackupStorageRedundancy;
+import com.azure.resourcemanager.cosmos.generated.models.ConsistencyPolicy;
+import com.azure.resourcemanager.cosmos.generated.models.ContinuousModeBackupPolicy;
+import com.azure.resourcemanager.cosmos.generated.models.CorsPolicy;
+import com.azure.resourcemanager.cosmos.generated.models.CreateMode;
+import com.azure.resourcemanager.cosmos.generated.models.DatabaseAccountKind;
+import com.azure.resourcemanager.cosmos.generated.models.DefaultConsistencyLevel;
+import com.azure.resourcemanager.cosmos.generated.models.IpAddressOrRange;
+import com.azure.resourcemanager.cosmos.generated.models.Location;
+import com.azure.resourcemanager.cosmos.generated.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.cosmos.generated.models.ManagedServiceIdentityUserAssignedIdentities;
+import com.azure.resourcemanager.cosmos.generated.models.NetworkAclBypass;
+import com.azure.resourcemanager.cosmos.generated.models.PeriodicModeBackupPolicy;
+import com.azure.resourcemanager.cosmos.generated.models.PeriodicModeProperties;
+import com.azure.resourcemanager.cosmos.generated.models.PublicNetworkAccess;
+import com.azure.resourcemanager.cosmos.generated.models.ResourceIdentityType;
+import com.azure.resourcemanager.cosmos.generated.models.RestoreMode;
+import com.azure.resourcemanager.cosmos.generated.models.RestoreParameters;
+import com.azure.resourcemanager.cosmos.generated.models.ServerVersion;
+import com.azure.resourcemanager.cosmos.generated.models.VirtualNetworkRule;
+import java.time.OffsetDateTime;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for DatabaseAccounts CreateOrUpdate. */
+public final class DatabaseAccountsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBRestoreDatabaseAccountCreateUpdate.json.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRestoreDatabaseAccountCreateUpdateJson(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .databaseAccounts()
+ .define("ddb1")
+ .withRegion("westus")
+ .withExistingResourceGroup("rg1")
+ .withLocations(
+ Arrays
+ .asList(
+ new Location()
+ .withLocationName("southcentralus")
+ .withFailoverPriority(0)
+ .withIsZoneRedundant(false)))
+ .withCreateMode(CreateMode.RESTORE)
+ .withTags(mapOf())
+ .withKind(DatabaseAccountKind.GLOBAL_DOCUMENT_DB)
+ .withConsistencyPolicy(
+ new ConsistencyPolicy()
+ .withDefaultConsistencyLevel(DefaultConsistencyLevel.BOUNDED_STALENESS)
+ .withMaxStalenessPrefix(200L)
+ .withMaxIntervalInSeconds(10))
+ .withKeyVaultKeyUri("https://myKeyVault.vault.azure.net")
+ .withEnableFreeTier(false)
+ .withApiProperties(new ApiProperties().withServerVersion(ServerVersion.THREE_TWO))
+ .withEnableAnalyticalStorage(true)
+ .withBackupPolicy(new ContinuousModeBackupPolicy())
+ .withRestoreParameters(
+ new RestoreParameters()
+ .withRestoreMode(RestoreMode.POINT_IN_TIME)
+ .withRestoreSource(
+ "/subscriptions/subid/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1a97b4bb-f6a0-430e-ade1-638d781830cc")
+ .withRestoreTimestampInUtc(OffsetDateTime.parse("2021-03-11T22:05:09Z"))
+ .withDatabasesToRestore(
+ Arrays
+ .asList(
+ new DatabaseRestoreResourceInner()
+ .withDatabaseName("db1")
+ .withCollectionNames(Arrays.asList("collection1", "collection2")),
+ new DatabaseRestoreResourceInner()
+ .withDatabaseName("db2")
+ .withCollectionNames(Arrays.asList("collection3", "collection4")))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountCreateMax.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountCreateMax.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountCreateMax(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .databaseAccounts()
+ .define("ddb1")
+ .withRegion("westus")
+ .withExistingResourceGroup("rg1")
+ .withLocations(
+ Arrays
+ .asList(
+ new Location()
+ .withLocationName("southcentralus")
+ .withFailoverPriority(0)
+ .withIsZoneRedundant(false),
+ new Location().withLocationName("eastus").withFailoverPriority(1).withIsZoneRedundant(false)))
+ .withCreateMode(CreateMode.DEFAULT)
+ .withTags(mapOf())
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
+ new ManagedServiceIdentityUserAssignedIdentities())))
+ .withKind(DatabaseAccountKind.MONGO_DB)
+ .withConsistencyPolicy(
+ new ConsistencyPolicy()
+ .withDefaultConsistencyLevel(DefaultConsistencyLevel.BOUNDED_STALENESS)
+ .withMaxStalenessPrefix(200L)
+ .withMaxIntervalInSeconds(10))
+ .withIpRules(
+ Arrays
+ .asList(
+ new IpAddressOrRange().withIpAddressOrRange("23.43.230.120"),
+ new IpAddressOrRange().withIpAddressOrRange("110.12.240.0/12")))
+ .withIsVirtualNetworkFilterEnabled(true)
+ .withVirtualNetworkRules(
+ Arrays
+ .asList(
+ new VirtualNetworkRule()
+ .withId(
+ "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")
+ .withIgnoreMissingVNetServiceEndpoint(false)))
+ .withKeyVaultKeyUri("https://myKeyVault.vault.azure.net")
+ .withDefaultIdentity("FirstPartyIdentity")
+ .withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
+ .withEnableFreeTier(false)
+ .withApiProperties(new ApiProperties().withServerVersion(ServerVersion.THREE_TWO))
+ .withEnableAnalyticalStorage(true)
+ .withAnalyticalStorageConfiguration(
+ new AnalyticalStorageConfiguration().withSchemaType(AnalyticalStorageSchemaType.WELL_DEFINED))
+ .withBackupPolicy(
+ new PeriodicModeBackupPolicy()
+ .withPeriodicModeProperties(
+ new PeriodicModeProperties()
+ .withBackupIntervalInMinutes(240)
+ .withBackupRetentionIntervalInHours(8)
+ .withBackupStorageRedundancy(BackupStorageRedundancy.GEO)))
+ .withCors(Arrays.asList(new CorsPolicy().withAllowedOrigins("https://test")))
+ .withNetworkAclBypass(NetworkAclBypass.AZURE_SERVICES)
+ .withNetworkAclBypassResourceIds(
+ Arrays
+ .asList(
+ "/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.Synapse/workspaces/workspaceName"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountCreateMin.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountCreateMin.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountCreateMin(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .databaseAccounts()
+ .define("ddb1")
+ .withRegion("westus")
+ .withExistingResourceGroup("rg1")
+ .withLocations(
+ Arrays
+ .asList(
+ new Location()
+ .withLocationName("southcentralus")
+ .withFailoverPriority(0)
+ .withIsZoneRedundant(false)))
+ .withCreateMode(CreateMode.DEFAULT)
+ .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;
+ }
+}
+```
+
+### DatabaseAccounts_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts Delete. */
+public final class DatabaseAccountsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountDelete.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().delete("rg1", "ddb1", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_FailoverPriorityChange
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.FailoverPolicies;
+import com.azure.resourcemanager.cosmos.generated.models.FailoverPolicy;
+import java.util.Arrays;
+
+/** Samples for DatabaseAccounts FailoverPriorityChange. */
+public final class DatabaseAccountsFailoverPriorityChangeSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountFailoverPriorityChange.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountFailoverPriorityChange(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .databaseAccounts()
+ .failoverPriorityChange(
+ "rg1",
+ "ddb1-failover",
+ new FailoverPolicies()
+ .withFailoverPolicies(
+ Arrays
+ .asList(
+ new FailoverPolicy().withLocationName("eastus").withFailoverPriority(0),
+ new FailoverPolicy().withLocationName("westus").withFailoverPriority(1))),
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts GetByResourceGroup. */
+public final class DatabaseAccountsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountGet.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().getByResourceGroupWithResponse("rg1", "ddb1", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_GetReadOnlyKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts GetReadOnlyKeys. */
+public final class DatabaseAccountsGetReadOnlyKeysSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountListReadOnlyKeys.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountListReadOnlyKeys(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().getReadOnlyKeysWithResponse("rg1", "ddb1", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts List. */
+public final class DatabaseAccountsListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountList.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().list(Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts ListByResourceGroup. */
+public final class DatabaseAccountsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountListByResourceGroup.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountListByResourceGroup.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountListByResourceGroup(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().listByResourceGroup("rg1", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_ListConnectionStrings
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts ListConnectionStrings. */
+public final class DatabaseAccountsListConnectionStringsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountListConnectionStrings.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountListConnectionStrings.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountListConnectionStrings(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().listConnectionStringsWithResponse("rg1", "ddb1", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountListConnectionStringsMongo.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountListConnectionStringsMongo(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().listConnectionStringsWithResponse("rg1", "mongo-ddb1", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_ListKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts ListKeys. */
+public final class DatabaseAccountsListKeysSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountListKeys.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountListKeys.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountListKeys(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().listKeysWithResponse("rg1", "ddb1", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_ListMetricDefinitions
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts ListMetricDefinitions. */
+public final class DatabaseAccountsListMetricDefinitionsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountGetMetricDefinitions.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountGetMetricDefinitions(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().listMetricDefinitions("rg1", "ddb1", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts ListMetrics. */
+public final class DatabaseAccountsListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .databaseAccounts()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "$filter=(name.value eq 'Total Requests') and timeGrain eq duration'PT5M' and startTime eq"
+ + " '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_ListReadOnlyKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts ListReadOnlyKeys. */
+public final class DatabaseAccountsListReadOnlyKeysSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountListReadOnlyKeys.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountListReadOnlyKeys(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().listReadOnlyKeysWithResponse("rg1", "ddb1", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_ListUsages
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAccounts ListUsages. */
+public final class DatabaseAccountsListUsagesSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountGetUsages.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountGetUsages.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountGetUsages(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().listUsages("rg1", "ddb1", "$filter=name.value eq 'Storage'", Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_OfflineRegion
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.RegionForOnlineOffline;
+
+/** Samples for DatabaseAccounts OfflineRegion. */
+public final class DatabaseAccountsOfflineRegionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountOfflineRegion.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountOfflineRegion.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountOfflineRegion(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().offlineRegion("rg1", "ddb1", new RegionForOnlineOffline(), Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_OnlineRegion
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.RegionForOnlineOffline;
+
+/** Samples for DatabaseAccounts OnlineRegion. */
+public final class DatabaseAccountsOnlineRegionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountOnlineRegion.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountOnlineRegion.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountOnlineRegion(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.databaseAccounts().onlineRegion("rg1", "ddb1", new RegionForOnlineOffline(), Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_RegenerateKey
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.DatabaseAccountRegenerateKeyParameters;
+import com.azure.resourcemanager.cosmos.generated.models.KeyKind;
+
+/** Samples for DatabaseAccounts RegenerateKey. */
+public final class DatabaseAccountsRegenerateKeySamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountRegenerateKey.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountRegenerateKey.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountRegenerateKey(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .databaseAccounts()
+ .regenerateKey(
+ "rg1", "ddb1", new DatabaseAccountRegenerateKeyParameters().withKeyKind(KeyKind.PRIMARY), Context.NONE);
+ }
+}
+```
+
+### DatabaseAccounts_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.AnalyticalStorageConfiguration;
+import com.azure.resourcemanager.cosmos.generated.models.AnalyticalStorageSchemaType;
+import com.azure.resourcemanager.cosmos.generated.models.BackupStorageRedundancy;
+import com.azure.resourcemanager.cosmos.generated.models.ConsistencyPolicy;
+import com.azure.resourcemanager.cosmos.generated.models.DatabaseAccountGetResults;
+import com.azure.resourcemanager.cosmos.generated.models.DefaultConsistencyLevel;
+import com.azure.resourcemanager.cosmos.generated.models.DiagnosticLogSettings;
+import com.azure.resourcemanager.cosmos.generated.models.EnableFullTextQuery;
+import com.azure.resourcemanager.cosmos.generated.models.IpAddressOrRange;
+import com.azure.resourcemanager.cosmos.generated.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.cosmos.generated.models.ManagedServiceIdentityUserAssignedIdentities;
+import com.azure.resourcemanager.cosmos.generated.models.NetworkAclBypass;
+import com.azure.resourcemanager.cosmos.generated.models.PeriodicModeBackupPolicy;
+import com.azure.resourcemanager.cosmos.generated.models.PeriodicModeProperties;
+import com.azure.resourcemanager.cosmos.generated.models.ResourceIdentityType;
+import com.azure.resourcemanager.cosmos.generated.models.VirtualNetworkRule;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for DatabaseAccounts Update. */
+public final class DatabaseAccountsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDatabaseAccountPatch.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountPatch.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountPatch(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ DatabaseAccountGetResults resource =
+ manager.databaseAccounts().getByResourceGroupWithResponse("rg1", "ddb1", Context.NONE).getValue();
+ resource
+ .update()
+ .withTags(mapOf("dept", "finance"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
+ new ManagedServiceIdentityUserAssignedIdentities())))
+ .withConsistencyPolicy(
+ new ConsistencyPolicy()
+ .withDefaultConsistencyLevel(DefaultConsistencyLevel.BOUNDED_STALENESS)
+ .withMaxStalenessPrefix(200L)
+ .withMaxIntervalInSeconds(10))
+ .withIpRules(
+ Arrays
+ .asList(
+ new IpAddressOrRange().withIpAddressOrRange("23.43.230.120"),
+ new IpAddressOrRange().withIpAddressOrRange("110.12.240.0/12")))
+ .withIsVirtualNetworkFilterEnabled(true)
+ .withVirtualNetworkRules(
+ Arrays
+ .asList(
+ new VirtualNetworkRule()
+ .withId(
+ "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")
+ .withIgnoreMissingVNetServiceEndpoint(false)))
+ .withDefaultIdentity("FirstPartyIdentity")
+ .withEnableFreeTier(false)
+ .withEnableAnalyticalStorage(true)
+ .withAnalyticalStorageConfiguration(
+ new AnalyticalStorageConfiguration().withSchemaType(AnalyticalStorageSchemaType.WELL_DEFINED))
+ .withBackupPolicy(
+ new PeriodicModeBackupPolicy()
+ .withPeriodicModeProperties(
+ new PeriodicModeProperties()
+ .withBackupIntervalInMinutes(240)
+ .withBackupRetentionIntervalInHours(720)
+ .withBackupStorageRedundancy(BackupStorageRedundancy.GEO)))
+ .withNetworkAclBypass(NetworkAclBypass.AZURE_SERVICES)
+ .withNetworkAclBypassResourceIds(
+ Arrays
+ .asList(
+ "/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.Synapse/workspaces/workspaceName"))
+ .withDiagnosticLogSettings(new DiagnosticLogSettings().withEnableFullTextQuery(EnableFullTextQuery.TRUE))
+ .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;
+ }
+}
+```
+
+### GraphResources_CreateUpdateGraph
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.GraphResource;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for GraphResources CreateUpdateGraph. */
+public final class GraphResourcesCreateUpdateGraphSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGraphResourceCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBGraphCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGraphCreateUpdate(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .graphResources()
+ .define("graphName")
+ .withRegion("West US")
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .withResource(new GraphResource().withId("graphName"))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### GraphResources_DeleteGraphResource
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GraphResources DeleteGraphResource. */
+public final class GraphResourcesDeleteGraphResourceSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGraphResourceDelete.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseDelete(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.graphResources().deleteGraphResource("rg1", "ddb1", "graphName", Context.NONE);
+ }
+}
+```
+
+### GraphResources_GetGraph
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GraphResources GetGraph. */
+public final class GraphResourcesGetGraphSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGraphResourceGet.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.graphResources().getGraphWithResponse("rg1", "ddb1", "graphName", Context.NONE);
+ }
+}
+```
+
+### GraphResources_ListGraphs
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GraphResources ListGraphs. */
+public final class GraphResourcesListGraphsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGraphResourceList.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.graphResources().listGraphs("rgName", "ddb1", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_CreateUpdateGremlinDatabase
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.GremlinDatabaseResource;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for GremlinResources CreateUpdateGremlinDatabase. */
+public final class GremlinResourcesCreateUpdateGremlinDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinDatabaseCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinDatabaseCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinDatabaseCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .gremlinResources()
+ .defineUpdateGremlinDatabase("databaseName")
+ .withRegion("West US")
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .withResource(new GremlinDatabaseResource().withId("databaseName"))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### GremlinResources_CreateUpdateGremlinGraph
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.ConflictResolutionMode;
+import com.azure.resourcemanager.cosmos.generated.models.ConflictResolutionPolicy;
+import com.azure.resourcemanager.cosmos.generated.models.ContainerPartitionKey;
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.DataType;
+import com.azure.resourcemanager.cosmos.generated.models.GremlinGraphResource;
+import com.azure.resourcemanager.cosmos.generated.models.IncludedPath;
+import com.azure.resourcemanager.cosmos.generated.models.IndexKind;
+import com.azure.resourcemanager.cosmos.generated.models.Indexes;
+import com.azure.resourcemanager.cosmos.generated.models.IndexingMode;
+import com.azure.resourcemanager.cosmos.generated.models.IndexingPolicy;
+import com.azure.resourcemanager.cosmos.generated.models.PartitionKind;
+import com.azure.resourcemanager.cosmos.generated.models.UniqueKey;
+import com.azure.resourcemanager.cosmos.generated.models.UniqueKeyPolicy;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for GremlinResources CreateUpdateGremlinGraph. */
+public final class GremlinResourcesCreateUpdateGremlinGraphSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinGraphCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinGraphCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinGraphCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .gremlinResources()
+ .defineUpdateGremlinGraph("graphName")
+ .withRegion("West US")
+ .withExistingGremlinDatabase("rg1", "ddb1", "databaseName")
+ .withResource(
+ new GremlinGraphResource()
+ .withId("graphName")
+ .withIndexingPolicy(
+ new IndexingPolicy()
+ .withAutomatic(true)
+ .withIndexingMode(IndexingMode.CONSISTENT)
+ .withIncludedPaths(
+ Arrays
+ .asList(
+ new IncludedPath()
+ .withPath("/*")
+ .withIndexes(
+ Arrays
+ .asList(
+ new Indexes()
+ .withDataType(DataType.STRING)
+ .withPrecision(-1)
+ .withKind(IndexKind.RANGE),
+ new Indexes()
+ .withDataType(DataType.NUMBER)
+ .withPrecision(-1)
+ .withKind(IndexKind.RANGE)))))
+ .withExcludedPaths(Arrays.asList()))
+ .withPartitionKey(
+ new ContainerPartitionKey()
+ .withPaths(Arrays.asList("/AccountNumber"))
+ .withKind(PartitionKind.HASH))
+ .withDefaultTtl(100)
+ .withUniqueKeyPolicy(
+ new UniqueKeyPolicy()
+ .withUniqueKeys(Arrays.asList(new UniqueKey().withPaths(Arrays.asList("/testPath")))))
+ .withConflictResolutionPolicy(
+ new ConflictResolutionPolicy()
+ .withMode(ConflictResolutionMode.LAST_WRITER_WINS)
+ .withConflictResolutionPath("/path")))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### GremlinResources_DeleteGremlinDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources DeleteGremlinDatabase. */
+public final class GremlinResourcesDeleteGremlinDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinDatabaseDelete.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinDatabaseDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinDatabaseDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.gremlinResources().deleteGremlinDatabase("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_DeleteGremlinGraph
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources DeleteGremlinGraph. */
+public final class GremlinResourcesDeleteGremlinGraphSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinGraphDelete.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinGraphDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinGraphDelete(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.gremlinResources().deleteGremlinGraph("rg1", "ddb1", "databaseName", "graphName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_GetGremlinDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources GetGremlinDatabase. */
+public final class GremlinResourcesGetGremlinDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinDatabaseGet.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinDatabaseGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinDatabaseGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.gremlinResources().getGremlinDatabaseWithResponse("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_GetGremlinDatabaseThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources GetGremlinDatabaseThroughput. */
+public final class GremlinResourcesGetGremlinDatabaseThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinDatabaseThroughputGet.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinDatabaseThroughputGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinDatabaseThroughputGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .gremlinResources()
+ .getGremlinDatabaseThroughputWithResponse("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_GetGremlinGraph
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources GetGremlinGraph. */
+public final class GremlinResourcesGetGremlinGraphSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinGraphGet.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinGraphGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinGraphGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .gremlinResources()
+ .getGremlinGraphWithResponse("rgName", "ddb1", "databaseName", "graphName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_GetGremlinGraphThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources GetGremlinGraphThroughput. */
+public final class GremlinResourcesGetGremlinGraphThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinGraphThroughputGet.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinGraphThroughputGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinGraphThroughputGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .gremlinResources()
+ .getGremlinGraphThroughputWithResponse("rg1", "ddb1", "databaseName", "graphName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_ListGremlinDatabases
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources ListGremlinDatabases. */
+public final class GremlinResourcesListGremlinDatabasesSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinDatabaseList.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinDatabaseList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinDatabaseList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.gremlinResources().listGremlinDatabases("rgName", "ddb1", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_ListGremlinGraphs
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources ListGremlinGraphs. */
+public final class GremlinResourcesListGremlinGraphsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinGraphList.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinGraphList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinGraphList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.gremlinResources().listGremlinGraphs("rgName", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_MigrateGremlinDatabaseToAutoscale
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources MigrateGremlinDatabaseToAutoscale. */
+public final class GremlinResourcesMigrateGremlinDatabaseToAutoscaleSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinDatabaseMigrateToAutoscale.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinDatabaseMigrateToAutoscale(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.gremlinResources().migrateGremlinDatabaseToAutoscale("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_MigrateGremlinDatabaseToManualThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources MigrateGremlinDatabaseToManualThroughput. */
+public final class GremlinResourcesMigrateGremlinDatabaseToManualThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinDatabaseMigrateToManualThroughput.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinDatabaseMigrateToManualThroughput(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .gremlinResources()
+ .migrateGremlinDatabaseToManualThroughput("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_MigrateGremlinGraphToAutoscale
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources MigrateGremlinGraphToAutoscale. */
+public final class GremlinResourcesMigrateGremlinGraphToAutoscaleSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinGraphMigrateToAutoscale.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinGraphMigrateToAutoscale.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinGraphMigrateToAutoscale(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .gremlinResources()
+ .migrateGremlinGraphToAutoscale("rg1", "ddb1", "databaseName", "graphName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_MigrateGremlinGraphToManualThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GremlinResources MigrateGremlinGraphToManualThroughput. */
+public final class GremlinResourcesMigrateGremlinGraphToManualThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinGraphMigrateToManualThroughput.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinGraphMigrateToManualThroughput(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .gremlinResources()
+ .migrateGremlinGraphToManualThroughput("rg1", "ddb1", "databaseName", "graphName", Context.NONE);
+ }
+}
+```
+
+### GremlinResources_UpdateGremlinDatabaseThroughput
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsResource;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for GremlinResources UpdateGremlinDatabaseThroughput. */
+public final class GremlinResourcesUpdateGremlinDatabaseThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinDatabaseThroughputUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinDatabaseThroughputUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinDatabaseThroughputUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .gremlinResources()
+ .updateGremlinDatabaseThroughput(
+ "rg1",
+ "ddb1",
+ "databaseName",
+ new ThroughputSettingsUpdateParameters()
+ .withLocation("West US")
+ .withTags(mapOf())
+ .withResource(new ThroughputSettingsResource().withThroughput(400)),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### GremlinResources_UpdateGremlinGraphThroughput
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsResource;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for GremlinResources UpdateGremlinGraphThroughput. */
+public final class GremlinResourcesUpdateGremlinGraphThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGremlinGraphThroughputUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBGremlinGraphThroughputUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBGremlinGraphThroughputUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .gremlinResources()
+ .updateGremlinGraphThroughput(
+ "rg1",
+ "ddb1",
+ "databaseName",
+ "graphName",
+ new ThroughputSettingsUpdateParameters()
+ .withLocation("West US")
+ .withTags(mapOf())
+ .withResource(new ThroughputSettingsResource().withThroughput(400)),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### MongoDBResources_CreateUpdateMongoDBCollection
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.MongoDBCollectionResource;
+import com.azure.resourcemanager.cosmos.generated.models.MongoIndex;
+import com.azure.resourcemanager.cosmos.generated.models.MongoIndexKeys;
+import com.azure.resourcemanager.cosmos.generated.models.MongoIndexOptions;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for MongoDBResources CreateUpdateMongoDBCollection. */
+public final class MongoDBResourcesCreateUpdateMongoDBCollectionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBCollectionCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBCollectionCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBCollectionCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .defineUpdateMongoDBCollection("collectionName")
+ .withRegion("West US")
+ .withExistingMongodbDatabase("rg1", "ddb1", "databaseName")
+ .withResource(
+ new MongoDBCollectionResource()
+ .withId("collectionName")
+ .withShardKey(mapOf("testKey", "Hash"))
+ .withIndexes(
+ Arrays
+ .asList(
+ new MongoIndex()
+ .withKey(new MongoIndexKeys().withKeys(Arrays.asList("_ts")))
+ .withOptions(new MongoIndexOptions().withExpireAfterSeconds(100).withUnique(true)),
+ new MongoIndex().withKey(new MongoIndexKeys().withKeys(Arrays.asList("_id")))))
+ .withAnalyticalStorageTtl(500))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### MongoDBResources_CreateUpdateMongoDBDatabase
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.MongoDBDatabaseResource;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for MongoDBResources CreateUpdateMongoDBDatabase. */
+public final class MongoDBResourcesCreateUpdateMongoDBDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBDatabaseCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBDatabaseCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBDatabaseCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .defineUpdateMongoDBDatabase("databaseName")
+ .withRegion("West US")
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .withResource(new MongoDBDatabaseResource().withId("databaseName"))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### MongoDBResources_DeleteMongoDBCollection
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources DeleteMongoDBCollection. */
+public final class MongoDBResourcesDeleteMongoDBCollectionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBCollectionDelete.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBCollectionDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBCollectionDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .deleteMongoDBCollection("rg1", "ddb1", "databaseName", "collectionName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_DeleteMongoDBDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources DeleteMongoDBDatabase. */
+public final class MongoDBResourcesDeleteMongoDBDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBDatabaseDelete.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBDatabaseDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBDatabaseDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.mongoDBResources().deleteMongoDBDatabase("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_GetMongoDBCollection
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources GetMongoDBCollection. */
+public final class MongoDBResourcesGetMongoDBCollectionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBCollectionGet.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBCollectionGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBCollectionGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .getMongoDBCollectionWithResponse("rgName", "ddb1", "databaseName", "collectionName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_GetMongoDBCollectionThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources GetMongoDBCollectionThroughput. */
+public final class MongoDBResourcesGetMongoDBCollectionThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBCollectionThroughputGet.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBCollectionThroughputGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBCollectionThroughputGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .getMongoDBCollectionThroughputWithResponse("rg1", "ddb1", "databaseName", "collectionName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_GetMongoDBDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources GetMongoDBDatabase. */
+public final class MongoDBResourcesGetMongoDBDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBDatabaseGet.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBDatabaseGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBDatabaseGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.mongoDBResources().getMongoDBDatabaseWithResponse("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_GetMongoDBDatabaseThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources GetMongoDBDatabaseThroughput. */
+public final class MongoDBResourcesGetMongoDBDatabaseThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBDatabaseThroughputGet.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBDatabaseThroughputGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBDatabaseThroughputGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .getMongoDBDatabaseThroughputWithResponse("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_ListMongoDBCollections
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources ListMongoDBCollections. */
+public final class MongoDBResourcesListMongoDBCollectionsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBCollectionList.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBCollectionList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBCollectionList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.mongoDBResources().listMongoDBCollections("rgName", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_ListMongoDBDatabases
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources ListMongoDBDatabases. */
+public final class MongoDBResourcesListMongoDBDatabasesSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBDatabaseList.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBDatabaseList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBDatabaseList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.mongoDBResources().listMongoDBDatabases("rgName", "ddb1", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_MigrateMongoDBCollectionToAutoscale
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources MigrateMongoDBCollectionToAutoscale. */
+public final class MongoDBResourcesMigrateMongoDBCollectionToAutoscaleSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBCollectionMigrateToAutoscale.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBCollectionMigrateToAutoscale(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .migrateMongoDBCollectionToAutoscale("rg1", "ddb1", "databaseName", "collectionName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_MigrateMongoDBCollectionToManualThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources MigrateMongoDBCollectionToManualThroughput. */
+public final class MongoDBResourcesMigrateMongoDBCollectionToManualThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBCollectionMigrateToManualThroughput.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBCollectionMigrateToManualThroughput(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .migrateMongoDBCollectionToManualThroughput("rg1", "ddb1", "databaseName", "collectionName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_MigrateMongoDBDatabaseToAutoscale
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources MigrateMongoDBDatabaseToAutoscale. */
+public final class MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBDatabaseMigrateToAutoscale.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBDatabaseMigrateToAutoscale(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.mongoDBResources().migrateMongoDBDatabaseToAutoscale("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_MigrateMongoDBDatabaseToManualThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MongoDBResources MigrateMongoDBDatabaseToManualThroughput. */
+public final class MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBDatabaseMigrateToManualThroughput.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBDatabaseMigrateToManualThroughput(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .migrateMongoDBDatabaseToManualThroughput("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### MongoDBResources_UpdateMongoDBCollectionThroughput
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsResource;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for MongoDBResources UpdateMongoDBCollectionThroughput. */
+public final class MongoDBResourcesUpdateMongoDBCollectionThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBCollectionThroughputUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBCollectionThroughputUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBCollectionThroughputUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .updateMongoDBCollectionThroughput(
+ "rg1",
+ "ddb1",
+ "databaseName",
+ "collectionName",
+ new ThroughputSettingsUpdateParameters()
+ .withLocation("West US")
+ .withTags(mapOf())
+ .withResource(new ThroughputSettingsResource().withThroughput(400)),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### MongoDBResources_UpdateMongoDBDatabaseThroughput
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsResource;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for MongoDBResources UpdateMongoDBDatabaseThroughput. */
+public final class MongoDBResourcesUpdateMongoDBDatabaseThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBMongoDBDatabaseThroughputUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBMongoDBDatabaseThroughputUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .mongoDBResources()
+ .updateMongoDBDatabaseThroughput(
+ "rg1",
+ "ddb1",
+ "databaseName",
+ new ThroughputSettingsUpdateParameters()
+ .withLocation("West US")
+ .withTags(mapOf())
+ .withResource(new ThroughputSettingsResource().withThroughput(400)),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### NotebookWorkspaces_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.NotebookWorkspaceName;
+
+/** Samples for NotebookWorkspaces CreateOrUpdate. */
+public final class NotebookWorkspacesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBNotebookWorkspaceCreate.json
+ */
+ /**
+ * Sample code: CosmosDBNotebookWorkspaceCreate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBNotebookWorkspaceCreate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .notebookWorkspaces()
+ .define(NotebookWorkspaceName.DEFAULT)
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .create();
+ }
+}
+```
+
+### NotebookWorkspaces_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.NotebookWorkspaceName;
+
+/** Samples for NotebookWorkspaces Delete. */
+public final class NotebookWorkspacesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBNotebookWorkspaceDelete.json
+ */
+ /**
+ * Sample code: CosmosDBNotebookWorkspaceDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBNotebookWorkspaceDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.notebookWorkspaces().delete("rg1", "ddb1", NotebookWorkspaceName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### NotebookWorkspaces_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.NotebookWorkspaceName;
+
+/** Samples for NotebookWorkspaces Get. */
+public final class NotebookWorkspacesGetSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBNotebookWorkspaceGet.json
+ */
+ /**
+ * Sample code: CosmosDBNotebookWorkspaceGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBNotebookWorkspaceGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.notebookWorkspaces().getWithResponse("rg1", "ddb1", NotebookWorkspaceName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### NotebookWorkspaces_ListByDatabaseAccount
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for NotebookWorkspaces ListByDatabaseAccount. */
+public final class NotebookWorkspacesListByDatabaseAccountSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBNotebookWorkspaceList.json
+ */
+ /**
+ * Sample code: CosmosDBNotebookWorkspaceList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBNotebookWorkspaceList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.notebookWorkspaces().listByDatabaseAccount("rg1", "ddb1", Context.NONE);
+ }
+}
+```
+
+### NotebookWorkspaces_ListConnectionInfo
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.NotebookWorkspaceName;
+
+/** Samples for NotebookWorkspaces ListConnectionInfo. */
+public final class NotebookWorkspacesListConnectionInfoSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json
+ */
+ /**
+ * Sample code: CosmosDBNotebookWorkspaceListConnectionInfo.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBNotebookWorkspaceListConnectionInfo(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .notebookWorkspaces()
+ .listConnectionInfoWithResponse("rg1", "ddb1", NotebookWorkspaceName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### NotebookWorkspaces_RegenerateAuthToken
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.NotebookWorkspaceName;
+
+/** Samples for NotebookWorkspaces RegenerateAuthToken. */
+public final class NotebookWorkspacesRegenerateAuthTokenSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json
+ */
+ /**
+ * Sample code: CosmosDBNotebookWorkspaceRegenerateAuthToken.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBNotebookWorkspaceRegenerateAuthToken(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.notebookWorkspaces().regenerateAuthToken("rg1", "ddb1", NotebookWorkspaceName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### NotebookWorkspaces_Start
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.NotebookWorkspaceName;
+
+/** Samples for NotebookWorkspaces Start. */
+public final class NotebookWorkspacesStartSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBNotebookWorkspaceStart.json
+ */
+ /**
+ * Sample code: CosmosDBNotebookWorkspaceStart.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBNotebookWorkspaceStart(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.notebookWorkspaces().start("rg1", "ddb1", NotebookWorkspaceName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBOperationsList.json
+ */
+ /**
+ * Sample code: CosmosDBOperationsList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBOperationsList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### PartitionKeyRangeId_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PartitionKeyRangeId ListMetrics. */
+public final class PartitionKeyRangeIdListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPKeyRangeIdGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountRegionGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountRegionGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .partitionKeyRangeIds()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "databaseRid",
+ "collectionRid",
+ "0",
+ "$filter=(name.value eq 'Max RUs Per Second') and timeGrain eq duration'PT1M' and startTime eq"
+ + " '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T23:58:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### PartitionKeyRangeIdRegion_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PartitionKeyRangeIdRegion ListMetrics. */
+public final class PartitionKeyRangeIdRegionListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountRegionGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountRegionGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .partitionKeyRangeIdRegions()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "West US",
+ "databaseRid",
+ "collectionRid",
+ "0",
+ "$filter=(name.value eq 'Max RUs Per Second') and timeGrain eq duration'PT1M' and startTime eq"
+ + " '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T23:58:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### Percentile_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Percentile ListMetrics. */
+public final class PercentileListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPercentileGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountRegionGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountRegionGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .percentiles()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "$filter=(name.value eq 'Probabilistic Bounded Staleness') and timeGrain eq duration'PT5M' and"
+ + " startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### PercentileSourceTarget_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PercentileSourceTarget ListMetrics. */
+public final class PercentileSourceTargetListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPercentileSourceTargetGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountRegionGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountRegionGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .percentileSourceTargets()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "West Central US",
+ "East US",
+ "$filter=(name.value eq 'Probabilistic Bounded Staleness') and timeGrain eq duration'PT5M' and"
+ + " startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### PercentileTarget_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PercentileTarget ListMetrics. */
+public final class PercentileTargetListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPercentileTargetGetMetrics.json
+ */
+ /**
+ * Sample code: CosmosDBDatabaseAccountRegionGetMetrics.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBDatabaseAccountRegionGetMetrics(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .percentileTargets()
+ .listMetrics(
+ "rg1",
+ "ddb1",
+ "East US",
+ "$filter=(name.value eq 'Probabilistic Bounded Staleness') and timeGrain eq duration'PT5M' and"
+ + " startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z",
+ Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.PrivateLinkServiceConnectionStateProperty;
+
+/** Samples for PrivateEndpointConnections CreateOrUpdate. */
+public final class PrivateEndpointConnectionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPrivateEndpointConnectionUpdate.json
+ */
+ /**
+ * Sample code: Approve or reject a private endpoint connection with a given name.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .privateEndpointConnections()
+ .define("privateEndpointConnectionName")
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionStateProperty()
+ .withStatus("Approved")
+ .withDescription("Approved by johndoe@contoso.com"))
+ .create();
+ }
+}
+```
+
+### PrivateEndpointConnections_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPrivateEndpointConnectionDelete.json
+ */
+ /**
+ * Sample code: Deletes a private endpoint connection with a given name.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void deletesAPrivateEndpointConnectionWithAGivenName(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.privateEndpointConnections().delete("rg1", "ddb1", "privateEndpointConnectionName", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPrivateEndpointConnectionGet.json
+ */
+ /**
+ * Sample code: Gets private endpoint connection.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void getsPrivateEndpointConnection(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("rg1", "ddb1", "privateEndpointConnectionName", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_ListByDatabaseAccount
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections ListByDatabaseAccount. */
+public final class PrivateEndpointConnectionsListByDatabaseAccountSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPrivateEndpointConnectionListGet.json
+ */
+ /**
+ * Sample code: Gets private endpoint connection.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void getsPrivateEndpointConnection(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.privateEndpointConnections().listByDatabaseAccount("rg1", "ddb1", Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResources_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources Get. */
+public final class PrivateLinkResourcesGetSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPrivateLinkResourceGet.json
+ */
+ /**
+ * Sample code: Gets private endpoint connection.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void getsPrivateEndpointConnection(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.privateLinkResources().getWithResponse("rg1", "ddb1", "sql", Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResources_ListByDatabaseAccount
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources ListByDatabaseAccount. */
+public final class PrivateLinkResourcesListByDatabaseAccountSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBPrivateLinkResourceListGet.json
+ */
+ /**
+ * Sample code: Gets private endpoint connection.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void getsPrivateEndpointConnection(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.privateLinkResources().listByDatabaseAccount("rg1", "ddb1", Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceProvider List. */
+public final class ResourceProviderListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBLocationList.json
+ */
+ /**
+ * Sample code: CosmosDBLocationList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBLocationList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.resourceProviders().list(Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_LocationGet
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceProvider LocationGet. */
+public final class ResourceProviderLocationGetSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBLocationGet.json
+ */
+ /**
+ * Sample code: CosmosDBLocationGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBLocationGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.resourceProviders().locationGetWithResponse("westus", Context.NONE);
+ }
+}
+```
+
+### RestorableDatabaseAccounts_GetByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableDatabaseAccounts GetByLocation. */
+public final class RestorableDatabaseAccountsGetByLocationSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json
+ */
+ /**
+ * Sample code: CosmosDBRestorableDatabaseAccountGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRestorableDatabaseAccountGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .restorableDatabaseAccounts()
+ .getByLocationWithResponse("West US", "d9b26648-2f53-4541-b3d8-3044f4f9810d", Context.NONE);
+ }
+}
+```
+
+### RestorableDatabaseAccounts_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableDatabaseAccounts List. */
+public final class RestorableDatabaseAccountsListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json
+ */
+ /**
+ * Sample code: CosmosDBRestorableDatabaseAccountNoLocationList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRestorableDatabaseAccountNoLocationList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.restorableDatabaseAccounts().list(Context.NONE);
+ }
+}
+```
+
+### RestorableDatabaseAccounts_ListByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableDatabaseAccounts ListByLocation. */
+public final class RestorableDatabaseAccountsListByLocationSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json
+ */
+ /**
+ * Sample code: CosmosDBRestorableDatabaseAccountList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRestorableDatabaseAccountList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.restorableDatabaseAccounts().listByLocation("West US", Context.NONE);
+ }
+}
+```
+
+### RestorableMongodbCollections_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableMongodbCollections List. */
+public final class RestorableMongodbCollectionsListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json
+ */
+ /**
+ * Sample code: CosmosDBRestorableMongodbCollectionList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRestorableMongodbCollectionList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .restorableMongodbCollections()
+ .list("WestUS", "98a570f2-63db-4117-91f0-366327b7b353", "PD5DALigDgw=", Context.NONE);
+ }
+}
+```
+
+### RestorableMongodbDatabases_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableMongodbDatabases List. */
+public final class RestorableMongodbDatabasesListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json
+ */
+ /**
+ * Sample code: CosmosDBRestorableMongodbDatabaseList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRestorableMongodbDatabaseList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.restorableMongodbDatabases().list("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", Context.NONE);
+ }
+}
+```
+
+### RestorableMongodbResources_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableMongodbResources List. */
+public final class RestorableMongodbResourcesListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRestorableMongodbResourceList.json
+ */
+ /**
+ * Sample code: CosmosDBRestorableMongodbResourceList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRestorableMongodbResourceList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .restorableMongodbResources()
+ .list("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", "WestUS", "10/13/2020 4:56", Context.NONE);
+ }
+}
+```
+
+### RestorableSqlContainers_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableSqlContainers List. */
+public final class RestorableSqlContainersListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRestorableSqlContainerList.json
+ */
+ /**
+ * Sample code: CosmosDBRestorableSqlContainerList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRestorableSqlContainerList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .restorableSqlContainers()
+ .list("WestUS", "98a570f2-63db-4117-91f0-366327b7b353", "3fu-hg==", null, null, Context.NONE);
+ }
+}
+```
+
+### RestorableSqlDatabases_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableSqlDatabases List. */
+public final class RestorableSqlDatabasesListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRestorableSqlDatabaseList.json
+ */
+ /**
+ * Sample code: CosmosDBRestorableSqlDatabaseList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRestorableSqlDatabaseList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.restorableSqlDatabases().list("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", Context.NONE);
+ }
+}
+```
+
+### RestorableSqlResources_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableSqlResources List. */
+public final class RestorableSqlResourcesListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBRestorableSqlResourceList.json
+ */
+ /**
+ * Sample code: CosmosDBRestorableSqlResourceList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBRestorableSqlResourceList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .restorableSqlResources()
+ .list("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", "WestUS", "10/13/2020 4:56", Context.NONE);
+ }
+}
+```
+
+### Service_Create
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.ServiceSize;
+import com.azure.resourcemanager.cosmos.generated.models.ServiceType;
+
+/** Samples for Service Create. */
+public final class ServiceCreateSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDedicatedGatewayServiceCreate.json
+ */
+ /**
+ * Sample code: SqlDedicatedGatewayServiceCreate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void sqlDedicatedGatewayServiceCreate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .services()
+ .define("SqlDedicatedGateway")
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .withInstanceSize(ServiceSize.COSMOS_D4S)
+ .withInstanceCount(1)
+ .withServiceType(ServiceType.SQL_DEDICATED_GATEWAY)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDataTransferServiceCreate.json
+ */
+ /**
+ * Sample code: DataTransferServiceCreate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void dataTransferServiceCreate(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .services()
+ .define("DataTransfer")
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .withInstanceSize(ServiceSize.COSMOS_D4S)
+ .withInstanceCount(1)
+ .withServiceType(ServiceType.DATA_TRANSFER)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGraphAPIComputeServiceCreate.json
+ */
+ /**
+ * Sample code: GraphAPIComputeServiceCreate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void graphAPIComputeServiceCreate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .services()
+ .define("GraphAPICompute")
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .withInstanceSize(ServiceSize.COSMOS_D4S)
+ .withInstanceCount(1)
+ .withServiceType(ServiceType.GRAPH_APICOMPUTE)
+ .create();
+ }
+}
+```
+
+### Service_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Service Delete. */
+public final class ServiceDeleteSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDedicatedGatewayServiceDelete.json
+ */
+ /**
+ * Sample code: SqlDedicatedGatewayServiceDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void sqlDedicatedGatewayServiceDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.services().delete("rg1", "ddb1", "SqlDedicatedGateway", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDataTransferServiceDelete.json
+ */
+ /**
+ * Sample code: DataTransferServiceDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void dataTransferServiceDelete(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.services().delete("rg1", "ddb1", "DataTransfer", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGraphAPIComputeServiceDelete.json
+ */
+ /**
+ * Sample code: GraphAPIComputeServiceDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void graphAPIComputeServiceDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.services().delete("rg1", "ddb1", "GraphAPICompute", Context.NONE);
+ }
+}
+```
+
+### Service_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Service Get. */
+public final class ServiceGetSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBDataTransferServiceGet.json
+ */
+ /**
+ * Sample code: DataTransferServiceGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void dataTransferServiceGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.services().getWithResponse("rg1", "ddb1", "DataTransfer", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBGraphAPIComputeServiceGet.json
+ */
+ /**
+ * Sample code: GraphAPIComputeServiceGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void graphAPIComputeServiceGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.services().getWithResponse("rg1", "ddb1", "GraphAPICompute", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDedicatedGatewayServiceGet.json
+ */
+ /**
+ * Sample code: SqlDedicatedGatewayServiceGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void sqlDedicatedGatewayServiceGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.services().getWithResponse("rg1", "ddb1", "SqlDedicatedGateway", Context.NONE);
+ }
+}
+```
+
+### Service_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Service List. */
+public final class ServiceListSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBServicesList.json
+ */
+ /**
+ * Sample code: CosmosDBServicesList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBServicesList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.services().list("rg1", "ddb1", Context.NONE);
+ }
+}
+```
+
+### SqlResources_CreateUpdateSqlContainer
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.ConflictResolutionMode;
+import com.azure.resourcemanager.cosmos.generated.models.ConflictResolutionPolicy;
+import com.azure.resourcemanager.cosmos.generated.models.ContainerPartitionKey;
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.DataType;
+import com.azure.resourcemanager.cosmos.generated.models.IncludedPath;
+import com.azure.resourcemanager.cosmos.generated.models.IndexKind;
+import com.azure.resourcemanager.cosmos.generated.models.Indexes;
+import com.azure.resourcemanager.cosmos.generated.models.IndexingMode;
+import com.azure.resourcemanager.cosmos.generated.models.IndexingPolicy;
+import com.azure.resourcemanager.cosmos.generated.models.PartitionKind;
+import com.azure.resourcemanager.cosmos.generated.models.SqlContainerResource;
+import com.azure.resourcemanager.cosmos.generated.models.UniqueKey;
+import com.azure.resourcemanager.cosmos.generated.models.UniqueKeyPolicy;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SqlResources CreateUpdateSqlContainer. */
+public final class SqlResourcesCreateUpdateSqlContainerSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlContainerCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBSqlContainerCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlContainerCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .defineUpdateSqlContainer("containerName")
+ .withRegion("West US")
+ .withExistingSqlDatabase("rg1", "ddb1", "databaseName")
+ .withResource(
+ new SqlContainerResource()
+ .withId("containerName")
+ .withIndexingPolicy(
+ new IndexingPolicy()
+ .withAutomatic(true)
+ .withIndexingMode(IndexingMode.CONSISTENT)
+ .withIncludedPaths(
+ Arrays
+ .asList(
+ new IncludedPath()
+ .withPath("/*")
+ .withIndexes(
+ Arrays
+ .asList(
+ new Indexes()
+ .withDataType(DataType.STRING)
+ .withPrecision(-1)
+ .withKind(IndexKind.RANGE),
+ new Indexes()
+ .withDataType(DataType.NUMBER)
+ .withPrecision(-1)
+ .withKind(IndexKind.RANGE)))))
+ .withExcludedPaths(Arrays.asList()))
+ .withPartitionKey(
+ new ContainerPartitionKey()
+ .withPaths(Arrays.asList("/AccountNumber"))
+ .withKind(PartitionKind.HASH))
+ .withDefaultTtl(100)
+ .withUniqueKeyPolicy(
+ new UniqueKeyPolicy()
+ .withUniqueKeys(Arrays.asList(new UniqueKey().withPaths(Arrays.asList("/testPath")))))
+ .withConflictResolutionPolicy(
+ new ConflictResolutionPolicy()
+ .withMode(ConflictResolutionMode.LAST_WRITER_WINS)
+ .withConflictResolutionPath("/path")))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### SqlResources_CreateUpdateSqlDatabase
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.SqlDatabaseResource;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SqlResources CreateUpdateSqlDatabase. */
+public final class SqlResourcesCreateUpdateSqlDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDatabaseCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .defineUpdateSqlDatabase("databaseName")
+ .withRegion("West US")
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .withResource(new SqlDatabaseResource().withId("databaseName"))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### SqlResources_CreateUpdateSqlRoleAssignment
+
+```java
+/** Samples for SqlResources CreateUpdateSqlRoleAssignment. */
+public final class SqlResourcesCreateUpdateSqlRoleAssignmentSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBSqlRoleAssignmentCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlRoleAssignmentCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .defineUpdateSqlRoleAssignment("myRoleAssignmentId")
+ .withExistingDatabaseAccount("myResourceGroupName", "myAccountName")
+ .withRoleDefinitionId(
+ "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleDefinitions/myRoleDefinitionId")
+ .withScope(
+ "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases/colls/redmond-purchases")
+ .withPrincipalId("myPrincipalId")
+ .create();
+ }
+}
+```
+
+### SqlResources_CreateUpdateSqlRoleDefinition
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.Permission;
+import com.azure.resourcemanager.cosmos.generated.models.RoleDefinitionType;
+import java.util.Arrays;
+
+/** Samples for SqlResources CreateUpdateSqlRoleDefinition. */
+public final class SqlResourcesCreateUpdateSqlRoleDefinitionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBSqlRoleDefinitionCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlRoleDefinitionCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .defineUpdateSqlRoleDefinition("myRoleDefinitionId")
+ .withExistingDatabaseAccount("myResourceGroupName", "myAccountName")
+ .withRoleName("myRoleName")
+ .withType(RoleDefinitionType.CUSTOM_ROLE)
+ .withAssignableScopes(
+ Arrays
+ .asList(
+ "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/sales",
+ "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases"))
+ .withPermissions(
+ Arrays
+ .asList(
+ new Permission()
+ .withDataActions(
+ Arrays
+ .asList(
+ "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/create",
+ "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/read"))
+ .withNotDataActions(Arrays.asList())))
+ .create();
+ }
+}
+```
+
+### SqlResources_CreateUpdateSqlStoredProcedure
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.SqlStoredProcedureResource;
+
+/** Samples for SqlResources CreateUpdateSqlStoredProcedure. */
+public final class SqlResourcesCreateUpdateSqlStoredProcedureSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlStoredProcedureCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBSqlStoredProcedureCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlStoredProcedureCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .defineUpdateSqlStoredProcedure("storedProcedureName")
+ .withRegion((String) null)
+ .withExistingContainer("rg1", "ddb1", "databaseName", "containerName")
+ .withResource(new SqlStoredProcedureResource().withId("storedProcedureName").withBody("body"))
+ .withOptions(new CreateUpdateOptions())
+ .create();
+ }
+}
+```
+
+### SqlResources_CreateUpdateSqlTrigger
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.SqlTriggerResource;
+import com.azure.resourcemanager.cosmos.generated.models.TriggerOperation;
+import com.azure.resourcemanager.cosmos.generated.models.TriggerType;
+
+/** Samples for SqlResources CreateUpdateSqlTrigger. */
+public final class SqlResourcesCreateUpdateSqlTriggerSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlTriggerCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBSqlTriggerCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlTriggerCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .defineUpdateSqlTrigger("triggerName")
+ .withRegion((String) null)
+ .withExistingContainer("rg1", "ddb1", "databaseName", "containerName")
+ .withResource(
+ new SqlTriggerResource()
+ .withId("triggerName")
+ .withBody("body")
+ .withTriggerType(TriggerType.fromString("triggerType"))
+ .withTriggerOperation(TriggerOperation.fromString("triggerOperation")))
+ .withOptions(new CreateUpdateOptions())
+ .create();
+ }
+}
+```
+
+### SqlResources_CreateUpdateSqlUserDefinedFunction
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.SqlUserDefinedFunctionResource;
+
+/** Samples for SqlResources CreateUpdateSqlUserDefinedFunction. */
+public final class SqlResourcesCreateUpdateSqlUserDefinedFunctionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBSqlUserDefinedFunctionCreateUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlUserDefinedFunctionCreateUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .defineUpdateSqlUserDefinedFunction("userDefinedFunctionName")
+ .withRegion((String) null)
+ .withExistingContainer("rg1", "ddb1", "databaseName", "containerName")
+ .withResource(new SqlUserDefinedFunctionResource().withId("userDefinedFunctionName").withBody("body"))
+ .withOptions(new CreateUpdateOptions())
+ .create();
+ }
+}
+```
+
+### SqlResources_DeleteSqlContainer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources DeleteSqlContainer. */
+public final class SqlResourcesDeleteSqlContainerSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlContainerDelete.json
+ */
+ /**
+ * Sample code: CosmosDBSqlContainerDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlContainerDelete(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().deleteSqlContainer("rg1", "ddb1", "databaseName", "containerName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_DeleteSqlDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources DeleteSqlDatabase. */
+public final class SqlResourcesDeleteSqlDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDatabaseDelete.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseDelete(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().deleteSqlDatabase("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_DeleteSqlRoleAssignment
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources DeleteSqlRoleAssignment. */
+public final class SqlResourcesDeleteSqlRoleAssignmentSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlRoleAssignmentDelete.json
+ */
+ /**
+ * Sample code: CosmosDBSqlRoleAssignmentDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlRoleAssignmentDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .deleteSqlRoleAssignment("myRoleAssignmentId", "myResourceGroupName", "myAccountName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_DeleteSqlRoleDefinition
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources DeleteSqlRoleDefinition. */
+public final class SqlResourcesDeleteSqlRoleDefinitionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlRoleDefinitionDelete.json
+ */
+ /**
+ * Sample code: CosmosDBSqlRoleDefinitionDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlRoleDefinitionDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .deleteSqlRoleDefinition("myRoleDefinitionId", "myResourceGroupName", "myAccountName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_DeleteSqlStoredProcedure
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources DeleteSqlStoredProcedure. */
+public final class SqlResourcesDeleteSqlStoredProcedureSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlStoredProcedureDelete.json
+ */
+ /**
+ * Sample code: CosmosDBSqlStoredProcedureDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlStoredProcedureDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .deleteSqlStoredProcedure(
+ "rg1", "ddb1", "databaseName", "containerName", "storedProcedureName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_DeleteSqlTrigger
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources DeleteSqlTrigger. */
+public final class SqlResourcesDeleteSqlTriggerSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlTriggerDelete.json
+ */
+ /**
+ * Sample code: CosmosDBSqlTriggerDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlTriggerDelete(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .deleteSqlTrigger("rg1", "ddb1", "databaseName", "containerName", "triggerName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_DeleteSqlUserDefinedFunction
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources DeleteSqlUserDefinedFunction. */
+public final class SqlResourcesDeleteSqlUserDefinedFunctionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlUserDefinedFunctionDelete.json
+ */
+ /**
+ * Sample code: CosmosDBSqlUserDefinedFunctionDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlUserDefinedFunctionDelete(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .deleteSqlUserDefinedFunction(
+ "rg1", "ddb1", "databaseName", "containerName", "userDefinedFunctionName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_GetSqlContainer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources GetSqlContainer. */
+public final class SqlResourcesGetSqlContainerSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlContainerGet.json
+ */
+ /**
+ * Sample code: CosmosDBSqlContainerGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlContainerGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .getSqlContainerWithResponse("rgName", "ddb1", "databaseName", "containerName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_GetSqlContainerThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources GetSqlContainerThroughput. */
+public final class SqlResourcesGetSqlContainerThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlContainerThroughputGet.json
+ */
+ /**
+ * Sample code: CosmosDBSqlContainerThroughputGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlContainerThroughputGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .getSqlContainerThroughputWithResponse("rg1", "ddb1", "databaseName", "containerName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_GetSqlDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources GetSqlDatabase. */
+public final class SqlResourcesGetSqlDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDatabaseGet.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().getSqlDatabaseWithResponse("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_GetSqlDatabaseThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources GetSqlDatabaseThroughput. */
+public final class SqlResourcesGetSqlDatabaseThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDatabaseThroughputGet.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseThroughputGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseThroughputGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().getSqlDatabaseThroughputWithResponse("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_GetSqlRoleAssignment
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources GetSqlRoleAssignment. */
+public final class SqlResourcesGetSqlRoleAssignmentSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlRoleAssignmentGet.json
+ */
+ /**
+ * Sample code: CosmosDBSqlRoleAssignmentGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlRoleAssignmentGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .getSqlRoleAssignmentWithResponse(
+ "myRoleAssignmentId", "myResourceGroupName", "myAccountName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_GetSqlRoleDefinition
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources GetSqlRoleDefinition. */
+public final class SqlResourcesGetSqlRoleDefinitionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlRoleDefinitionGet.json
+ */
+ /**
+ * Sample code: CosmosDBSqlRoleDefinitionGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlRoleDefinitionGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .getSqlRoleDefinitionWithResponse(
+ "myRoleDefinitionId", "myResourceGroupName", "myAccountName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_GetSqlStoredProcedure
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources GetSqlStoredProcedure. */
+public final class SqlResourcesGetSqlStoredProcedureSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlStoredProcedureGet.json
+ */
+ /**
+ * Sample code: CosmosDBSqlStoredProcedureGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlStoredProcedureGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .getSqlStoredProcedureWithResponse(
+ "rgName", "ddb1", "databaseName", "containerName", "storedProcedureName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_GetSqlTrigger
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources GetSqlTrigger. */
+public final class SqlResourcesGetSqlTriggerSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlTriggerGet.json
+ */
+ /**
+ * Sample code: CosmosDBSqlTriggerGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlTriggerGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .getSqlTriggerWithResponse("rgName", "ddb1", "databaseName", "containerName", "triggerName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_GetSqlUserDefinedFunction
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources GetSqlUserDefinedFunction. */
+public final class SqlResourcesGetSqlUserDefinedFunctionSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlUserDefinedFunctionGet.json
+ */
+ /**
+ * Sample code: CosmosDBSqlUserDefinedFunctionGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlUserDefinedFunctionGet(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .getSqlUserDefinedFunctionWithResponse(
+ "rgName", "ddb1", "databaseName", "containerName", "userDefinedFunctionName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_ListSqlContainers
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources ListSqlContainers. */
+public final class SqlResourcesListSqlContainersSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlContainerList.json
+ */
+ /**
+ * Sample code: CosmosDBSqlContainerList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlContainerList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().listSqlContainers("rgName", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_ListSqlDatabases
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources ListSqlDatabases. */
+public final class SqlResourcesListSqlDatabasesSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDatabaseList.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().listSqlDatabases("rgName", "ddb1", Context.NONE);
+ }
+}
+```
+
+### SqlResources_ListSqlRoleAssignments
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources ListSqlRoleAssignments. */
+public final class SqlResourcesListSqlRoleAssignmentsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlRoleAssignmentList.json
+ */
+ /**
+ * Sample code: CosmosDBSqlRoleAssignmentList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlRoleAssignmentList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().listSqlRoleAssignments("myResourceGroupName", "myAccountName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_ListSqlRoleDefinitions
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources ListSqlRoleDefinitions. */
+public final class SqlResourcesListSqlRoleDefinitionsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlRoleDefinitionList.json
+ */
+ /**
+ * Sample code: CosmosDBSqlRoleDefinitionList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlRoleDefinitionList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().listSqlRoleDefinitions("myResourceGroupName", "myAccountName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_ListSqlStoredProcedures
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources ListSqlStoredProcedures. */
+public final class SqlResourcesListSqlStoredProceduresSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlStoredProcedureList.json
+ */
+ /**
+ * Sample code: CosmosDBSqlStoredProcedureList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlStoredProcedureList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().listSqlStoredProcedures("rgName", "ddb1", "databaseName", "containerName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_ListSqlTriggers
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources ListSqlTriggers. */
+public final class SqlResourcesListSqlTriggersSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlTriggerList.json
+ */
+ /**
+ * Sample code: CosmosDBSqlTriggerList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlTriggerList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().listSqlTriggers("rgName", "ddb1", "databaseName", "containerName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_ListSqlUserDefinedFunctions
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources ListSqlUserDefinedFunctions. */
+public final class SqlResourcesListSqlUserDefinedFunctionsSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlUserDefinedFunctionList.json
+ */
+ /**
+ * Sample code: CosmosDBSqlUserDefinedFunctionList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlUserDefinedFunctionList(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .listSqlUserDefinedFunctions("rgName", "ddb1", "databaseName", "containerName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_MigrateSqlContainerToAutoscale
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources MigrateSqlContainerToAutoscale. */
+public final class SqlResourcesMigrateSqlContainerToAutoscaleSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlContainerMigrateToAutoscale.json
+ */
+ /**
+ * Sample code: CosmosDBSqlContainerMigrateToAutoscale.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlContainerMigrateToAutoscale(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .migrateSqlContainerToAutoscale("rg1", "ddb1", "databaseName", "containerName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_MigrateSqlContainerToManualThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources MigrateSqlContainerToManualThroughput. */
+public final class SqlResourcesMigrateSqlContainerToManualThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlContainerMigrateToManualThroughput.json
+ */
+ /**
+ * Sample code: CosmosDBSqlContainerMigrateToManualThroughput.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlContainerMigrateToManualThroughput(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .migrateSqlContainerToManualThroughput("rg1", "ddb1", "databaseName", "containerName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_MigrateSqlDatabaseToAutoscale
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources MigrateSqlDatabaseToAutoscale. */
+public final class SqlResourcesMigrateSqlDatabaseToAutoscaleSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseMigrateToAutoscale.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseMigrateToAutoscale(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().migrateSqlDatabaseToAutoscale("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_MigrateSqlDatabaseToManualThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlResources MigrateSqlDatabaseToManualThroughput. */
+public final class SqlResourcesMigrateSqlDatabaseToManualThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseMigrateToManualThroughput.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseMigrateToManualThroughput(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.sqlResources().migrateSqlDatabaseToManualThroughput("rg1", "ddb1", "databaseName", Context.NONE);
+ }
+}
+```
+
+### SqlResources_RetrieveContinuousBackupInformation
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ContinuousBackupRestoreLocation;
+
+/** Samples for SqlResources RetrieveContinuousBackupInformation. */
+public final class SqlResourcesRetrieveContinuousBackupInformationSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBBackupInformation.json
+ */
+ /**
+ * Sample code: CosmosDBSqlContainerBackupInformation.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlContainerBackupInformation(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .retrieveContinuousBackupInformation(
+ "rgName",
+ "ddb1",
+ "databaseName",
+ "containerName",
+ new ContinuousBackupRestoreLocation().withLocation("North Europe"),
+ Context.NONE);
+ }
+}
+```
+
+### SqlResources_UpdateSqlContainerThroughput
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsResource;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SqlResources UpdateSqlContainerThroughput. */
+public final class SqlResourcesUpdateSqlContainerThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlContainerThroughputUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBSqlContainerThroughputUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlContainerThroughputUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .updateSqlContainerThroughput(
+ "rg1",
+ "ddb1",
+ "databaseName",
+ "containerName",
+ new ThroughputSettingsUpdateParameters()
+ .withLocation("West US")
+ .withTags(mapOf())
+ .withResource(new ThroughputSettingsResource().withThroughput(400)),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### SqlResources_UpdateSqlDatabaseThroughput
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsResource;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SqlResources UpdateSqlDatabaseThroughput. */
+public final class SqlResourcesUpdateSqlDatabaseThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBSqlDatabaseThroughputUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBSqlDatabaseThroughputUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBSqlDatabaseThroughputUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .sqlResources()
+ .updateSqlDatabaseThroughput(
+ "rg1",
+ "ddb1",
+ "databaseName",
+ new ThroughputSettingsUpdateParameters()
+ .withLocation("West US")
+ .withTags(mapOf())
+ .withResource(new ThroughputSettingsResource().withThroughput(400)),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
+### TableResources_CreateUpdateTable
+
+```java
+import com.azure.resourcemanager.cosmos.generated.models.CreateUpdateOptions;
+import com.azure.resourcemanager.cosmos.generated.models.TableResource;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for TableResources CreateUpdateTable. */
+public final class TableResourcesCreateUpdateTableSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBTableCreateUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBTableReplace.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBTableReplace(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .tableResources()
+ .define("tableName")
+ .withRegion("West US")
+ .withExistingDatabaseAccount("rg1", "ddb1")
+ .withResource(new TableResource().withId("tableName"))
+ .withTags(mapOf())
+ .withOptions(new CreateUpdateOptions())
+ .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;
+ }
+}
+```
+
+### TableResources_DeleteTable
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TableResources DeleteTable. */
+public final class TableResourcesDeleteTableSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBTableDelete.json
+ */
+ /**
+ * Sample code: CosmosDBTableDelete.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBTableDelete(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.tableResources().deleteTable("rg1", "ddb1", "tableName", Context.NONE);
+ }
+}
+```
+
+### TableResources_GetTable
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TableResources GetTable. */
+public final class TableResourcesGetTableSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBTableGet.json
+ */
+ /**
+ * Sample code: CosmosDBTableGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBTableGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.tableResources().getTableWithResponse("rg1", "ddb1", "tableName", Context.NONE);
+ }
+}
+```
+
+### TableResources_GetTableThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TableResources GetTableThroughput. */
+public final class TableResourcesGetTableThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBTableThroughputGet.json
+ */
+ /**
+ * Sample code: CosmosDBTableThroughputGet.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBTableThroughputGet(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.tableResources().getTableThroughputWithResponse("rg1", "ddb1", "tableName", Context.NONE);
+ }
+}
+```
+
+### TableResources_ListTables
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TableResources ListTables. */
+public final class TableResourcesListTablesSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBTableList.json
+ */
+ /**
+ * Sample code: CosmosDBTableList.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBTableList(com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.tableResources().listTables("rgName", "ddb1", Context.NONE);
+ }
+}
+```
+
+### TableResources_MigrateTableToAutoscale
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TableResources MigrateTableToAutoscale. */
+public final class TableResourcesMigrateTableToAutoscaleSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBTableMigrateToAutoscale.json
+ */
+ /**
+ * Sample code: CosmosDBTableMigrateToAutoscale.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBTableMigrateToAutoscale(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.tableResources().migrateTableToAutoscale("rg1", "ddb1", "tableName", Context.NONE);
+ }
+}
+```
+
+### TableResources_MigrateTableToManualThroughput
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TableResources MigrateTableToManualThroughput. */
+public final class TableResourcesMigrateTableToManualThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBTableMigrateToManualThroughput.json
+ */
+ /**
+ * Sample code: CosmosDBTableMigrateToManualThroughput.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBTableMigrateToManualThroughput(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager.tableResources().migrateTableToManualThroughput("rg1", "ddb1", "tableName", Context.NONE);
+ }
+}
+```
+
+### TableResources_UpdateTableThroughput
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsResource;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for TableResources UpdateTableThroughput. */
+public final class TableResourcesUpdateTableThroughputSamples {
+ /*
+ * x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-07-01-preview/examples/CosmosDBTableThroughputUpdate.json
+ */
+ /**
+ * Sample code: CosmosDBTableThroughputUpdate.
+ *
+ * @param manager Entry point to CosmosDBManager.
+ */
+ public static void cosmosDBTableThroughputUpdate(
+ com.azure.resourcemanager.cosmos.generated.CosmosDBManager manager) {
+ manager
+ .tableResources()
+ .updateTableThroughput(
+ "rg1",
+ "ddb1",
+ "tableName",
+ new ThroughputSettingsUpdateParameters()
+ .withLocation("West US")
+ .withTags(mapOf())
+ .withResource(new ThroughputSettingsResource().withThroughput(400)),
+ Context.NONE);
+ }
+
+ @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;
+ }
+}
+```
+
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/pom.xml b/sdk/cosmos/azure-resourcemanager-cosmos-generated/pom.xml
new file mode 100644
index 0000000000000..28cb2fa8126ea
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/pom.xml
@@ -0,0 +1,81 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-cosmos-generated
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for CosmosDB Management
+ This package contains Microsoft Azure SDK for CosmosDB Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Cosmos DB Database Service Resource Provider REST API. Package tag package-2021-07-preview.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+ false
+
+
+
+
+
+ com.azure
+ azure-core
+ 1.22.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.3
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/CosmosDBManager.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/CosmosDBManager.java
new file mode 100644
index 0000000000000..5cda160c8f3e6
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/CosmosDBManager.java
@@ -0,0 +1,638 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+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.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.cosmos.generated.fluent.CosmosDBManagementClient;
+import com.azure.resourcemanager.cosmos.generated.implementation.CassandraClustersImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.CassandraDataCentersImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.CassandraResourcesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.CollectionPartitionRegionsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.CollectionPartitionsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.CollectionRegionsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.CollectionsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.CosmosDBManagementClientBuilder;
+import com.azure.resourcemanager.cosmos.generated.implementation.DatabaseAccountRegionsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.DatabaseAccountsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.DatabasesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.GraphResourcesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.GremlinResourcesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.MongoDBResourcesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.NotebookWorkspacesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.OperationsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.PartitionKeyRangeIdRegionsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.PartitionKeyRangeIdsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.PercentileSourceTargetsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.PercentileTargetsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.PercentilesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.PrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.PrivateLinkResourcesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.ResourceProvidersImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.RestorableDatabaseAccountsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.RestorableMongodbCollectionsImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.RestorableMongodbDatabasesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.RestorableMongodbResourcesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.RestorableSqlContainersImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.RestorableSqlDatabasesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.RestorableSqlResourcesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.ServicesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.SqlResourcesImpl;
+import com.azure.resourcemanager.cosmos.generated.implementation.TableResourcesImpl;
+import com.azure.resourcemanager.cosmos.generated.models.CassandraClusters;
+import com.azure.resourcemanager.cosmos.generated.models.CassandraDataCenters;
+import com.azure.resourcemanager.cosmos.generated.models.CassandraResources;
+import com.azure.resourcemanager.cosmos.generated.models.CollectionPartitionRegions;
+import com.azure.resourcemanager.cosmos.generated.models.CollectionPartitions;
+import com.azure.resourcemanager.cosmos.generated.models.CollectionRegions;
+import com.azure.resourcemanager.cosmos.generated.models.Collections;
+import com.azure.resourcemanager.cosmos.generated.models.DatabaseAccountRegions;
+import com.azure.resourcemanager.cosmos.generated.models.DatabaseAccounts;
+import com.azure.resourcemanager.cosmos.generated.models.Databases;
+import com.azure.resourcemanager.cosmos.generated.models.GraphResources;
+import com.azure.resourcemanager.cosmos.generated.models.GremlinResources;
+import com.azure.resourcemanager.cosmos.generated.models.MongoDBResources;
+import com.azure.resourcemanager.cosmos.generated.models.NotebookWorkspaces;
+import com.azure.resourcemanager.cosmos.generated.models.Operations;
+import com.azure.resourcemanager.cosmos.generated.models.PartitionKeyRangeIdRegions;
+import com.azure.resourcemanager.cosmos.generated.models.PartitionKeyRangeIds;
+import com.azure.resourcemanager.cosmos.generated.models.PercentileSourceTargets;
+import com.azure.resourcemanager.cosmos.generated.models.PercentileTargets;
+import com.azure.resourcemanager.cosmos.generated.models.Percentiles;
+import com.azure.resourcemanager.cosmos.generated.models.PrivateEndpointConnections;
+import com.azure.resourcemanager.cosmos.generated.models.PrivateLinkResources;
+import com.azure.resourcemanager.cosmos.generated.models.ResourceProviders;
+import com.azure.resourcemanager.cosmos.generated.models.RestorableDatabaseAccounts;
+import com.azure.resourcemanager.cosmos.generated.models.RestorableMongodbCollections;
+import com.azure.resourcemanager.cosmos.generated.models.RestorableMongodbDatabases;
+import com.azure.resourcemanager.cosmos.generated.models.RestorableMongodbResources;
+import com.azure.resourcemanager.cosmos.generated.models.RestorableSqlContainers;
+import com.azure.resourcemanager.cosmos.generated.models.RestorableSqlDatabases;
+import com.azure.resourcemanager.cosmos.generated.models.RestorableSqlResources;
+import com.azure.resourcemanager.cosmos.generated.models.Services;
+import com.azure.resourcemanager.cosmos.generated.models.SqlResources;
+import com.azure.resourcemanager.cosmos.generated.models.TableResources;
+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 CosmosDBManager. Azure Cosmos DB Database Service Resource Provider REST API. */
+public final class CosmosDBManager {
+ private DatabaseAccounts databaseAccounts;
+
+ private Operations operations;
+
+ private Databases databases;
+
+ private Collections collections;
+
+ private CollectionRegions collectionRegions;
+
+ private DatabaseAccountRegions databaseAccountRegions;
+
+ private PercentileSourceTargets percentileSourceTargets;
+
+ private PercentileTargets percentileTargets;
+
+ private Percentiles percentiles;
+
+ private CollectionPartitionRegions collectionPartitionRegions;
+
+ private CollectionPartitions collectionPartitions;
+
+ private PartitionKeyRangeIds partitionKeyRangeIds;
+
+ private PartitionKeyRangeIdRegions partitionKeyRangeIdRegions;
+
+ private GraphResources graphResources;
+
+ private SqlResources sqlResources;
+
+ private MongoDBResources mongoDBResources;
+
+ private TableResources tableResources;
+
+ private CassandraResources cassandraResources;
+
+ private GremlinResources gremlinResources;
+
+ private ResourceProviders resourceProviders;
+
+ private NotebookWorkspaces notebookWorkspaces;
+
+ private PrivateEndpointConnections privateEndpointConnections;
+
+ private PrivateLinkResources privateLinkResources;
+
+ private RestorableDatabaseAccounts restorableDatabaseAccounts;
+
+ private RestorableSqlDatabases restorableSqlDatabases;
+
+ private RestorableSqlContainers restorableSqlContainers;
+
+ private RestorableSqlResources restorableSqlResources;
+
+ private RestorableMongodbDatabases restorableMongodbDatabases;
+
+ private RestorableMongodbCollections restorableMongodbCollections;
+
+ private RestorableMongodbResources restorableMongodbResources;
+
+ private CassandraClusters cassandraClusters;
+
+ private CassandraDataCenters cassandraDataCenters;
+
+ private Services services;
+
+ private final CosmosDBManagementClient clientObject;
+
+ private CosmosDBManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new CosmosDBManagementClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of CosmosDB service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the CosmosDB service API instance.
+ */
+ public static CosmosDBManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create CosmosDBManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new CosmosDBManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private 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 Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of CosmosDB service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the CosmosDB service API instance.
+ */
+ public CosmosDBManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.cosmos.generated")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new CosmosDBManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of DatabaseAccounts. */
+ public DatabaseAccounts databaseAccounts() {
+ if (this.databaseAccounts == null) {
+ this.databaseAccounts = new DatabaseAccountsImpl(clientObject.getDatabaseAccounts(), this);
+ }
+ return databaseAccounts;
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of Databases. */
+ public Databases databases() {
+ if (this.databases == null) {
+ this.databases = new DatabasesImpl(clientObject.getDatabases(), this);
+ }
+ return databases;
+ }
+
+ /** @return Resource collection API of Collections. */
+ public Collections collections() {
+ if (this.collections == null) {
+ this.collections = new CollectionsImpl(clientObject.getCollections(), this);
+ }
+ return collections;
+ }
+
+ /** @return Resource collection API of CollectionRegions. */
+ public CollectionRegions collectionRegions() {
+ if (this.collectionRegions == null) {
+ this.collectionRegions = new CollectionRegionsImpl(clientObject.getCollectionRegions(), this);
+ }
+ return collectionRegions;
+ }
+
+ /** @return Resource collection API of DatabaseAccountRegions. */
+ public DatabaseAccountRegions databaseAccountRegions() {
+ if (this.databaseAccountRegions == null) {
+ this.databaseAccountRegions =
+ new DatabaseAccountRegionsImpl(clientObject.getDatabaseAccountRegions(), this);
+ }
+ return databaseAccountRegions;
+ }
+
+ /** @return Resource collection API of PercentileSourceTargets. */
+ public PercentileSourceTargets percentileSourceTargets() {
+ if (this.percentileSourceTargets == null) {
+ this.percentileSourceTargets =
+ new PercentileSourceTargetsImpl(clientObject.getPercentileSourceTargets(), this);
+ }
+ return percentileSourceTargets;
+ }
+
+ /** @return Resource collection API of PercentileTargets. */
+ public PercentileTargets percentileTargets() {
+ if (this.percentileTargets == null) {
+ this.percentileTargets = new PercentileTargetsImpl(clientObject.getPercentileTargets(), this);
+ }
+ return percentileTargets;
+ }
+
+ /** @return Resource collection API of Percentiles. */
+ public Percentiles percentiles() {
+ if (this.percentiles == null) {
+ this.percentiles = new PercentilesImpl(clientObject.getPercentiles(), this);
+ }
+ return percentiles;
+ }
+
+ /** @return Resource collection API of CollectionPartitionRegions. */
+ public CollectionPartitionRegions collectionPartitionRegions() {
+ if (this.collectionPartitionRegions == null) {
+ this.collectionPartitionRegions =
+ new CollectionPartitionRegionsImpl(clientObject.getCollectionPartitionRegions(), this);
+ }
+ return collectionPartitionRegions;
+ }
+
+ /** @return Resource collection API of CollectionPartitions. */
+ public CollectionPartitions collectionPartitions() {
+ if (this.collectionPartitions == null) {
+ this.collectionPartitions = new CollectionPartitionsImpl(clientObject.getCollectionPartitions(), this);
+ }
+ return collectionPartitions;
+ }
+
+ /** @return Resource collection API of PartitionKeyRangeIds. */
+ public PartitionKeyRangeIds partitionKeyRangeIds() {
+ if (this.partitionKeyRangeIds == null) {
+ this.partitionKeyRangeIds = new PartitionKeyRangeIdsImpl(clientObject.getPartitionKeyRangeIds(), this);
+ }
+ return partitionKeyRangeIds;
+ }
+
+ /** @return Resource collection API of PartitionKeyRangeIdRegions. */
+ public PartitionKeyRangeIdRegions partitionKeyRangeIdRegions() {
+ if (this.partitionKeyRangeIdRegions == null) {
+ this.partitionKeyRangeIdRegions =
+ new PartitionKeyRangeIdRegionsImpl(clientObject.getPartitionKeyRangeIdRegions(), this);
+ }
+ return partitionKeyRangeIdRegions;
+ }
+
+ /** @return Resource collection API of GraphResources. */
+ public GraphResources graphResources() {
+ if (this.graphResources == null) {
+ this.graphResources = new GraphResourcesImpl(clientObject.getGraphResources(), this);
+ }
+ return graphResources;
+ }
+
+ /** @return Resource collection API of SqlResources. */
+ public SqlResources sqlResources() {
+ if (this.sqlResources == null) {
+ this.sqlResources = new SqlResourcesImpl(clientObject.getSqlResources(), this);
+ }
+ return sqlResources;
+ }
+
+ /** @return Resource collection API of MongoDBResources. */
+ public MongoDBResources mongoDBResources() {
+ if (this.mongoDBResources == null) {
+ this.mongoDBResources = new MongoDBResourcesImpl(clientObject.getMongoDBResources(), this);
+ }
+ return mongoDBResources;
+ }
+
+ /** @return Resource collection API of TableResources. */
+ public TableResources tableResources() {
+ if (this.tableResources == null) {
+ this.tableResources = new TableResourcesImpl(clientObject.getTableResources(), this);
+ }
+ return tableResources;
+ }
+
+ /** @return Resource collection API of CassandraResources. */
+ public CassandraResources cassandraResources() {
+ if (this.cassandraResources == null) {
+ this.cassandraResources = new CassandraResourcesImpl(clientObject.getCassandraResources(), this);
+ }
+ return cassandraResources;
+ }
+
+ /** @return Resource collection API of GremlinResources. */
+ public GremlinResources gremlinResources() {
+ if (this.gremlinResources == null) {
+ this.gremlinResources = new GremlinResourcesImpl(clientObject.getGremlinResources(), this);
+ }
+ return gremlinResources;
+ }
+
+ /** @return Resource collection API of ResourceProviders. */
+ public ResourceProviders resourceProviders() {
+ if (this.resourceProviders == null) {
+ this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
+ }
+ return resourceProviders;
+ }
+
+ /** @return Resource collection API of NotebookWorkspaces. */
+ public NotebookWorkspaces notebookWorkspaces() {
+ if (this.notebookWorkspaces == null) {
+ this.notebookWorkspaces = new NotebookWorkspacesImpl(clientObject.getNotebookWorkspaces(), this);
+ }
+ return notebookWorkspaces;
+ }
+
+ /** @return Resource collection API of PrivateEndpointConnections. */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /** @return Resource collection API of PrivateLinkResources. */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
+ }
+
+ /** @return Resource collection API of RestorableDatabaseAccounts. */
+ public RestorableDatabaseAccounts restorableDatabaseAccounts() {
+ if (this.restorableDatabaseAccounts == null) {
+ this.restorableDatabaseAccounts =
+ new RestorableDatabaseAccountsImpl(clientObject.getRestorableDatabaseAccounts(), this);
+ }
+ return restorableDatabaseAccounts;
+ }
+
+ /** @return Resource collection API of RestorableSqlDatabases. */
+ public RestorableSqlDatabases restorableSqlDatabases() {
+ if (this.restorableSqlDatabases == null) {
+ this.restorableSqlDatabases =
+ new RestorableSqlDatabasesImpl(clientObject.getRestorableSqlDatabases(), this);
+ }
+ return restorableSqlDatabases;
+ }
+
+ /** @return Resource collection API of RestorableSqlContainers. */
+ public RestorableSqlContainers restorableSqlContainers() {
+ if (this.restorableSqlContainers == null) {
+ this.restorableSqlContainers =
+ new RestorableSqlContainersImpl(clientObject.getRestorableSqlContainers(), this);
+ }
+ return restorableSqlContainers;
+ }
+
+ /** @return Resource collection API of RestorableSqlResources. */
+ public RestorableSqlResources restorableSqlResources() {
+ if (this.restorableSqlResources == null) {
+ this.restorableSqlResources =
+ new RestorableSqlResourcesImpl(clientObject.getRestorableSqlResources(), this);
+ }
+ return restorableSqlResources;
+ }
+
+ /** @return Resource collection API of RestorableMongodbDatabases. */
+ public RestorableMongodbDatabases restorableMongodbDatabases() {
+ if (this.restorableMongodbDatabases == null) {
+ this.restorableMongodbDatabases =
+ new RestorableMongodbDatabasesImpl(clientObject.getRestorableMongodbDatabases(), this);
+ }
+ return restorableMongodbDatabases;
+ }
+
+ /** @return Resource collection API of RestorableMongodbCollections. */
+ public RestorableMongodbCollections restorableMongodbCollections() {
+ if (this.restorableMongodbCollections == null) {
+ this.restorableMongodbCollections =
+ new RestorableMongodbCollectionsImpl(clientObject.getRestorableMongodbCollections(), this);
+ }
+ return restorableMongodbCollections;
+ }
+
+ /** @return Resource collection API of RestorableMongodbResources. */
+ public RestorableMongodbResources restorableMongodbResources() {
+ if (this.restorableMongodbResources == null) {
+ this.restorableMongodbResources =
+ new RestorableMongodbResourcesImpl(clientObject.getRestorableMongodbResources(), this);
+ }
+ return restorableMongodbResources;
+ }
+
+ /** @return Resource collection API of CassandraClusters. */
+ public CassandraClusters cassandraClusters() {
+ if (this.cassandraClusters == null) {
+ this.cassandraClusters = new CassandraClustersImpl(clientObject.getCassandraClusters(), this);
+ }
+ return cassandraClusters;
+ }
+
+ /** @return Resource collection API of CassandraDataCenters. */
+ public CassandraDataCenters cassandraDataCenters() {
+ if (this.cassandraDataCenters == null) {
+ this.cassandraDataCenters = new CassandraDataCentersImpl(clientObject.getCassandraDataCenters(), this);
+ }
+ return cassandraDataCenters;
+ }
+
+ /** @return Resource collection API of Services. */
+ public Services services() {
+ if (this.services == null) {
+ this.services = new ServicesImpl(clientObject.getServices(), this);
+ }
+ return services;
+ }
+
+ /**
+ * @return Wrapped service client CosmosDBManagementClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ */
+ public CosmosDBManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CassandraClustersClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CassandraClustersClient.java
new file mode 100644
index 0000000000000..cf006470c8825
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CassandraClustersClient.java
@@ -0,0 +1,444 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.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.cosmos.generated.fluent.models.BackupResourceInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.ClusterNodeStatusInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.ClusterResourceInner;
+import com.azure.resourcemanager.cosmos.generated.models.RepairPostBody;
+
+/** An instance of this class provides access to all the operations defined in CassandraClustersClient. */
+public interface CassandraClustersClient {
+ /**
+ * List all managed Cassandra clusters in this 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 list of managed Cassandra clusters.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List all managed Cassandra clusters in this 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 list of managed Cassandra clusters.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List all managed Cassandra clusters in this resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of managed Cassandra clusters.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List all managed Cassandra clusters in this resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of managed Cassandra clusters.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Get the properties of a managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 properties of a managed Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterResourceInner getByResourceGroup(String resourceGroupName, String clusterName);
+
+ /**
+ * Get the properties of a managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 properties of a managed Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Deletes a managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName);
+
+ /**
+ * Deletes a managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Deletes a managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 clusterName);
+
+ /**
+ * Deletes a managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 clusterName, Context context);
+
+ /**
+ * Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update
+ * only some properties, use PATCH.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body The properties specifying the desired state of the managed Cassandra cluster.
+ * @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 representation of a managed Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterResourceInner> beginCreateUpdate(
+ String resourceGroupName, String clusterName, ClusterResourceInner body);
+
+ /**
+ * Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update
+ * only some properties, use PATCH.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body The properties specifying the desired state of the managed Cassandra cluster.
+ * @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 representation of a managed Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterResourceInner> beginCreateUpdate(
+ String resourceGroupName, String clusterName, ClusterResourceInner body, Context context);
+
+ /**
+ * Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update
+ * only some properties, use PATCH.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body The properties specifying the desired state of the managed Cassandra cluster.
+ * @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 representation of a managed Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterResourceInner createUpdate(String resourceGroupName, String clusterName, ClusterResourceInner body);
+
+ /**
+ * Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update
+ * only some properties, use PATCH.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body The properties specifying the desired state of the managed Cassandra cluster.
+ * @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 representation of a managed Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterResourceInner createUpdate(
+ String resourceGroupName, String clusterName, ClusterResourceInner body, Context context);
+
+ /**
+ * Updates some of the properties of a managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body Parameters to provide for specifying the managed Cassandra cluster.
+ * @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 representation of a managed Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterResourceInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterResourceInner body);
+
+ /**
+ * Updates some of the properties of a managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body Parameters to provide for specifying the managed Cassandra cluster.
+ * @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 representation of a managed Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterResourceInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterResourceInner body, Context context);
+
+ /**
+ * Updates some of the properties of a managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body Parameters to provide for specifying the managed Cassandra cluster.
+ * @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 representation of a managed Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterResourceInner update(String resourceGroupName, String clusterName, ClusterResourceInner body);
+
+ /**
+ * Updates some of the properties of a managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body Parameters to provide for specifying the managed Cassandra cluster.
+ * @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 representation of a managed Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterResourceInner update(
+ String resourceGroupName, String clusterName, ClusterResourceInner body, Context context);
+
+ /**
+ * Request that repair begin on this cluster as soon as possible.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body Specification of what keyspaces and tables to run repair on.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRequestRepair(
+ String resourceGroupName, String clusterName, RepairPostBody body);
+
+ /**
+ * Request that repair begin on this cluster as soon as possible.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body Specification of what keyspaces and tables to run repair on.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRequestRepair(
+ String resourceGroupName, String clusterName, RepairPostBody body, Context context);
+
+ /**
+ * Request that repair begin on this cluster as soon as possible.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body Specification of what keyspaces and tables to run repair on.
+ * @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 requestRepair(String resourceGroupName, String clusterName, RepairPostBody body);
+
+ /**
+ * Request that repair begin on this cluster as soon as possible.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param body Specification of what keyspaces and tables to run repair on.
+ * @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 requestRepair(String resourceGroupName, String clusterName, RepairPostBody body, Context context);
+
+ /**
+ * Request the status of all nodes in the cluster (as returned by 'nodetool status').
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 status of all nodes in the cluster (as returned by 'nodetool status').
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterNodeStatusInner> beginFetchNodeStatus(
+ String resourceGroupName, String clusterName);
+
+ /**
+ * Request the status of all nodes in the cluster (as returned by 'nodetool status').
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 status of all nodes in the cluster (as returned by 'nodetool status').
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterNodeStatusInner> beginFetchNodeStatus(
+ String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Request the status of all nodes in the cluster (as returned by 'nodetool status').
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 status of all nodes in the cluster (as returned by 'nodetool status').
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterNodeStatusInner fetchNodeStatus(String resourceGroupName, String clusterName);
+
+ /**
+ * Request the status of all nodes in the cluster (as returned by 'nodetool status').
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 status of all nodes in the cluster (as returned by 'nodetool status').
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterNodeStatusInner fetchNodeStatus(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * List the backups of this cluster that are available to restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 list of restorable backups for a Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBackups(String resourceGroupName, String clusterName);
+
+ /**
+ * List the backups of this cluster that are available to restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 list of restorable backups for a Cassandra cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBackups(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Get the properties of an individual backup of this cluster that is available to restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param backupId Id of a restorable backup of a Cassandra cluster.
+ * @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 properties of an individual backup of this cluster that is available to restore.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupResourceInner getBackup(String resourceGroupName, String clusterName, String backupId);
+
+ /**
+ * Get the properties of an individual backup of this cluster that is available to restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param backupId Id of a restorable backup of a Cassandra cluster.
+ * @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 properties of an individual backup of this cluster that is available to restore.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getBackupWithResponse(
+ String resourceGroupName, String clusterName, String backupId, Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CassandraDataCentersClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CassandraDataCentersClient.java
new file mode 100644
index 0000000000000..77479c768924f
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CassandraDataCentersClient.java
@@ -0,0 +1,283 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.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.cosmos.generated.fluent.models.DataCenterResourceInner;
+
+/** An instance of this class provides access to all the operations defined in CassandraDataCentersClient. */
+public interface CassandraDataCentersClient {
+ /**
+ * List all data centers in a particular managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 list of managed Cassandra data centers and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String clusterName);
+
+ /**
+ * List all data centers in a particular managed Cassandra cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @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 list of managed Cassandra data centers and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Get the properties of a managed Cassandra data center.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @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 properties of a managed Cassandra data center.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataCenterResourceInner get(String resourceGroupName, String clusterName, String dataCenterName);
+
+ /**
+ * Get the properties of a managed Cassandra data center.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @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 properties of a managed Cassandra data center.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String dataCenterName, Context context);
+
+ /**
+ * Delete a managed Cassandra data center.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String dataCenterName);
+
+ /**
+ * Delete a managed Cassandra data center.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String dataCenterName, Context context);
+
+ /**
+ * Delete a managed Cassandra data center.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @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 clusterName, String dataCenterName);
+
+ /**
+ * Delete a managed Cassandra data center.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @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 clusterName, String dataCenterName, Context context);
+
+ /**
+ * Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some
+ * properties, use PATCH.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @param body Parameters specifying the managed Cassandra data center.
+ * @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 managed Cassandra data center.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataCenterResourceInner> beginCreateUpdate(
+ String resourceGroupName, String clusterName, String dataCenterName, DataCenterResourceInner body);
+
+ /**
+ * Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some
+ * properties, use PATCH.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @param body Parameters specifying the managed Cassandra data center.
+ * @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 managed Cassandra data center.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataCenterResourceInner> beginCreateUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String dataCenterName,
+ DataCenterResourceInner body,
+ Context context);
+
+ /**
+ * Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some
+ * properties, use PATCH.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @param body Parameters specifying the managed Cassandra data center.
+ * @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 managed Cassandra data center.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataCenterResourceInner createUpdate(
+ String resourceGroupName, String clusterName, String dataCenterName, DataCenterResourceInner body);
+
+ /**
+ * Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some
+ * properties, use PATCH.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @param body Parameters specifying the managed Cassandra data center.
+ * @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 managed Cassandra data center.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataCenterResourceInner createUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String dataCenterName,
+ DataCenterResourceInner body,
+ Context context);
+
+ /**
+ * Update some of the properties of a managed Cassandra data center.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @param body Parameters to provide for specifying the managed Cassandra data center.
+ * @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 managed Cassandra data center.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataCenterResourceInner> beginUpdate(
+ String resourceGroupName, String clusterName, String dataCenterName, DataCenterResourceInner body);
+
+ /**
+ * Update some of the properties of a managed Cassandra data center.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @param body Parameters to provide for specifying the managed Cassandra data center.
+ * @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 managed Cassandra data center.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DataCenterResourceInner> beginUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String dataCenterName,
+ DataCenterResourceInner body,
+ Context context);
+
+ /**
+ * Update some of the properties of a managed Cassandra data center.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @param body Parameters to provide for specifying the managed Cassandra data center.
+ * @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 managed Cassandra data center.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataCenterResourceInner update(
+ String resourceGroupName, String clusterName, String dataCenterName, DataCenterResourceInner body);
+
+ /**
+ * Update some of the properties of a managed Cassandra data center.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Managed Cassandra cluster name.
+ * @param dataCenterName Data center name in a managed Cassandra cluster.
+ * @param body Parameters to provide for specifying the managed Cassandra data center.
+ * @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 managed Cassandra data center.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataCenterResourceInner update(
+ String resourceGroupName,
+ String clusterName,
+ String dataCenterName,
+ DataCenterResourceInner body,
+ Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CassandraResourcesClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CassandraResourcesClient.java
new file mode 100644
index 0000000000000..3a847731db5cf
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CassandraResourcesClient.java
@@ -0,0 +1,1434 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.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.cosmos.generated.fluent.models.CassandraKeyspaceGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.CassandraTableGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.CassandraViewGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.ThroughputSettingsGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.models.CassandraKeyspaceCreateUpdateParameters;
+import com.azure.resourcemanager.cosmos.generated.models.CassandraTableCreateUpdateParameters;
+import com.azure.resourcemanager.cosmos.generated.models.CassandraViewCreateUpdateParameters;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in CassandraResourcesClient. */
+public interface CassandraResourcesClient {
+ /**
+ * Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 List operation response, that contains the Cassandra keyspaces and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listCassandraKeyspaces(
+ String resourceGroupName, String accountName);
+
+ /**
+ * Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 List operation response, that contains the Cassandra keyspaces and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listCassandraKeyspaces(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CassandraKeyspaceGetResultsInner getCassandraKeyspace(
+ String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getCassandraKeyspaceWithResponse(
+ String resourceGroupName, String accountName, String keyspaceName, Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB Cassandra keyspace.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CassandraKeyspaceGetResultsInner>
+ beginCreateUpdateCassandraKeyspace(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
+ * @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 an Azure Cosmos DB Cassandra keyspace.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CassandraKeyspaceGetResultsInner>
+ beginCreateUpdateCassandraKeyspace(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters,
+ Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB Cassandra keyspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CassandraKeyspaceGetResultsInner createUpdateCassandraKeyspace(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param createUpdateCassandraKeyspaceParameters The parameters to provide for the current Cassandra keyspace.
+ * @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 an Azure Cosmos DB Cassandra keyspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CassandraKeyspaceGetResultsInner createUpdateCassandraKeyspace(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ CassandraKeyspaceCreateUpdateParameters createUpdateCassandraKeyspaceParameters,
+ Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteCassandraKeyspace(
+ String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteCassandraKeyspace(
+ String resourceGroupName, String accountName, String keyspaceName, Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 deleteCassandraKeyspace(String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 deleteCassandraKeyspace(String resourceGroupName, String accountName, String keyspaceName, Context context);
+
+ /**
+ * Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the
+ * provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the
+ * provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner getCassandraKeyspaceThroughput(
+ String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the
+ * provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the
+ * provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getCassandraKeyspaceThroughputWithResponse(
+ String resourceGroupName, String accountName, String keyspaceName, Context context);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra
+ * Keyspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateCassandraKeyspaceThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra
+ * Keyspace.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateCassandraKeyspaceThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra
+ * Keyspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateCassandraKeyspaceThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra Keyspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra
+ * Keyspace.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateCassandraKeyspaceThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraKeyspaceToAutoscale(String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraKeyspaceToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraKeyspaceToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraKeyspaceToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraKeyspaceToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraKeyspaceToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraKeyspaceToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraKeyspaceToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, Context context);
+
+ /**
+ * Lists the Cassandra table under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 List operation response, that contains the Cassandra tables and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listCassandraTables(
+ String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Lists the Cassandra table under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 List operation response, that contains the Cassandra tables and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listCassandraTables(
+ String resourceGroupName, String accountName, String keyspaceName, Context context);
+
+ /**
+ * Gets the Cassandra table under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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 Cassandra table under an existing Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CassandraTableGetResultsInner getCassandraTable(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName);
+
+ /**
+ * Gets the Cassandra table under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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 Cassandra table under an existing Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getCassandraTableWithResponse(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName, Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB Cassandra table.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CassandraTableGetResultsInner>
+ beginCreateUpdateCassandraTable(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String tableName,
+ CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @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 an Azure Cosmos DB Cassandra table.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CassandraTableGetResultsInner>
+ beginCreateUpdateCassandraTable(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String tableName,
+ CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters,
+ Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB Cassandra table.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CassandraTableGetResultsInner createUpdateCassandraTable(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String tableName,
+ CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra Table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param createUpdateCassandraTableParameters The parameters to provide for the current Cassandra Table.
+ * @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 an Azure Cosmos DB Cassandra table.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CassandraTableGetResultsInner createUpdateCassandraTable(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String tableName,
+ CassandraTableCreateUpdateParameters createUpdateCassandraTableParameters,
+ Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteCassandraTable(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteCassandraTable(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName, Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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 deleteCassandraTable(String resourceGroupName, String accountName, String keyspaceName, String tableName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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 deleteCassandraTable(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName, Context context);
+
+ /**
+ * Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the
+ * provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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 RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the
+ * provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner getCassandraTableThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName);
+
+ /**
+ * Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the
+ * provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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 RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the
+ * provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getCassandraTableThroughputWithResponse(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName, Context context);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra
+ * table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateCassandraTableThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String tableName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra
+ * table.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateCassandraTableThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String tableName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra
+ * table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateCassandraTableThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String tableName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra
+ * table.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateCassandraTableThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String tableName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraTableToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraTableToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraTableToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraTableToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraTableToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraTableToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraTableToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param tableName Cosmos DB table name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraTableToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, String tableName, Context context);
+
+ /**
+ * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 List operation response, that contains the Cassandra views and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listCassandraViews(
+ String resourceGroupName, String accountName, String keyspaceName);
+
+ /**
+ * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @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 List operation response, that contains the Cassandra views and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listCassandraViews(
+ String resourceGroupName, String accountName, String keyspaceName, Context context);
+
+ /**
+ * Gets the Cassandra view under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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 Cassandra view under an existing Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CassandraViewGetResultsInner getCassandraView(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName);
+
+ /**
+ * Gets the Cassandra view under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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 Cassandra view under an existing Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getCassandraViewWithResponse(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName, Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra View.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB Cassandra view.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CassandraViewGetResultsInner> beginCreateUpdateCassandraView(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String viewName,
+ CassandraViewCreateUpdateParameters createUpdateCassandraViewParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra View.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View.
+ * @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 an Azure Cosmos DB Cassandra view.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CassandraViewGetResultsInner> beginCreateUpdateCassandraView(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String viewName,
+ CassandraViewCreateUpdateParameters createUpdateCassandraViewParameters,
+ Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra View.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB Cassandra view.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CassandraViewGetResultsInner createUpdateCassandraView(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String viewName,
+ CassandraViewCreateUpdateParameters createUpdateCassandraViewParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Cassandra View.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View.
+ * @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 an Azure Cosmos DB Cassandra view.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CassandraViewGetResultsInner createUpdateCassandraView(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String viewName,
+ CassandraViewCreateUpdateParameters createUpdateCassandraViewParameters,
+ Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra view.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteCassandraView(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra view.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteCassandraView(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName, Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra view.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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 deleteCassandraView(String resourceGroupName, String accountName, String keyspaceName, String viewName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Cassandra view.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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 deleteCassandraView(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName, Context context);
+
+ /**
+ * Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the
+ * provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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 RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the
+ * provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner getCassandraViewThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName);
+
+ /**
+ * Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the
+ * provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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 RUs per second of the Cassandra view under an existing Azure Cosmos DB database account with the
+ * provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getCassandraViewThroughputWithResponse(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName, Context context);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra view.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra view.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateCassandraViewThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String viewName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra view.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra view.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateCassandraViewThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String viewName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra view.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra view.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateCassandraViewThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String viewName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Cassandra view.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Cassandra view.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateCassandraViewThroughput(
+ String resourceGroupName,
+ String accountName,
+ String keyspaceName,
+ String viewName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraViewToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraViewToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraViewToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraViewToAutoscale(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraViewToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateCassandraViewToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraViewToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName);
+
+ /**
+ * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyspaceName Cosmos DB keyspace name.
+ * @param viewName Cosmos DB view name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateCassandraViewToManualThroughput(
+ String resourceGroupName, String accountName, String keyspaceName, String viewName, Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionPartitionRegionsClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionPartitionRegionsClient.java
new file mode 100644
index 0000000000000..71bf720881e09
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionPartitionRegionsClient.java
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.PartitionMetricInner;
+
+/** An instance of this class provides access to all the operations defined in CollectionPartitionRegionsClient. */
+public interface CollectionPartitionRegionsClient {
+ /**
+ * Retrieves the metrics determined by the given filter for the given collection and region, split by partition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 to a list partition metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName,
+ String accountName,
+ String region,
+ String databaseRid,
+ String collectionRid,
+ String filter);
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given collection and region, split by partition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 response to a list partition metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName,
+ String accountName,
+ String region,
+ String databaseRid,
+ String collectionRid,
+ String filter,
+ Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionPartitionsClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionPartitionsClient.java
new file mode 100644
index 0000000000000..2b56234440753
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionPartitionsClient.java
@@ -0,0 +1,99 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.PartitionMetricInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.PartitionUsageInner;
+
+/** An instance of this class provides access to all the operations defined in CollectionPartitionsClient. */
+public interface CollectionPartitionsClient {
+ /**
+ * Retrieves the metrics determined by the given filter for the given collection, split by partition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 to a list partition metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName, String accountName, String databaseRid, String collectionRid, String filter);
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given collection, split by partition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 response to a list partition metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName,
+ String accountName,
+ String databaseRid,
+ String collectionRid,
+ String filter,
+ Context context);
+
+ /**
+ * Retrieves the usages (most recent storage data) for the given collection, split by partition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @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 to a list partition level usage request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listUsages(
+ String resourceGroupName, String accountName, String databaseRid, String collectionRid);
+
+ /**
+ * Retrieves the usages (most recent storage data) for the given collection, split by partition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of usages to return. The supported parameter is
+ * name.value (name of the metric, can have an or of multiple names).
+ * @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 response to a list partition level usage request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listUsages(
+ String resourceGroupName,
+ String accountName,
+ String databaseRid,
+ String collectionRid,
+ String filter,
+ Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionRegionsClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionRegionsClient.java
new file mode 100644
index 0000000000000..b91fa05e2f395
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionRegionsClient.java
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.MetricInner;
+
+/** An instance of this class provides access to all the operations defined in CollectionRegionsClient. */
+public interface CollectionRegionsClient {
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account, collection and region.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 to a list metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName,
+ String accountName,
+ String region,
+ String databaseRid,
+ String collectionRid,
+ String filter);
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account, collection and region.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 response to a list metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName,
+ String accountName,
+ String region,
+ String databaseRid,
+ String collectionRid,
+ String filter,
+ Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionsClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionsClient.java
new file mode 100644
index 0000000000000..a5c83b2e13f7d
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CollectionsClient.java
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.MetricDefinitionInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.MetricInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.UsageInner;
+
+/** An instance of this class provides access to all the operations defined in CollectionsClient. */
+public interface CollectionsClient {
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account and collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 to a list metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName, String accountName, String databaseRid, String collectionRid, String filter);
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account and collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 response to a list metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName,
+ String accountName,
+ String databaseRid,
+ String collectionRid,
+ String filter,
+ Context context);
+
+ /**
+ * Retrieves the usages (most recent storage data) for the given collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @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 to a list usage request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listUsages(
+ String resourceGroupName, String accountName, String databaseRid, String collectionRid);
+
+ /**
+ * Retrieves the usages (most recent storage data) for the given collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of usages to return. The supported parameter is
+ * name.value (name of the metric, can have an or of multiple names).
+ * @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 response to a list usage request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listUsages(
+ String resourceGroupName,
+ String accountName,
+ String databaseRid,
+ String collectionRid,
+ String filter,
+ Context context);
+
+ /**
+ * Retrieves metric definitions for the given collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @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 to a list metric definitions request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetricDefinitions(
+ String resourceGroupName, String accountName, String databaseRid, String collectionRid);
+
+ /**
+ * Retrieves metric definitions for the given collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @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 response to a list metric definitions request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetricDefinitions(
+ String resourceGroupName, String accountName, String databaseRid, String collectionRid, Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CosmosDBManagementClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CosmosDBManagementClient.java
new file mode 100644
index 0000000000000..1558c301245ec
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/CosmosDBManagementClient.java
@@ -0,0 +1,277 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for CosmosDBManagementClient class. */
+public interface CosmosDBManagementClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the DatabaseAccountsClient object to access its operations.
+ *
+ * @return the DatabaseAccountsClient object.
+ */
+ DatabaseAccountsClient getDatabaseAccounts();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the DatabasesClient object to access its operations.
+ *
+ * @return the DatabasesClient object.
+ */
+ DatabasesClient getDatabases();
+
+ /**
+ * Gets the CollectionsClient object to access its operations.
+ *
+ * @return the CollectionsClient object.
+ */
+ CollectionsClient getCollections();
+
+ /**
+ * Gets the CollectionRegionsClient object to access its operations.
+ *
+ * @return the CollectionRegionsClient object.
+ */
+ CollectionRegionsClient getCollectionRegions();
+
+ /**
+ * Gets the DatabaseAccountRegionsClient object to access its operations.
+ *
+ * @return the DatabaseAccountRegionsClient object.
+ */
+ DatabaseAccountRegionsClient getDatabaseAccountRegions();
+
+ /**
+ * Gets the PercentileSourceTargetsClient object to access its operations.
+ *
+ * @return the PercentileSourceTargetsClient object.
+ */
+ PercentileSourceTargetsClient getPercentileSourceTargets();
+
+ /**
+ * Gets the PercentileTargetsClient object to access its operations.
+ *
+ * @return the PercentileTargetsClient object.
+ */
+ PercentileTargetsClient getPercentileTargets();
+
+ /**
+ * Gets the PercentilesClient object to access its operations.
+ *
+ * @return the PercentilesClient object.
+ */
+ PercentilesClient getPercentiles();
+
+ /**
+ * Gets the CollectionPartitionRegionsClient object to access its operations.
+ *
+ * @return the CollectionPartitionRegionsClient object.
+ */
+ CollectionPartitionRegionsClient getCollectionPartitionRegions();
+
+ /**
+ * Gets the CollectionPartitionsClient object to access its operations.
+ *
+ * @return the CollectionPartitionsClient object.
+ */
+ CollectionPartitionsClient getCollectionPartitions();
+
+ /**
+ * Gets the PartitionKeyRangeIdsClient object to access its operations.
+ *
+ * @return the PartitionKeyRangeIdsClient object.
+ */
+ PartitionKeyRangeIdsClient getPartitionKeyRangeIds();
+
+ /**
+ * Gets the PartitionKeyRangeIdRegionsClient object to access its operations.
+ *
+ * @return the PartitionKeyRangeIdRegionsClient object.
+ */
+ PartitionKeyRangeIdRegionsClient getPartitionKeyRangeIdRegions();
+
+ /**
+ * Gets the GraphResourcesClient object to access its operations.
+ *
+ * @return the GraphResourcesClient object.
+ */
+ GraphResourcesClient getGraphResources();
+
+ /**
+ * Gets the SqlResourcesClient object to access its operations.
+ *
+ * @return the SqlResourcesClient object.
+ */
+ SqlResourcesClient getSqlResources();
+
+ /**
+ * Gets the MongoDBResourcesClient object to access its operations.
+ *
+ * @return the MongoDBResourcesClient object.
+ */
+ MongoDBResourcesClient getMongoDBResources();
+
+ /**
+ * Gets the TableResourcesClient object to access its operations.
+ *
+ * @return the TableResourcesClient object.
+ */
+ TableResourcesClient getTableResources();
+
+ /**
+ * Gets the CassandraResourcesClient object to access its operations.
+ *
+ * @return the CassandraResourcesClient object.
+ */
+ CassandraResourcesClient getCassandraResources();
+
+ /**
+ * Gets the GremlinResourcesClient object to access its operations.
+ *
+ * @return the GremlinResourcesClient object.
+ */
+ GremlinResourcesClient getGremlinResources();
+
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ ResourceProvidersClient getResourceProviders();
+
+ /**
+ * Gets the NotebookWorkspacesClient object to access its operations.
+ *
+ * @return the NotebookWorkspacesClient object.
+ */
+ NotebookWorkspacesClient getNotebookWorkspaces();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ PrivateLinkResourcesClient getPrivateLinkResources();
+
+ /**
+ * Gets the RestorableDatabaseAccountsClient object to access its operations.
+ *
+ * @return the RestorableDatabaseAccountsClient object.
+ */
+ RestorableDatabaseAccountsClient getRestorableDatabaseAccounts();
+
+ /**
+ * Gets the RestorableSqlDatabasesClient object to access its operations.
+ *
+ * @return the RestorableSqlDatabasesClient object.
+ */
+ RestorableSqlDatabasesClient getRestorableSqlDatabases();
+
+ /**
+ * Gets the RestorableSqlContainersClient object to access its operations.
+ *
+ * @return the RestorableSqlContainersClient object.
+ */
+ RestorableSqlContainersClient getRestorableSqlContainers();
+
+ /**
+ * Gets the RestorableSqlResourcesClient object to access its operations.
+ *
+ * @return the RestorableSqlResourcesClient object.
+ */
+ RestorableSqlResourcesClient getRestorableSqlResources();
+
+ /**
+ * Gets the RestorableMongodbDatabasesClient object to access its operations.
+ *
+ * @return the RestorableMongodbDatabasesClient object.
+ */
+ RestorableMongodbDatabasesClient getRestorableMongodbDatabases();
+
+ /**
+ * Gets the RestorableMongodbCollectionsClient object to access its operations.
+ *
+ * @return the RestorableMongodbCollectionsClient object.
+ */
+ RestorableMongodbCollectionsClient getRestorableMongodbCollections();
+
+ /**
+ * Gets the RestorableMongodbResourcesClient object to access its operations.
+ *
+ * @return the RestorableMongodbResourcesClient object.
+ */
+ RestorableMongodbResourcesClient getRestorableMongodbResources();
+
+ /**
+ * Gets the CassandraClustersClient object to access its operations.
+ *
+ * @return the CassandraClustersClient object.
+ */
+ CassandraClustersClient getCassandraClusters();
+
+ /**
+ * Gets the CassandraDataCentersClient object to access its operations.
+ *
+ * @return the CassandraDataCentersClient object.
+ */
+ CassandraDataCentersClient getCassandraDataCenters();
+
+ /**
+ * Gets the ServicesClient object to access its operations.
+ *
+ * @return the ServicesClient object.
+ */
+ ServicesClient getServices();
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/DatabaseAccountRegionsClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/DatabaseAccountRegionsClient.java
new file mode 100644
index 0000000000000..527626327ad66
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/DatabaseAccountRegionsClient.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.MetricInner;
+
+/** An instance of this class provides access to all the operations defined in DatabaseAccountRegionsClient. */
+public interface DatabaseAccountRegionsClient {
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account and region.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 to a list metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(String resourceGroupName, String accountName, String region, String filter);
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account and region.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 response to a list metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName, String accountName, String region, String filter, Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/DatabaseAccountsClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/DatabaseAccountsClient.java
new file mode 100644
index 0000000000000..9e5315b45273c
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/DatabaseAccountsClient.java
@@ -0,0 +1,782 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.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.cosmos.generated.fluent.models.DatabaseAccountGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.DatabaseAccountListConnectionStringsResultInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.DatabaseAccountListKeysResultInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.DatabaseAccountListReadOnlyKeysResultInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.MetricDefinitionInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.MetricInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.UsageInner;
+import com.azure.resourcemanager.cosmos.generated.models.DatabaseAccountCreateUpdateParameters;
+import com.azure.resourcemanager.cosmos.generated.models.DatabaseAccountRegenerateKeyParameters;
+import com.azure.resourcemanager.cosmos.generated.models.DatabaseAccountUpdateParameters;
+import com.azure.resourcemanager.cosmos.generated.models.FailoverPolicies;
+import com.azure.resourcemanager.cosmos.generated.models.RegionForOnlineOffline;
+
+/** An instance of this class provides access to all the operations defined in DatabaseAccountsClient. */
+public interface DatabaseAccountsClient {
+ /**
+ * Retrieves the properties of an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAccountGetResultsInner getByResourceGroup(String resourceGroupName, String accountName);
+
+ /**
+ * Retrieves the properties of an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 an Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Updates the properties of an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param updateParameters The parameters to provide for the current database account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseAccountGetResultsInner> beginUpdate(
+ String resourceGroupName, String accountName, DatabaseAccountUpdateParameters updateParameters);
+
+ /**
+ * Updates the properties of an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param updateParameters The parameters to provide for the current database account.
+ * @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 an Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseAccountGetResultsInner> beginUpdate(
+ String resourceGroupName,
+ String accountName,
+ DatabaseAccountUpdateParameters updateParameters,
+ Context context);
+
+ /**
+ * Updates the properties of an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param updateParameters The parameters to provide for the current database account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAccountGetResultsInner update(
+ String resourceGroupName, String accountName, DatabaseAccountUpdateParameters updateParameters);
+
+ /**
+ * Updates the properties of an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param updateParameters The parameters to provide for the current database account.
+ * @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 an Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAccountGetResultsInner update(
+ String resourceGroupName,
+ String accountName,
+ DatabaseAccountUpdateParameters updateParameters,
+ Context context);
+
+ /**
+ * Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates
+ * on an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param createUpdateParameters The parameters to provide for the current database account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseAccountGetResultsInner> beginCreateOrUpdate(
+ String resourceGroupName, String accountName, DatabaseAccountCreateUpdateParameters createUpdateParameters);
+
+ /**
+ * Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates
+ * on an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param createUpdateParameters The parameters to provide for the current database account.
+ * @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 an Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseAccountGetResultsInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String accountName,
+ DatabaseAccountCreateUpdateParameters createUpdateParameters,
+ Context context);
+
+ /**
+ * Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates
+ * on an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param createUpdateParameters The parameters to provide for the current database account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAccountGetResultsInner createOrUpdate(
+ String resourceGroupName, String accountName, DatabaseAccountCreateUpdateParameters createUpdateParameters);
+
+ /**
+ * Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates
+ * on an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param createUpdateParameters The parameters to provide for the current database account.
+ * @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 an Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAccountGetResultsInner createOrUpdate(
+ String resourceGroupName,
+ String accountName,
+ DatabaseAccountCreateUpdateParameters createUpdateParameters,
+ Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 accountName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 accountName, Context context);
+
+ /**
+ * Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a
+ * write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values
+ * must be unique for each of the regions in which the database account exists.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param failoverParameters The new failover policies for the database account.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginFailoverPriorityChange(
+ String resourceGroupName, String accountName, FailoverPolicies failoverParameters);
+
+ /**
+ * Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a
+ * write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values
+ * must be unique for each of the regions in which the database account exists.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param failoverParameters The new failover policies for the database account.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginFailoverPriorityChange(
+ String resourceGroupName, String accountName, FailoverPolicies failoverParameters, Context context);
+
+ /**
+ * Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a
+ * write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values
+ * must be unique for each of the regions in which the database account exists.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param failoverParameters The new failover policies for the database account.
+ * @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 failoverPriorityChange(String resourceGroupName, String accountName, FailoverPolicies failoverParameters);
+
+ /**
+ * Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a
+ * write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values
+ * must be unique for each of the regions in which the database account exists.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param failoverParameters The new failover policies for the database account.
+ * @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 failoverPriorityChange(
+ String resourceGroupName, String accountName, FailoverPolicies failoverParameters, Context context);
+
+ /**
+ * Lists all the Azure Cosmos DB database accounts available under 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 the List operation response, that contains the database accounts and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all the Azure Cosmos DB database accounts available under 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 the List operation response, that contains the database accounts and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Lists all the Azure Cosmos DB database accounts available under the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 List operation response, that contains the database accounts and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists all the Azure Cosmos DB database accounts available under the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 List operation response, that contains the database accounts and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Lists the access keys for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 access keys for the given database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAccountListKeysResultInner listKeys(String resourceGroupName, String accountName);
+
+ /**
+ * Lists the access keys for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 access keys for the given database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listKeysWithResponse(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Lists the connection strings for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 connection strings for the given database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAccountListConnectionStringsResultInner listConnectionStrings(String resourceGroupName, String accountName);
+
+ /**
+ * Lists the connection strings for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 connection strings for the given database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listConnectionStringsWithResponse(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Offline the specified region for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param regionParameterForOffline Cosmos DB region to offline for the database account.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginOfflineRegion(
+ String resourceGroupName, String accountName, RegionForOnlineOffline regionParameterForOffline);
+
+ /**
+ * Offline the specified region for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param regionParameterForOffline Cosmos DB region to offline for the database account.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginOfflineRegion(
+ String resourceGroupName,
+ String accountName,
+ RegionForOnlineOffline regionParameterForOffline,
+ Context context);
+
+ /**
+ * Offline the specified region for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param regionParameterForOffline Cosmos DB region to offline for the database account.
+ * @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 offlineRegion(String resourceGroupName, String accountName, RegionForOnlineOffline regionParameterForOffline);
+
+ /**
+ * Offline the specified region for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param regionParameterForOffline Cosmos DB region to offline for the database account.
+ * @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 offlineRegion(
+ String resourceGroupName,
+ String accountName,
+ RegionForOnlineOffline regionParameterForOffline,
+ Context context);
+
+ /**
+ * Online the specified region for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param regionParameterForOnline Cosmos DB region to online for the database account.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginOnlineRegion(
+ String resourceGroupName, String accountName, RegionForOnlineOffline regionParameterForOnline);
+
+ /**
+ * Online the specified region for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param regionParameterForOnline Cosmos DB region to online for the database account.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginOnlineRegion(
+ String resourceGroupName, String accountName, RegionForOnlineOffline regionParameterForOnline, Context context);
+
+ /**
+ * Online the specified region for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param regionParameterForOnline Cosmos DB region to online for the database account.
+ * @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 onlineRegion(String resourceGroupName, String accountName, RegionForOnlineOffline regionParameterForOnline);
+
+ /**
+ * Online the specified region for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param regionParameterForOnline Cosmos DB region to online for the database account.
+ * @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 onlineRegion(
+ String resourceGroupName, String accountName, RegionForOnlineOffline regionParameterForOnline, Context context);
+
+ /**
+ * Lists the read-only access keys for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 read-only access keys for the given database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAccountListReadOnlyKeysResultInner getReadOnlyKeys(String resourceGroupName, String accountName);
+
+ /**
+ * Lists the read-only access keys for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 read-only access keys for the given database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getReadOnlyKeysWithResponse(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Lists the read-only access keys for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 read-only access keys for the given database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAccountListReadOnlyKeysResultInner listReadOnlyKeys(String resourceGroupName, String accountName);
+
+ /**
+ * Lists the read-only access keys for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 read-only access keys for the given database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listReadOnlyKeysWithResponse(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Regenerates an access key for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyToRegenerate The name of the key to regenerate.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRegenerateKey(
+ String resourceGroupName, String accountName, DatabaseAccountRegenerateKeyParameters keyToRegenerate);
+
+ /**
+ * Regenerates an access key for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyToRegenerate The name of the key to regenerate.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRegenerateKey(
+ String resourceGroupName,
+ String accountName,
+ DatabaseAccountRegenerateKeyParameters keyToRegenerate,
+ Context context);
+
+ /**
+ * Regenerates an access key for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyToRegenerate The name of the key to regenerate.
+ * @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 regenerateKey(
+ String resourceGroupName, String accountName, DatabaseAccountRegenerateKeyParameters keyToRegenerate);
+
+ /**
+ * Regenerates an access key for the specified Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param keyToRegenerate The name of the key to regenerate.
+ * @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 regenerateKey(
+ String resourceGroupName,
+ String accountName,
+ DatabaseAccountRegenerateKeyParameters keyToRegenerate,
+ Context context);
+
+ /**
+ * Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase
+ * letters, numbers, and the '-' character, and must be between 3 and 50 characters.
+ *
+ * @param accountName Cosmos DB database account name.
+ * @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 whether resource exists.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ boolean checkNameExists(String accountName);
+
+ /**
+ * Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase
+ * letters, numbers, and the '-' character, and must be between 3 and 50 characters.
+ *
+ * @param accountName Cosmos DB database account name.
+ * @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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkNameExistsWithResponse(String accountName, Context context);
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 to a list metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(String resourceGroupName, String accountName, String filter);
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 response to a list metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName, String accountName, String filter, Context context);
+
+ /**
+ * Retrieves the usages (most recent data) for the given database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 to a list usage request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listUsages(String resourceGroupName, String accountName);
+
+ /**
+ * Retrieves the usages (most recent data) for the given database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param filter An OData filter expression that describes a subset of usages to return. The supported parameter is
+ * name.value (name of the metric, can have an or of multiple names).
+ * @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 response to a list usage request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listUsages(String resourceGroupName, String accountName, String filter, Context context);
+
+ /**
+ * Retrieves metric definitions for the given database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 to a list metric definitions request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetricDefinitions(String resourceGroupName, String accountName);
+
+ /**
+ * Retrieves metric definitions for the given database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 response to a list metric definitions request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetricDefinitions(
+ String resourceGroupName, String accountName, Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/DatabasesClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/DatabasesClient.java
new file mode 100644
index 0000000000000..df5a79b206d25
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/DatabasesClient.java
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.MetricDefinitionInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.MetricInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.UsageInner;
+
+/** An instance of this class provides access to all the operations defined in DatabasesClient. */
+public interface DatabasesClient {
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account and database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 to a list metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName, String accountName, String databaseRid, String filter);
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account and database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The parameters that can be
+ * filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
+ * timeGrain. The supported operator is eq.
+ * @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 response to a list metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName, String accountName, String databaseRid, String filter, Context context);
+
+ /**
+ * Retrieves the usages (most recent data) for the given database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @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 to a list usage request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listUsages(String resourceGroupName, String accountName, String databaseRid);
+
+ /**
+ * Retrieves the usages (most recent data) for the given database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param filter An OData filter expression that describes a subset of usages to return. The supported parameter is
+ * name.value (name of the metric, can have an or of multiple names).
+ * @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 response to a list usage request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listUsages(
+ String resourceGroupName, String accountName, String databaseRid, String filter, Context context);
+
+ /**
+ * Retrieves metric definitions for the given database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @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 to a list metric definitions request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetricDefinitions(
+ String resourceGroupName, String accountName, String databaseRid);
+
+ /**
+ * Retrieves metric definitions for the given database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @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 response to a list metric definitions request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetricDefinitions(
+ String resourceGroupName, String accountName, String databaseRid, Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/GraphResourcesClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/GraphResourcesClient.java
new file mode 100644
index 0000000000000..8e1830db3be34
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/GraphResourcesClient.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.cosmos.generated.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.cosmos.generated.fluent.models.GraphResourceGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.models.GraphResourceCreateUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in GraphResourcesClient. */
+public interface GraphResourcesClient {
+ /**
+ * Lists the graphs under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 List operation response, that contains the Graph resource and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listGraphs(String resourceGroupName, String accountName);
+
+ /**
+ * Lists the graphs under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 List operation response, that contains the Graph resource and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listGraphs(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param graphName Cosmos DB graph resource name.
+ * @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 Graph resource under an existing Azure Cosmos DB database account with the provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GraphResourceGetResultsInner getGraph(String resourceGroupName, String accountName, String graphName);
+
+ /**
+ * Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param graphName Cosmos DB graph resource name.
+ * @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 Graph resource under an existing Azure Cosmos DB database account with the provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getGraphWithResponse(
+ String resourceGroupName, String accountName, String graphName, Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param graphName Cosmos DB graph resource name.
+ * @param createUpdateGraphParameters The parameters to provide for the current graph.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB Graph resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, GraphResourceGetResultsInner> beginCreateUpdateGraph(
+ String resourceGroupName,
+ String accountName,
+ String graphName,
+ GraphResourceCreateUpdateParameters createUpdateGraphParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param graphName Cosmos DB graph resource name.
+ * @param createUpdateGraphParameters The parameters to provide for the current graph.
+ * @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 an Azure Cosmos DB Graph resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, GraphResourceGetResultsInner> beginCreateUpdateGraph(
+ String resourceGroupName,
+ String accountName,
+ String graphName,
+ GraphResourceCreateUpdateParameters createUpdateGraphParameters,
+ Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param graphName Cosmos DB graph resource name.
+ * @param createUpdateGraphParameters The parameters to provide for the current graph.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB Graph resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GraphResourceGetResultsInner createUpdateGraph(
+ String resourceGroupName,
+ String accountName,
+ String graphName,
+ GraphResourceCreateUpdateParameters createUpdateGraphParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param graphName Cosmos DB graph resource name.
+ * @param createUpdateGraphParameters The parameters to provide for the current graph.
+ * @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 an Azure Cosmos DB Graph resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GraphResourceGetResultsInner createUpdateGraph(
+ String resourceGroupName,
+ String accountName,
+ String graphName,
+ GraphResourceCreateUpdateParameters createUpdateGraphParameters,
+ Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Graph Resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param graphName Cosmos DB graph resource name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteGraphResource(
+ String resourceGroupName, String accountName, String graphName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Graph Resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param graphName Cosmos DB graph resource name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteGraphResource(
+ String resourceGroupName, String accountName, String graphName, Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Graph Resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param graphName Cosmos DB graph resource name.
+ * @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 deleteGraphResource(String resourceGroupName, String accountName, String graphName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Graph Resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param graphName Cosmos DB graph resource name.
+ * @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 deleteGraphResource(String resourceGroupName, String accountName, String graphName, Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/GremlinResourcesClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/GremlinResourcesClient.java
new file mode 100644
index 0000000000000..c50aeb465de97
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/GremlinResourcesClient.java
@@ -0,0 +1,943 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.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.cosmos.generated.fluent.models.GremlinDatabaseGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.GremlinGraphGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.ThroughputSettingsGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.models.GremlinDatabaseCreateUpdateParameters;
+import com.azure.resourcemanager.cosmos.generated.models.GremlinGraphCreateUpdateParameters;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in GremlinResourcesClient. */
+public interface GremlinResourcesClient {
+ /**
+ * Lists the Gremlin databases under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 List operation response, that contains the Gremlin databases and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listGremlinDatabases(String resourceGroupName, String accountName);
+
+ /**
+ * Lists the Gremlin databases under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 List operation response, that contains the Gremlin databases and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listGremlinDatabases(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 Gremlin databases under an existing Azure Cosmos DB database account with the provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GremlinDatabaseGetResultsInner getGremlinDatabase(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 Gremlin databases under an existing Azure Cosmos DB database account with the provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getGremlinDatabaseWithResponse(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param createUpdateGremlinDatabaseParameters The parameters to provide for the current Gremlin 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 an Azure Cosmos DB Gremlin database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, GremlinDatabaseGetResultsInner>
+ beginCreateUpdateGremlinDatabase(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ GremlinDatabaseCreateUpdateParameters createUpdateGremlinDatabaseParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param createUpdateGremlinDatabaseParameters The parameters to provide for the current Gremlin 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 an Azure Cosmos DB Gremlin database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, GremlinDatabaseGetResultsInner>
+ beginCreateUpdateGremlinDatabase(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ GremlinDatabaseCreateUpdateParameters createUpdateGremlinDatabaseParameters,
+ Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param createUpdateGremlinDatabaseParameters The parameters to provide for the current Gremlin 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 an Azure Cosmos DB Gremlin database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GremlinDatabaseGetResultsInner createUpdateGremlinDatabase(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ GremlinDatabaseCreateUpdateParameters createUpdateGremlinDatabaseParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param createUpdateGremlinDatabaseParameters The parameters to provide for the current Gremlin 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 an Azure Cosmos DB Gremlin database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GremlinDatabaseGetResultsInner createUpdateGremlinDatabase(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ GremlinDatabaseCreateUpdateParameters createUpdateGremlinDatabaseParameters,
+ Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteGremlinDatabase(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteGremlinDatabase(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 deleteGremlinDatabase(String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 deleteGremlinDatabase(String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the
+ * provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the
+ * provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner getGremlinDatabaseThroughput(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the
+ * provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the
+ * provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getGremlinDatabaseThroughputWithResponse(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Gremlin
+ * 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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateGremlinDatabaseThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Gremlin
+ * 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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateGremlinDatabaseThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Gremlin
+ * 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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateGremlinDatabaseThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Gremlin database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Gremlin
+ * 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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateGremlinDatabaseThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateGremlinDatabaseToAutoscale(String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateGremlinDatabaseToAutoscale(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateGremlinDatabaseToAutoscale(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateGremlinDatabaseToAutoscale(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateGremlinDatabaseToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateGremlinDatabaseToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateGremlinDatabaseToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateGremlinDatabaseToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Lists the Gremlin graph under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 List operation response, that contains the graphs and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listGremlinGraphs(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Lists the Gremlin graph under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 List operation response, that contains the graphs and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listGremlinGraphs(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Gets the Gremlin graph under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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 Gremlin graph under an existing Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GremlinGraphGetResultsInner getGremlinGraph(
+ String resourceGroupName, String accountName, String databaseName, String graphName);
+
+ /**
+ * Gets the Gremlin graph under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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 Gremlin graph under an existing Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getGremlinGraphWithResponse(
+ String resourceGroupName, String accountName, String databaseName, String graphName, Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @param createUpdateGremlinGraphParameters The parameters to provide for the current Gremlin graph.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB Gremlin graph.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, GremlinGraphGetResultsInner> beginCreateUpdateGremlinGraph(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String graphName,
+ GremlinGraphCreateUpdateParameters createUpdateGremlinGraphParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @param createUpdateGremlinGraphParameters The parameters to provide for the current Gremlin graph.
+ * @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 an Azure Cosmos DB Gremlin graph.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, GremlinGraphGetResultsInner> beginCreateUpdateGremlinGraph(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String graphName,
+ GremlinGraphCreateUpdateParameters createUpdateGremlinGraphParameters,
+ Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @param createUpdateGremlinGraphParameters The parameters to provide for the current Gremlin graph.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB Gremlin graph.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GremlinGraphGetResultsInner createUpdateGremlinGraph(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String graphName,
+ GremlinGraphCreateUpdateParameters createUpdateGremlinGraphParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @param createUpdateGremlinGraphParameters The parameters to provide for the current Gremlin graph.
+ * @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 an Azure Cosmos DB Gremlin graph.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GremlinGraphGetResultsInner createUpdateGremlinGraph(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String graphName,
+ GremlinGraphCreateUpdateParameters createUpdateGremlinGraphParameters,
+ Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteGremlinGraph(
+ String resourceGroupName, String accountName, String databaseName, String graphName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteGremlinGraph(
+ String resourceGroupName, String accountName, String databaseName, String graphName, Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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 deleteGremlinGraph(String resourceGroupName, String accountName, String databaseName, String graphName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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 deleteGremlinGraph(
+ String resourceGroupName, String accountName, String databaseName, String graphName, Context context);
+
+ /**
+ * Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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 Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner getGremlinGraphThroughput(
+ String resourceGroupName, String accountName, String databaseName, String graphName);
+
+ /**
+ * Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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 Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getGremlinGraphThroughputWithResponse(
+ String resourceGroupName, String accountName, String databaseName, String graphName, Context context);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Gremlin graph.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateGremlinGraphThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String graphName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Gremlin graph.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateGremlinGraphThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String graphName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Gremlin graph.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateGremlinGraphThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String graphName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of an Azure Cosmos DB Gremlin graph.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Gremlin graph.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateGremlinGraphThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String graphName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateGremlinGraphToAutoscale(
+ String resourceGroupName, String accountName, String databaseName, String graphName);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateGremlinGraphToAutoscale(
+ String resourceGroupName, String accountName, String databaseName, String graphName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateGremlinGraphToAutoscale(
+ String resourceGroupName, String accountName, String databaseName, String graphName);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateGremlinGraphToAutoscale(
+ String resourceGroupName, String accountName, String databaseName, String graphName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateGremlinGraphToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName, String graphName);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateGremlinGraphToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName, String graphName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateGremlinGraphToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName, String graphName);
+
+ /**
+ * Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param graphName Cosmos DB graph name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateGremlinGraphToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName, String graphName, Context context);
+}
diff --git a/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/MongoDBResourcesClient.java b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/MongoDBResourcesClient.java
new file mode 100644
index 0000000000000..c28f2b5ef1f99
--- /dev/null
+++ b/sdk/cosmos/azure-resourcemanager-cosmos-generated/src/main/java/com/azure/resourcemanager/cosmos/generated/fluent/MongoDBResourcesClient.java
@@ -0,0 +1,954 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cosmos.generated.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.cosmos.generated.fluent.models.MongoDBCollectionGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.MongoDBDatabaseGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.fluent.models.ThroughputSettingsGetResultsInner;
+import com.azure.resourcemanager.cosmos.generated.models.MongoDBCollectionCreateUpdateParameters;
+import com.azure.resourcemanager.cosmos.generated.models.MongoDBDatabaseCreateUpdateParameters;
+import com.azure.resourcemanager.cosmos.generated.models.ThroughputSettingsUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in MongoDBResourcesClient. */
+public interface MongoDBResourcesClient {
+ /**
+ * Lists the MongoDB databases under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 List operation response, that contains the MongoDB databases and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMongoDBDatabases(String resourceGroupName, String accountName);
+
+ /**
+ * Lists the MongoDB databases under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @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 List operation response, that contains the MongoDB databases and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMongoDBDatabases(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 MongoDB databases under an existing Azure Cosmos DB database account with the provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MongoDBDatabaseGetResultsInner getMongoDBDatabase(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 MongoDB databases under an existing Azure Cosmos DB database account with the provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getMongoDBDatabaseWithResponse(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Create or updates Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param createUpdateMongoDBDatabaseParameters The parameters to provide for the current MongoDB 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 an Azure Cosmos DB MongoDB database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MongoDBDatabaseGetResultsInner>
+ beginCreateUpdateMongoDBDatabase(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ MongoDBDatabaseCreateUpdateParameters createUpdateMongoDBDatabaseParameters);
+
+ /**
+ * Create or updates Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param createUpdateMongoDBDatabaseParameters The parameters to provide for the current MongoDB 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 an Azure Cosmos DB MongoDB database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MongoDBDatabaseGetResultsInner>
+ beginCreateUpdateMongoDBDatabase(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ MongoDBDatabaseCreateUpdateParameters createUpdateMongoDBDatabaseParameters,
+ Context context);
+
+ /**
+ * Create or updates Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param createUpdateMongoDBDatabaseParameters The parameters to provide for the current MongoDB 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 an Azure Cosmos DB MongoDB database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MongoDBDatabaseGetResultsInner createUpdateMongoDBDatabase(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ MongoDBDatabaseCreateUpdateParameters createUpdateMongoDBDatabaseParameters);
+
+ /**
+ * Create or updates Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param createUpdateMongoDBDatabaseParameters The parameters to provide for the current MongoDB 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 an Azure Cosmos DB MongoDB database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MongoDBDatabaseGetResultsInner createUpdateMongoDBDatabase(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ MongoDBDatabaseCreateUpdateParameters createUpdateMongoDBDatabaseParameters,
+ Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteMongoDBDatabase(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteMongoDBDatabase(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 deleteMongoDBDatabase(String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 deleteMongoDBDatabase(String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the
+ * provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the
+ * provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner getMongoDBDatabaseThroughput(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the
+ * provided name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the
+ * provided name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getMongoDBDatabaseThroughputWithResponse(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Update RUs per second of the an Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current MongoDB
+ * 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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateMongoDBDatabaseThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of the an Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current MongoDB
+ * 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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginUpdateMongoDBDatabaseThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Update RUs per second of the an Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current MongoDB
+ * 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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateMongoDBDatabaseThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters);
+
+ /**
+ * Update RUs per second of the an Azure Cosmos DB MongoDB database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param updateThroughputParameters The RUs per second of the parameters to provide for the current MongoDB
+ * 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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner updateMongoDBDatabaseThroughput(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ ThroughputSettingsUpdateParameters updateThroughputParameters,
+ Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateMongoDBDatabaseToAutoscale(String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateMongoDBDatabaseToAutoscale(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateMongoDBDatabaseToAutoscale(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateMongoDBDatabaseToAutoscale(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateMongoDBDatabaseToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ThroughputSettingsGetResultsInner>
+ beginMigrateMongoDBDatabaseToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateMongoDBDatabaseToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 an Azure Cosmos DB resource throughput.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ThroughputSettingsGetResultsInner migrateMongoDBDatabaseToManualThroughput(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Lists the MongoDB collection under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 List operation response, that contains the MongoDB collections and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMongoDBCollections(
+ String resourceGroupName, String accountName, String databaseName);
+
+ /**
+ * Lists the MongoDB collection under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @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 List operation response, that contains the MongoDB collections and their properties.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMongoDBCollections(
+ String resourceGroupName, String accountName, String databaseName, Context context);
+
+ /**
+ * Gets the MongoDB collection under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param collectionName Cosmos DB collection name.
+ * @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 MongoDB collection under an existing Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MongoDBCollectionGetResultsInner getMongoDBCollection(
+ String resourceGroupName, String accountName, String databaseName, String collectionName);
+
+ /**
+ * Gets the MongoDB collection under an existing Azure Cosmos DB database account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param collectionName Cosmos DB collection name.
+ * @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 MongoDB collection under an existing Azure Cosmos DB database account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getMongoDBCollectionWithResponse(
+ String resourceGroupName, String accountName, String databaseName, String collectionName, Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB MongoDB Collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param collectionName Cosmos DB collection name.
+ * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB Collection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB MongoDB collection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MongoDBCollectionGetResultsInner>
+ beginCreateUpdateMongoDBCollection(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String collectionName,
+ MongoDBCollectionCreateUpdateParameters createUpdateMongoDBCollectionParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB MongoDB Collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param collectionName Cosmos DB collection name.
+ * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB Collection.
+ * @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 an Azure Cosmos DB MongoDB collection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MongoDBCollectionGetResultsInner>
+ beginCreateUpdateMongoDBCollection(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String collectionName,
+ MongoDBCollectionCreateUpdateParameters createUpdateMongoDBCollectionParameters,
+ Context context);
+
+ /**
+ * Create or update an Azure Cosmos DB MongoDB Collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param collectionName Cosmos DB collection name.
+ * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB Collection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Cosmos DB MongoDB collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MongoDBCollectionGetResultsInner createUpdateMongoDBCollection(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String collectionName,
+ MongoDBCollectionCreateUpdateParameters createUpdateMongoDBCollectionParameters);
+
+ /**
+ * Create or update an Azure Cosmos DB MongoDB Collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param collectionName Cosmos DB collection name.
+ * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB Collection.
+ * @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 an Azure Cosmos DB MongoDB collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MongoDBCollectionGetResultsInner createUpdateMongoDBCollection(
+ String resourceGroupName,
+ String accountName,
+ String databaseName,
+ String collectionName,
+ MongoDBCollectionCreateUpdateParameters createUpdateMongoDBCollectionParameters,
+ Context context);
+
+ /**
+ * Deletes an existing Azure Cosmos DB MongoDB Collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param collectionName Cosmos DB collection name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDeleteMongoDBCollection(
+ String resourceGroupName, String accountName, String databaseName, String collectionName);
+
+ /**
+ * Deletes an existing Azure Cosmos DB MongoDB Collection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseName Cosmos DB database name.
+ * @param collectionName Cosmos DB collection name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller