diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 9099899ed75d0..e646781de3316 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -331,6 +331,7 @@ com.azure.resourcemanager:azure-resourcemanager-desktopvirtualization;1.0.0-beta
com.azure.resourcemanager:azure-resourcemanager-loadtestservice;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-automanage;1.0.0-beta.1;1.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-edgeorder;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-sql-generated;1.0.0-beta.1;1.0.0-beta.1
com.azure.tools:azure-sdk-archetype;1.0.0;1.0.0
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
diff --git a/pom.xml b/pom.xml
index aab77f33ebeb9..12ba9733feb68 100644
--- a/pom.xml
+++ b/pom.xml
@@ -828,6 +828,7 @@
sdk/servicefabric
sdk/signalr
sdk/spring
+ sdk/sql
sdk/sqlvirtualmachine
sdk/storage
sdk/storagecache
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/CHANGELOG.md b/sdk/sql/azure-resourcemanager-sql-generated/CHANGELOG.md
new file mode 100644
index 0000000000000..c11450a3b8f5f
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2022-01-04)
+
+- Azure Resource Manager Sql client library for Java. This package contains Microsoft Azure SDK for Sql Management SDK. The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete databases. Package tag package-composite-v5. 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/sql/azure-resourcemanager-sql-generated/README.md b/sdk/sql/azure-resourcemanager-sql-generated/README.md
new file mode 100644
index 0000000000000..9588666af5cc9
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager Sql client library for Java
+
+Azure Resource Manager Sql client library for Java.
+
+This package contains Microsoft Azure SDK for Sql Management SDK. The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete databases. Package tag package-composite-v5. 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-sql-generated;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-sql-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();
+SqlManager manager = SqlManager
+ .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/sql/azure-resourcemanager-sql-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/sql/azure-resourcemanager-sql-generated/SAMPLE.md b/sdk/sql/azure-resourcemanager-sql-generated/SAMPLE.md
new file mode 100644
index 0000000000000..fc6efef251227
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/SAMPLE.md
@@ -0,0 +1,14345 @@
+# Code snippets and samples
+
+
+## BackupShortTermRetentionPolicies
+
+- [CreateOrUpdate](#backupshorttermretentionpolicies_createorupdate)
+- [Get](#backupshorttermretentionpolicies_get)
+- [ListByDatabase](#backupshorttermretentionpolicies_listbydatabase)
+- [Update](#backupshorttermretentionpolicies_update)
+
+## Capabilities
+
+- [ListByLocation](#capabilities_listbylocation)
+
+## DataMaskingPolicies
+
+- [CreateOrUpdate](#datamaskingpolicies_createorupdate)
+- [Get](#datamaskingpolicies_get)
+
+## DataMaskingRules
+
+- [CreateOrUpdate](#datamaskingrules_createorupdate)
+- [ListByDatabase](#datamaskingrules_listbydatabase)
+
+## DataWarehouseUserActivitiesOperation
+
+- [Get](#datawarehouseuseractivitiesoperation_get)
+- [ListByDatabase](#datawarehouseuseractivitiesoperation_listbydatabase)
+
+## DatabaseAdvisors
+
+- [Get](#databaseadvisors_get)
+- [ListByDatabase](#databaseadvisors_listbydatabase)
+- [Update](#databaseadvisors_update)
+
+## DatabaseAutomaticTuning
+
+- [Get](#databaseautomatictuning_get)
+- [Update](#databaseautomatictuning_update)
+
+## DatabaseBlobAuditingPolicies
+
+- [CreateOrUpdate](#databaseblobauditingpolicies_createorupdate)
+- [Get](#databaseblobauditingpolicies_get)
+- [ListByDatabase](#databaseblobauditingpolicies_listbydatabase)
+
+## DatabaseColumns
+
+- [Get](#databasecolumns_get)
+- [ListByDatabase](#databasecolumns_listbydatabase)
+- [ListByTable](#databasecolumns_listbytable)
+
+## DatabaseExtensionsOperation
+
+- [CreateOrUpdate](#databaseextensionsoperation_createorupdate)
+- [Get](#databaseextensionsoperation_get)
+- [ListByDatabase](#databaseextensionsoperation_listbydatabase)
+
+## DatabaseOperations
+
+- [Cancel](#databaseoperations_cancel)
+- [ListByDatabase](#databaseoperations_listbydatabase)
+
+## DatabaseRecommendedActions
+
+- [Get](#databaserecommendedactions_get)
+- [ListByDatabaseAdvisor](#databaserecommendedactions_listbydatabaseadvisor)
+- [Update](#databaserecommendedactions_update)
+
+## DatabaseSchemas
+
+- [Get](#databaseschemas_get)
+- [ListByDatabase](#databaseschemas_listbydatabase)
+
+## DatabaseSecurityAlertPolicies
+
+- [CreateOrUpdate](#databasesecurityalertpolicies_createorupdate)
+- [Get](#databasesecurityalertpolicies_get)
+- [ListByDatabase](#databasesecurityalertpolicies_listbydatabase)
+
+## DatabaseTables
+
+- [Get](#databasetables_get)
+- [ListBySchema](#databasetables_listbyschema)
+
+## DatabaseUsages
+
+- [ListByDatabase](#databaseusages_listbydatabase)
+
+## DatabaseVulnerabilityAssessmentRuleBaselines
+
+- [CreateOrUpdate](#databasevulnerabilityassessmentrulebaselines_createorupdate)
+- [Delete](#databasevulnerabilityassessmentrulebaselines_delete)
+- [Get](#databasevulnerabilityassessmentrulebaselines_get)
+
+## DatabaseVulnerabilityAssessmentScans
+
+- [Export](#databasevulnerabilityassessmentscans_export)
+- [Get](#databasevulnerabilityassessmentscans_get)
+- [InitiateScan](#databasevulnerabilityassessmentscans_initiatescan)
+- [ListByDatabase](#databasevulnerabilityassessmentscans_listbydatabase)
+
+## DatabaseVulnerabilityAssessments
+
+- [CreateOrUpdate](#databasevulnerabilityassessments_createorupdate)
+- [Delete](#databasevulnerabilityassessments_delete)
+- [Get](#databasevulnerabilityassessments_get)
+- [ListByDatabase](#databasevulnerabilityassessments_listbydatabase)
+
+## Databases
+
+- [CreateOrUpdate](#databases_createorupdate)
+- [Delete](#databases_delete)
+- [Export](#databases_export)
+- [Failover](#databases_failover)
+- [Get](#databases_get)
+- [ImportMethod](#databases_importmethod)
+- [ListByElasticPool](#databases_listbyelasticpool)
+- [ListByServer](#databases_listbyserver)
+- [ListInaccessibleByServer](#databases_listinaccessiblebyserver)
+- [ListMetricDefinitions](#databases_listmetricdefinitions)
+- [ListMetrics](#databases_listmetrics)
+- [Pause](#databases_pause)
+- [Rename](#databases_rename)
+- [Resume](#databases_resume)
+- [Update](#databases_update)
+- [UpgradeDataWarehouse](#databases_upgradedatawarehouse)
+
+## DeletedServers
+
+- [Get](#deletedservers_get)
+- [List](#deletedservers_list)
+- [ListByLocation](#deletedservers_listbylocation)
+- [Recover](#deletedservers_recover)
+
+## ElasticPoolActivities
+
+- [ListByElasticPool](#elasticpoolactivities_listbyelasticpool)
+
+## ElasticPoolDatabaseActivities
+
+- [ListByElasticPool](#elasticpooldatabaseactivities_listbyelasticpool)
+
+## ElasticPoolOperations
+
+- [Cancel](#elasticpooloperations_cancel)
+- [ListByElasticPool](#elasticpooloperations_listbyelasticpool)
+
+## ElasticPools
+
+- [CreateOrUpdate](#elasticpools_createorupdate)
+- [Delete](#elasticpools_delete)
+- [Failover](#elasticpools_failover)
+- [Get](#elasticpools_get)
+- [ListByServer](#elasticpools_listbyserver)
+- [ListMetricDefinitions](#elasticpools_listmetricdefinitions)
+- [ListMetrics](#elasticpools_listmetrics)
+- [Update](#elasticpools_update)
+
+## EncryptionProtectors
+
+- [CreateOrUpdate](#encryptionprotectors_createorupdate)
+- [Get](#encryptionprotectors_get)
+- [ListByServer](#encryptionprotectors_listbyserver)
+- [Revalidate](#encryptionprotectors_revalidate)
+
+## ExtendedDatabaseBlobAuditingPolicies
+
+- [CreateOrUpdate](#extendeddatabaseblobauditingpolicies_createorupdate)
+- [Get](#extendeddatabaseblobauditingpolicies_get)
+- [ListByDatabase](#extendeddatabaseblobauditingpolicies_listbydatabase)
+
+## ExtendedServerBlobAuditingPolicies
+
+- [CreateOrUpdate](#extendedserverblobauditingpolicies_createorupdate)
+- [Get](#extendedserverblobauditingpolicies_get)
+- [ListByServer](#extendedserverblobauditingpolicies_listbyserver)
+
+## FailoverGroups
+
+- [CreateOrUpdate](#failovergroups_createorupdate)
+- [Delete](#failovergroups_delete)
+- [Failover](#failovergroups_failover)
+- [ForceFailoverAllowDataLoss](#failovergroups_forcefailoverallowdataloss)
+- [Get](#failovergroups_get)
+- [ListByServer](#failovergroups_listbyserver)
+- [Update](#failovergroups_update)
+
+## FirewallRules
+
+- [CreateOrUpdate](#firewallrules_createorupdate)
+- [Delete](#firewallrules_delete)
+- [Get](#firewallrules_get)
+- [ListByServer](#firewallrules_listbyserver)
+- [Replace](#firewallrules_replace)
+
+## GeoBackupPolicies
+
+- [CreateOrUpdate](#geobackuppolicies_createorupdate)
+- [Get](#geobackuppolicies_get)
+- [ListByDatabase](#geobackuppolicies_listbydatabase)
+
+## InstanceFailoverGroups
+
+- [CreateOrUpdate](#instancefailovergroups_createorupdate)
+- [Delete](#instancefailovergroups_delete)
+- [Failover](#instancefailovergroups_failover)
+- [ForceFailoverAllowDataLoss](#instancefailovergroups_forcefailoverallowdataloss)
+- [Get](#instancefailovergroups_get)
+- [ListByLocation](#instancefailovergroups_listbylocation)
+
+## InstancePools
+
+- [CreateOrUpdate](#instancepools_createorupdate)
+- [Delete](#instancepools_delete)
+- [GetByResourceGroup](#instancepools_getbyresourcegroup)
+- [List](#instancepools_list)
+- [ListByResourceGroup](#instancepools_listbyresourcegroup)
+- [Update](#instancepools_update)
+
+## JobAgents
+
+- [CreateOrUpdate](#jobagents_createorupdate)
+- [Delete](#jobagents_delete)
+- [Get](#jobagents_get)
+- [ListByServer](#jobagents_listbyserver)
+- [Update](#jobagents_update)
+
+## JobCredentials
+
+- [CreateOrUpdate](#jobcredentials_createorupdate)
+- [Delete](#jobcredentials_delete)
+- [Get](#jobcredentials_get)
+- [ListByAgent](#jobcredentials_listbyagent)
+
+## JobExecutions
+
+- [Cancel](#jobexecutions_cancel)
+- [Create](#jobexecutions_create)
+- [CreateOrUpdate](#jobexecutions_createorupdate)
+- [Get](#jobexecutions_get)
+- [ListByAgent](#jobexecutions_listbyagent)
+- [ListByJob](#jobexecutions_listbyjob)
+
+## JobStepExecutions
+
+- [Get](#jobstepexecutions_get)
+- [ListByJobExecution](#jobstepexecutions_listbyjobexecution)
+
+## JobSteps
+
+- [CreateOrUpdate](#jobsteps_createorupdate)
+- [Delete](#jobsteps_delete)
+- [Get](#jobsteps_get)
+- [GetByVersion](#jobsteps_getbyversion)
+- [ListByJob](#jobsteps_listbyjob)
+- [ListByVersion](#jobsteps_listbyversion)
+
+## JobTargetExecutions
+
+- [Get](#jobtargetexecutions_get)
+- [ListByJobExecution](#jobtargetexecutions_listbyjobexecution)
+- [ListByStep](#jobtargetexecutions_listbystep)
+
+## JobTargetGroups
+
+- [CreateOrUpdate](#jobtargetgroups_createorupdate)
+- [Delete](#jobtargetgroups_delete)
+- [Get](#jobtargetgroups_get)
+- [ListByAgent](#jobtargetgroups_listbyagent)
+
+## JobVersions
+
+- [Get](#jobversions_get)
+- [ListByJob](#jobversions_listbyjob)
+
+## Jobs
+
+- [CreateOrUpdate](#jobs_createorupdate)
+- [Delete](#jobs_delete)
+- [Get](#jobs_get)
+- [ListByAgent](#jobs_listbyagent)
+
+## LedgerDigestUploadsOperation
+
+- [CreateOrUpdate](#ledgerdigestuploadsoperation_createorupdate)
+- [Disable](#ledgerdigestuploadsoperation_disable)
+- [Get](#ledgerdigestuploadsoperation_get)
+- [ListByDatabase](#ledgerdigestuploadsoperation_listbydatabase)
+
+## LongTermRetentionBackups
+
+- [Copy](#longtermretentionbackups_copy)
+- [CopyByResourceGroup](#longtermretentionbackups_copybyresourcegroup)
+- [Delete](#longtermretentionbackups_delete)
+- [DeleteByResourceGroup](#longtermretentionbackups_deletebyresourcegroup)
+- [Get](#longtermretentionbackups_get)
+- [GetByResourceGroup](#longtermretentionbackups_getbyresourcegroup)
+- [ListByDatabase](#longtermretentionbackups_listbydatabase)
+- [ListByLocation](#longtermretentionbackups_listbylocation)
+- [ListByResourceGroupDatabase](#longtermretentionbackups_listbyresourcegroupdatabase)
+- [ListByResourceGroupLocation](#longtermretentionbackups_listbyresourcegrouplocation)
+- [ListByResourceGroupServer](#longtermretentionbackups_listbyresourcegroupserver)
+- [ListByServer](#longtermretentionbackups_listbyserver)
+- [Update](#longtermretentionbackups_update)
+- [UpdateByResourceGroup](#longtermretentionbackups_updatebyresourcegroup)
+
+## LongTermRetentionManagedInstanceBackups
+
+- [Delete](#longtermretentionmanagedinstancebackups_delete)
+- [DeleteByResourceGroup](#longtermretentionmanagedinstancebackups_deletebyresourcegroup)
+- [Get](#longtermretentionmanagedinstancebackups_get)
+- [GetByResourceGroup](#longtermretentionmanagedinstancebackups_getbyresourcegroup)
+- [ListByDatabase](#longtermretentionmanagedinstancebackups_listbydatabase)
+- [ListByInstance](#longtermretentionmanagedinstancebackups_listbyinstance)
+- [ListByLocation](#longtermretentionmanagedinstancebackups_listbylocation)
+- [ListByResourceGroupDatabase](#longtermretentionmanagedinstancebackups_listbyresourcegroupdatabase)
+- [ListByResourceGroupInstance](#longtermretentionmanagedinstancebackups_listbyresourcegroupinstance)
+- [ListByResourceGroupLocation](#longtermretentionmanagedinstancebackups_listbyresourcegrouplocation)
+
+## LongTermRetentionPolicies
+
+- [CreateOrUpdate](#longtermretentionpolicies_createorupdate)
+- [Get](#longtermretentionpolicies_get)
+- [ListByDatabase](#longtermretentionpolicies_listbydatabase)
+
+## MaintenanceWindowOptionsOperation
+
+- [Get](#maintenancewindowoptionsoperation_get)
+
+## MaintenanceWindowsOperation
+
+- [CreateOrUpdate](#maintenancewindowsoperation_createorupdate)
+- [Get](#maintenancewindowsoperation_get)
+
+## ManagedBackupShortTermRetentionPolicies
+
+- [CreateOrUpdate](#managedbackupshorttermretentionpolicies_createorupdate)
+- [Get](#managedbackupshorttermretentionpolicies_get)
+- [ListByDatabase](#managedbackupshorttermretentionpolicies_listbydatabase)
+- [Update](#managedbackupshorttermretentionpolicies_update)
+
+## ManagedDatabaseColumns
+
+- [Get](#manageddatabasecolumns_get)
+- [ListByDatabase](#manageddatabasecolumns_listbydatabase)
+- [ListByTable](#manageddatabasecolumns_listbytable)
+
+## ManagedDatabaseQueries
+
+- [Get](#manageddatabasequeries_get)
+- [ListByQuery](#manageddatabasequeries_listbyquery)
+
+## ManagedDatabaseRecommendedSensitivityLabels
+
+- [Update](#manageddatabaserecommendedsensitivitylabels_update)
+
+## ManagedDatabaseRestoreDetails
+
+- [Get](#manageddatabaserestoredetails_get)
+
+## ManagedDatabaseSchemas
+
+- [Get](#manageddatabaseschemas_get)
+- [ListByDatabase](#manageddatabaseschemas_listbydatabase)
+
+## ManagedDatabaseSecurityAlertPolicies
+
+- [CreateOrUpdate](#manageddatabasesecurityalertpolicies_createorupdate)
+- [Get](#manageddatabasesecurityalertpolicies_get)
+- [ListByDatabase](#manageddatabasesecurityalertpolicies_listbydatabase)
+
+## ManagedDatabaseSecurityEvents
+
+- [ListByDatabase](#manageddatabasesecurityevents_listbydatabase)
+
+## ManagedDatabaseSensitivityLabels
+
+- [CreateOrUpdate](#manageddatabasesensitivitylabels_createorupdate)
+- [Delete](#manageddatabasesensitivitylabels_delete)
+- [DisableRecommendation](#manageddatabasesensitivitylabels_disablerecommendation)
+- [EnableRecommendation](#manageddatabasesensitivitylabels_enablerecommendation)
+- [Get](#manageddatabasesensitivitylabels_get)
+- [ListCurrentByDatabase](#manageddatabasesensitivitylabels_listcurrentbydatabase)
+- [ListRecommendedByDatabase](#manageddatabasesensitivitylabels_listrecommendedbydatabase)
+- [Update](#manageddatabasesensitivitylabels_update)
+
+## ManagedDatabaseTables
+
+- [Get](#manageddatabasetables_get)
+- [ListBySchema](#manageddatabasetables_listbyschema)
+
+## ManagedDatabaseTransparentDataEncryption
+
+- [CreateOrUpdate](#manageddatabasetransparentdataencryption_createorupdate)
+- [Get](#manageddatabasetransparentdataencryption_get)
+- [ListByDatabase](#manageddatabasetransparentdataencryption_listbydatabase)
+
+## ManagedDatabaseVulnerabilityAssessmentRuleBaselines
+
+- [CreateOrUpdate](#manageddatabasevulnerabilityassessmentrulebaselines_createorupdate)
+- [Delete](#manageddatabasevulnerabilityassessmentrulebaselines_delete)
+- [Get](#manageddatabasevulnerabilityassessmentrulebaselines_get)
+
+## ManagedDatabaseVulnerabilityAssessmentScans
+
+- [Export](#manageddatabasevulnerabilityassessmentscans_export)
+- [Get](#manageddatabasevulnerabilityassessmentscans_get)
+- [InitiateScan](#manageddatabasevulnerabilityassessmentscans_initiatescan)
+- [ListByDatabase](#manageddatabasevulnerabilityassessmentscans_listbydatabase)
+
+## ManagedDatabaseVulnerabilityAssessments
+
+- [CreateOrUpdate](#manageddatabasevulnerabilityassessments_createorupdate)
+- [Delete](#manageddatabasevulnerabilityassessments_delete)
+- [Get](#manageddatabasevulnerabilityassessments_get)
+- [ListByDatabase](#manageddatabasevulnerabilityassessments_listbydatabase)
+
+## ManagedDatabases
+
+- [CompleteRestore](#manageddatabases_completerestore)
+- [CreateOrUpdate](#manageddatabases_createorupdate)
+- [Delete](#manageddatabases_delete)
+- [Get](#manageddatabases_get)
+- [ListByInstance](#manageddatabases_listbyinstance)
+- [ListInaccessibleByInstance](#manageddatabases_listinaccessiblebyinstance)
+- [Update](#manageddatabases_update)
+
+## ManagedInstanceAdministrators
+
+- [CreateOrUpdate](#managedinstanceadministrators_createorupdate)
+- [Delete](#managedinstanceadministrators_delete)
+- [Get](#managedinstanceadministrators_get)
+- [ListByInstance](#managedinstanceadministrators_listbyinstance)
+
+## ManagedInstanceAzureADOnlyAuthentications
+
+- [CreateOrUpdate](#managedinstanceazureadonlyauthentications_createorupdate)
+- [Delete](#managedinstanceazureadonlyauthentications_delete)
+- [Get](#managedinstanceazureadonlyauthentications_get)
+- [ListByInstance](#managedinstanceazureadonlyauthentications_listbyinstance)
+
+## ManagedInstanceEncryptionProtectors
+
+- [CreateOrUpdate](#managedinstanceencryptionprotectors_createorupdate)
+- [Get](#managedinstanceencryptionprotectors_get)
+- [ListByInstance](#managedinstanceencryptionprotectors_listbyinstance)
+- [Revalidate](#managedinstanceencryptionprotectors_revalidate)
+
+## ManagedInstanceKeys
+
+- [CreateOrUpdate](#managedinstancekeys_createorupdate)
+- [Delete](#managedinstancekeys_delete)
+- [Get](#managedinstancekeys_get)
+- [ListByInstance](#managedinstancekeys_listbyinstance)
+
+## ManagedInstanceLongTermRetentionPolicies
+
+- [CreateOrUpdate](#managedinstancelongtermretentionpolicies_createorupdate)
+- [Get](#managedinstancelongtermretentionpolicies_get)
+- [ListByDatabase](#managedinstancelongtermretentionpolicies_listbydatabase)
+
+## ManagedInstanceOperations
+
+- [Cancel](#managedinstanceoperations_cancel)
+- [Get](#managedinstanceoperations_get)
+- [ListByManagedInstance](#managedinstanceoperations_listbymanagedinstance)
+
+## ManagedInstancePrivateEndpointConnections
+
+- [CreateOrUpdate](#managedinstanceprivateendpointconnections_createorupdate)
+- [Delete](#managedinstanceprivateendpointconnections_delete)
+- [Get](#managedinstanceprivateendpointconnections_get)
+- [ListByManagedInstance](#managedinstanceprivateendpointconnections_listbymanagedinstance)
+
+## ManagedInstancePrivateLinkResources
+
+- [Get](#managedinstanceprivatelinkresources_get)
+- [ListByManagedInstance](#managedinstanceprivatelinkresources_listbymanagedinstance)
+
+## ManagedInstanceTdeCertificates
+
+- [Create](#managedinstancetdecertificates_create)
+
+## ManagedInstanceVulnerabilityAssessments
+
+- [CreateOrUpdate](#managedinstancevulnerabilityassessments_createorupdate)
+- [Delete](#managedinstancevulnerabilityassessments_delete)
+- [Get](#managedinstancevulnerabilityassessments_get)
+- [ListByInstance](#managedinstancevulnerabilityassessments_listbyinstance)
+
+## ManagedInstances
+
+- [CreateOrUpdate](#managedinstances_createorupdate)
+- [Delete](#managedinstances_delete)
+- [Failover](#managedinstances_failover)
+- [GetByResourceGroup](#managedinstances_getbyresourcegroup)
+- [List](#managedinstances_list)
+- [ListByInstancePool](#managedinstances_listbyinstancepool)
+- [ListByManagedInstance](#managedinstances_listbymanagedinstance)
+- [ListByResourceGroup](#managedinstances_listbyresourcegroup)
+- [Update](#managedinstances_update)
+
+## ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies
+
+- [CreateOrUpdate](#managedrestorabledroppeddatabasebackupshorttermretentionpolicies_createorupdate)
+- [Get](#managedrestorabledroppeddatabasebackupshorttermretentionpolicies_get)
+- [ListByRestorableDroppedDatabase](#managedrestorabledroppeddatabasebackupshorttermretentionpolicies_listbyrestorabledroppeddatabase)
+- [Update](#managedrestorabledroppeddatabasebackupshorttermretentionpolicies_update)
+
+## ManagedServerSecurityAlertPolicies
+
+- [CreateOrUpdate](#managedserversecurityalertpolicies_createorupdate)
+- [Get](#managedserversecurityalertpolicies_get)
+- [ListByInstance](#managedserversecurityalertpolicies_listbyinstance)
+
+## OutboundFirewallRules
+
+- [CreateOrUpdate](#outboundfirewallrules_createorupdate)
+- [Delete](#outboundfirewallrules_delete)
+- [Get](#outboundfirewallrules_get)
+- [ListByServer](#outboundfirewallrules_listbyserver)
+
+## PrivateEndpointConnections
+
+- [CreateOrUpdate](#privateendpointconnections_createorupdate)
+- [Delete](#privateendpointconnections_delete)
+- [Get](#privateendpointconnections_get)
+- [ListByServer](#privateendpointconnections_listbyserver)
+
+## PrivateLinkResources
+
+- [Get](#privatelinkresources_get)
+- [ListByServer](#privatelinkresources_listbyserver)
+
+## RecommendedSensitivityLabels
+
+- [Update](#recommendedsensitivitylabels_update)
+
+## RecoverableDatabases
+
+- [Get](#recoverabledatabases_get)
+- [ListByServer](#recoverabledatabases_listbyserver)
+
+## RecoverableManagedDatabases
+
+- [Get](#recoverablemanageddatabases_get)
+- [ListByInstance](#recoverablemanageddatabases_listbyinstance)
+
+## ReplicationLinks
+
+- [Delete](#replicationlinks_delete)
+- [Failover](#replicationlinks_failover)
+- [FailoverAllowDataLoss](#replicationlinks_failoverallowdataloss)
+- [Get](#replicationlinks_get)
+- [ListByDatabase](#replicationlinks_listbydatabase)
+- [ListByServer](#replicationlinks_listbyserver)
+- [Unlink](#replicationlinks_unlink)
+
+## RestorableDroppedDatabases
+
+- [Get](#restorabledroppeddatabases_get)
+- [ListByServer](#restorabledroppeddatabases_listbyserver)
+
+## RestorableDroppedManagedDatabases
+
+- [Get](#restorabledroppedmanageddatabases_get)
+- [ListByInstance](#restorabledroppedmanageddatabases_listbyinstance)
+
+## RestorePoints
+
+- [Create](#restorepoints_create)
+- [Delete](#restorepoints_delete)
+- [Get](#restorepoints_get)
+- [ListByDatabase](#restorepoints_listbydatabase)
+
+## SensitivityLabels
+
+- [CreateOrUpdate](#sensitivitylabels_createorupdate)
+- [Delete](#sensitivitylabels_delete)
+- [DisableRecommendation](#sensitivitylabels_disablerecommendation)
+- [EnableRecommendation](#sensitivitylabels_enablerecommendation)
+- [Get](#sensitivitylabels_get)
+- [ListCurrentByDatabase](#sensitivitylabels_listcurrentbydatabase)
+- [ListRecommendedByDatabase](#sensitivitylabels_listrecommendedbydatabase)
+- [Update](#sensitivitylabels_update)
+
+## ServerAdvisors
+
+- [Get](#serveradvisors_get)
+- [ListByServer](#serveradvisors_listbyserver)
+- [Update](#serveradvisors_update)
+
+## ServerAutomaticTuning
+
+- [Get](#serverautomatictuning_get)
+- [Update](#serverautomatictuning_update)
+
+## ServerAzureADAdministrators
+
+- [CreateOrUpdate](#serverazureadadministrators_createorupdate)
+- [Delete](#serverazureadadministrators_delete)
+- [Get](#serverazureadadministrators_get)
+- [ListByServer](#serverazureadadministrators_listbyserver)
+
+## ServerAzureADOnlyAuthentications
+
+- [CreateOrUpdate](#serverazureadonlyauthentications_createorupdate)
+- [Delete](#serverazureadonlyauthentications_delete)
+- [Get](#serverazureadonlyauthentications_get)
+- [ListByServer](#serverazureadonlyauthentications_listbyserver)
+
+## ServerBlobAuditingPolicies
+
+- [CreateOrUpdate](#serverblobauditingpolicies_createorupdate)
+- [Get](#serverblobauditingpolicies_get)
+- [ListByServer](#serverblobauditingpolicies_listbyserver)
+
+## ServerCommunicationLinks
+
+- [CreateOrUpdate](#servercommunicationlinks_createorupdate)
+- [Delete](#servercommunicationlinks_delete)
+- [Get](#servercommunicationlinks_get)
+- [ListByServer](#servercommunicationlinks_listbyserver)
+
+## ServerConnectionPolicies
+
+- [CreateOrUpdate](#serverconnectionpolicies_createorupdate)
+- [Get](#serverconnectionpolicies_get)
+- [ListByServer](#serverconnectionpolicies_listbyserver)
+
+## ServerDevOpsAuditSettings
+
+- [CreateOrUpdate](#serverdevopsauditsettings_createorupdate)
+- [Get](#serverdevopsauditsettings_get)
+- [ListByServer](#serverdevopsauditsettings_listbyserver)
+
+## ServerDnsAliases
+
+- [Acquire](#serverdnsaliases_acquire)
+- [CreateOrUpdate](#serverdnsaliases_createorupdate)
+- [Delete](#serverdnsaliases_delete)
+- [Get](#serverdnsaliases_get)
+- [ListByServer](#serverdnsaliases_listbyserver)
+
+## ServerKeys
+
+- [CreateOrUpdate](#serverkeys_createorupdate)
+- [Delete](#serverkeys_delete)
+- [Get](#serverkeys_get)
+- [ListByServer](#serverkeys_listbyserver)
+
+## ServerOperations
+
+- [ListByServer](#serveroperations_listbyserver)
+
+## ServerSecurityAlertPolicies
+
+- [CreateOrUpdate](#serversecurityalertpolicies_createorupdate)
+- [Get](#serversecurityalertpolicies_get)
+- [ListByServer](#serversecurityalertpolicies_listbyserver)
+
+## ServerTrustGroups
+
+- [CreateOrUpdate](#servertrustgroups_createorupdate)
+- [Delete](#servertrustgroups_delete)
+- [Get](#servertrustgroups_get)
+- [ListByInstance](#servertrustgroups_listbyinstance)
+- [ListByLocation](#servertrustgroups_listbylocation)
+
+## ServerUsages
+
+- [ListByServer](#serverusages_listbyserver)
+
+## ServerVulnerabilityAssessments
+
+- [CreateOrUpdate](#servervulnerabilityassessments_createorupdate)
+- [Delete](#servervulnerabilityassessments_delete)
+- [Get](#servervulnerabilityassessments_get)
+- [ListByServer](#servervulnerabilityassessments_listbyserver)
+
+## Servers
+
+- [CheckNameAvailability](#servers_checknameavailability)
+- [CreateOrUpdate](#servers_createorupdate)
+- [Delete](#servers_delete)
+- [GetByResourceGroup](#servers_getbyresourcegroup)
+- [ImportDatabase](#servers_importdatabase)
+- [List](#servers_list)
+- [ListByResourceGroup](#servers_listbyresourcegroup)
+- [Update](#servers_update)
+
+## ServiceObjectives
+
+- [Get](#serviceobjectives_get)
+- [ListByServer](#serviceobjectives_listbyserver)
+
+## SqlAgent
+
+- [CreateOrUpdate](#sqlagent_createorupdate)
+- [Get](#sqlagent_get)
+
+## SubscriptionUsages
+
+- [Get](#subscriptionusages_get)
+- [ListByLocation](#subscriptionusages_listbylocation)
+
+## SyncAgents
+
+- [CreateOrUpdate](#syncagents_createorupdate)
+- [Delete](#syncagents_delete)
+- [GenerateKey](#syncagents_generatekey)
+- [Get](#syncagents_get)
+- [ListByServer](#syncagents_listbyserver)
+- [ListLinkedDatabases](#syncagents_listlinkeddatabases)
+
+## SyncGroups
+
+- [CancelSync](#syncgroups_cancelsync)
+- [CreateOrUpdate](#syncgroups_createorupdate)
+- [Delete](#syncgroups_delete)
+- [Get](#syncgroups_get)
+- [ListByDatabase](#syncgroups_listbydatabase)
+- [ListHubSchemas](#syncgroups_listhubschemas)
+- [ListLogs](#syncgroups_listlogs)
+- [ListSyncDatabaseIds](#syncgroups_listsyncdatabaseids)
+- [RefreshHubSchema](#syncgroups_refreshhubschema)
+- [TriggerSync](#syncgroups_triggersync)
+- [Update](#syncgroups_update)
+
+## SyncMembers
+
+- [CreateOrUpdate](#syncmembers_createorupdate)
+- [Delete](#syncmembers_delete)
+- [Get](#syncmembers_get)
+- [ListBySyncGroup](#syncmembers_listbysyncgroup)
+- [ListMemberSchemas](#syncmembers_listmemberschemas)
+- [RefreshMemberSchema](#syncmembers_refreshmemberschema)
+- [Update](#syncmembers_update)
+
+## TdeCertificates
+
+- [Create](#tdecertificates_create)
+
+## TimeZones
+
+- [Get](#timezones_get)
+- [ListByLocation](#timezones_listbylocation)
+
+## TransparentDataEncryptions
+
+- [CreateOrUpdate](#transparentdataencryptions_createorupdate)
+- [Get](#transparentdataencryptions_get)
+- [ListByDatabase](#transparentdataencryptions_listbydatabase)
+
+## Usages
+
+- [ListByInstancePool](#usages_listbyinstancepool)
+
+## VirtualClusters
+
+- [Delete](#virtualclusters_delete)
+- [GetByResourceGroup](#virtualclusters_getbyresourcegroup)
+- [List](#virtualclusters_list)
+- [ListByResourceGroup](#virtualclusters_listbyresourcegroup)
+- [Update](#virtualclusters_update)
+- [UpdateDnsServers](#virtualclusters_updatednsservers)
+
+## VirtualNetworkRules
+
+- [CreateOrUpdate](#virtualnetworkrules_createorupdate)
+- [Delete](#virtualnetworkrules_delete)
+- [Get](#virtualnetworkrules_get)
+- [ListByServer](#virtualnetworkrules_listbyserver)
+
+## WorkloadClassifiers
+
+- [CreateOrUpdate](#workloadclassifiers_createorupdate)
+- [Delete](#workloadclassifiers_delete)
+- [Get](#workloadclassifiers_get)
+- [ListByWorkloadGroup](#workloadclassifiers_listbyworkloadgroup)
+
+## WorkloadGroups
+
+- [CreateOrUpdate](#workloadgroups_createorupdate)
+- [Delete](#workloadgroups_delete)
+- [Get](#workloadgroups_get)
+- [ListByDatabase](#workloadgroups_listbydatabase)
+### BackupShortTermRetentionPolicies_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.DiffBackupIntervalInHours;
+import com.azure.resourcemanager.sql.generated.models.ShortTermRetentionPolicyName;
+
+/** Samples for BackupShortTermRetentionPolicies CreateOrUpdate. */
+public final class BackupShortTermRetentionPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateShortTermRetentionPolicy.json
+ */
+ /**
+ * Sample code: Update the short term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheShortTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .backupShortTermRetentionPolicies()
+ .define(ShortTermRetentionPolicyName.DEFAULT)
+ .withExistingDatabase("resourceGroup", "testsvr", "testdb")
+ .withRetentionDays(7)
+ .withDiffBackupIntervalInHours(DiffBackupIntervalInHours.TWO_FOUR)
+ .create();
+ }
+}
+```
+
+### BackupShortTermRetentionPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ShortTermRetentionPolicyName;
+
+/** Samples for BackupShortTermRetentionPolicies Get. */
+public final class BackupShortTermRetentionPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetShortTermRetentionPolicy.json
+ */
+ /**
+ * Sample code: Get the short term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheShortTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .backupShortTermRetentionPolicies()
+ .getWithResponse(
+ "Default-SQL-SouthEastAsia", "testsvr", "testdb", ShortTermRetentionPolicyName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### BackupShortTermRetentionPolicies_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupShortTermRetentionPolicies ListByDatabase. */
+public final class BackupShortTermRetentionPoliciesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json
+ */
+ /**
+ * Sample code: Get the short term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheShortTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .backupShortTermRetentionPolicies()
+ .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE);
+ }
+}
+```
+
+### BackupShortTermRetentionPolicies_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.BackupShortTermRetentionPolicy;
+import com.azure.resourcemanager.sql.generated.models.DiffBackupIntervalInHours;
+import com.azure.resourcemanager.sql.generated.models.ShortTermRetentionPolicyName;
+
+/** Samples for BackupShortTermRetentionPolicies Update. */
+public final class BackupShortTermRetentionPoliciesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateShortTermRetentionPolicy.json
+ */
+ /**
+ * Sample code: Update the short term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheShortTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ BackupShortTermRetentionPolicy resource =
+ manager
+ .backupShortTermRetentionPolicies()
+ .getWithResponse(
+ "resourceGroup", "testsvr", "testdb", ShortTermRetentionPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withRetentionDays(7)
+ .withDiffBackupIntervalInHours(DiffBackupIntervalInHours.TWO_FOUR)
+ .apply();
+ }
+}
+```
+
+### Capabilities_ListByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Capabilities ListByLocation. */
+public final class CapabilitiesListByLocationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LocationCapabilityListByLocation.json
+ */
+ /**
+ * Sample code: List subscription capabilities in the given location.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listSubscriptionCapabilitiesInTheGivenLocation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.capabilities().listByLocationWithResponse("eastus", null, Context.NONE);
+ }
+}
+```
+
+### DataMaskingPolicies_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.DataMaskingState;
+
+/** Samples for DataMaskingPolicies CreateOrUpdate. */
+public final class DataMaskingPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyCreateOrUpdateMin.json
+ */
+ /**
+ * Sample code: Create or update data masking policy min.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateDataMaskingPolicyMin(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .dataMaskingPolicies()
+ .define()
+ .withExistingDatabase("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331")
+ .withDataMaskingState(DataMaskingState.ENABLED)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyCreateOrUpdateMax.json
+ */
+ /**
+ * Sample code: Create or update data masking policy max.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateDataMaskingPolicyMax(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .dataMaskingPolicies()
+ .define()
+ .withExistingDatabase("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331")
+ .withDataMaskingState(DataMaskingState.ENABLED)
+ .withExemptPrincipals("testuser;")
+ .create();
+ }
+}
+```
+
+### DataMaskingPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DataMaskingPolicies Get. */
+public final class DataMaskingPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyGet.json
+ */
+ /**
+ * Sample code: Get data masking policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getDataMaskingPolicy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .dataMaskingPolicies()
+ .getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", Context.NONE);
+ }
+}
+```
+
+### DataMaskingRules_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.DataMaskingFunction;
+import com.azure.resourcemanager.sql.generated.models.DataMaskingRuleState;
+
+/** Samples for DataMaskingRules CreateOrUpdate. */
+public final class DataMaskingRulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json
+ */
+ /**
+ * Sample code: Create/Update data masking rule for default min.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createUpdateDataMaskingRuleForDefaultMin(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .dataMaskingRules()
+ .define("rule1")
+ .withExistingDatabase("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331")
+ .withSchemaName("dbo")
+ .withTableName("Table_1")
+ .withColumnName("test1")
+ .withMaskingFunction(DataMaskingFunction.DEFAULT)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json
+ */
+ /**
+ * Sample code: Create/Update data masking rule for default max.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createUpdateDataMaskingRuleForDefaultMax(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .dataMaskingRules()
+ .define("rule1")
+ .withExistingDatabase("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331")
+ .withAliasName("nickname")
+ .withRuleState(DataMaskingRuleState.ENABLED)
+ .withSchemaName("dbo")
+ .withTableName("Table_1")
+ .withColumnName("test1")
+ .withMaskingFunction(DataMaskingFunction.DEFAULT)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateText.json
+ */
+ /**
+ * Sample code: Create/Update data masking rule for text.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createUpdateDataMaskingRuleForText(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .dataMaskingRules()
+ .define("rule1")
+ .withExistingDatabase("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331")
+ .withSchemaName("dbo")
+ .withTableName("Table_1")
+ .withColumnName("test1")
+ .withMaskingFunction(DataMaskingFunction.TEXT)
+ .withPrefixSize("1")
+ .withSuffixSize("0")
+ .withReplacementString("asdf")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateNumber.json
+ */
+ /**
+ * Sample code: Create/Update data masking rule for numbers.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createUpdateDataMaskingRuleForNumbers(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .dataMaskingRules()
+ .define("rule1")
+ .withExistingDatabase("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331")
+ .withSchemaName("dbo")
+ .withTableName("Table_1")
+ .withColumnName("test1")
+ .withMaskingFunction(DataMaskingFunction.NUMBER)
+ .withNumberFrom("0")
+ .withNumberTo("2")
+ .create();
+ }
+}
+```
+
+### DataMaskingRules_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DataMaskingRules ListByDatabase. */
+public final class DataMaskingRulesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleList.json
+ */
+ /**
+ * Sample code: List data masking rules.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDataMaskingRules(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .dataMaskingRules()
+ .listByDatabase("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", Context.NONE);
+ }
+}
+```
+
+### DataWarehouseUserActivitiesOperation_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.DataWarehouseUserActivityName;
+
+/** Samples for DataWarehouseUserActivitiesOperation Get. */
+public final class DataWarehouseUserActivitiesOperationGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetDataWarehouseUserActivities.json
+ */
+ /**
+ * Sample code: Get the list of the user activities of a data warehouse.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheListOfTheUserActivitiesOfADataWarehouse(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .dataWarehouseUserActivitiesOperations()
+ .getWithResponse(
+ "Default-SQL-SouthEastAsia", "testsvr", "testdb", DataWarehouseUserActivityName.CURRENT, Context.NONE);
+ }
+}
+```
+
+### DataWarehouseUserActivitiesOperation_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DataWarehouseUserActivitiesOperation ListByDatabase. */
+public final class DataWarehouseUserActivitiesOperationListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListDataWarehouseUserActivities.json
+ */
+ /**
+ * Sample code: List of the user activities of a data warehouse.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listOfTheUserActivitiesOfADataWarehouse(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .dataWarehouseUserActivitiesOperations()
+ .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE);
+ }
+}
+```
+
+### DatabaseAdvisors_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAdvisors Get. */
+public final class DatabaseAdvisorsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorGet.json
+ */
+ /**
+ * Sample code: Get database advisor.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getDatabaseAdvisor(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseAdvisors()
+ .getWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", Context.NONE);
+ }
+}
+```
+
+### DatabaseAdvisors_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAdvisors ListByDatabase. */
+public final class DatabaseAdvisorsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorList.json
+ */
+ /**
+ * Sample code: List of database advisors.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listOfDatabaseAdvisors(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseAdvisors()
+ .listByDatabaseWithResponse(
+ "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionListExpand.json
+ */
+ /**
+ * Sample code: List of database recommended actions for all advisors.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listOfDatabaseRecommendedActionsForAllAdvisors(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseAdvisors()
+ .listByDatabaseWithResponse(
+ "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "recommendedActions", Context.NONE);
+ }
+}
+```
+
+### DatabaseAdvisors_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.AdvisorInner;
+import com.azure.resourcemanager.sql.generated.models.AutoExecuteStatus;
+
+/** Samples for DatabaseAdvisors Update. */
+public final class DatabaseAdvisorsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorUpdate.json
+ */
+ /**
+ * Sample code: Update database advisor.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateDatabaseAdvisor(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseAdvisors()
+ .updateWithResponse(
+ "workloadinsight-demos",
+ "misosisvr",
+ "IndexAdvisor_test_3",
+ "CreateIndex",
+ new AdvisorInner().withAutoExecuteStatus(AutoExecuteStatus.DISABLED),
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseAutomaticTuning_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseAutomaticTuning Get. */
+public final class DatabaseAutomaticTuningGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningGet.json
+ */
+ /**
+ * Sample code: Get a database's automatic tuning settings.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getADatabaseSAutomaticTuningSettings(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databaseAutomaticTunings().getWithResponse("default-sql-onebox", "testsvr11", "db1", Context.NONE);
+ }
+}
+```
+
+### DatabaseAutomaticTuning_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseAutomaticTuningInner;
+import com.azure.resourcemanager.sql.generated.models.AutomaticTuningMode;
+import com.azure.resourcemanager.sql.generated.models.AutomaticTuningOptionModeDesired;
+import com.azure.resourcemanager.sql.generated.models.AutomaticTuningOptions;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for DatabaseAutomaticTuning Update. */
+public final class DatabaseAutomaticTuningUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json
+ */
+ /**
+ * Sample code: Updates database automatic tuning settings with all properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updatesDatabaseAutomaticTuningSettingsWithAllProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseAutomaticTunings()
+ .updateWithResponse(
+ "default-sql-onebox",
+ "testsvr11",
+ "db1",
+ new DatabaseAutomaticTuningInner()
+ .withDesiredState(AutomaticTuningMode.AUTO)
+ .withOptions(
+ mapOf(
+ "createIndex",
+ new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.OFF),
+ "dropIndex",
+ new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.ON),
+ "forceLastGoodPlan",
+ new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.DEFAULT))),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json
+ */
+ /**
+ * Sample code: Updates database automatic tuning settings with minimal properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updatesDatabaseAutomaticTuningSettingsWithMinimalProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseAutomaticTunings()
+ .updateWithResponse(
+ "default-sql-onebox",
+ "testsvr11",
+ "db1",
+ new DatabaseAutomaticTuningInner().withDesiredState(AutomaticTuningMode.AUTO),
+ 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;
+ }
+}
+```
+
+### DatabaseBlobAuditingPolicies_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.BlobAuditingPolicyState;
+import java.util.Arrays;
+import java.util.UUID;
+
+/** Samples for DatabaseBlobAuditingPolicies CreateOrUpdate. */
+public final class DatabaseBlobAuditingPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json
+ */
+ /**
+ * Sample code: Create or update a database's azure monitor auditing policy with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateADatabaseSAzureMonitorAuditingPolicyWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseBlobAuditingPolicies()
+ .define()
+ .withExistingDatabase("blobauditingtest-4799", "blobauditingtest-6440", "testdb")
+ .withIsAzureMonitorTargetEnabled(true)
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseBlobAuditingCreateMax.json
+ */
+ /**
+ * Sample code: Create or update a database's blob auditing policy with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateADatabaseSBlobAuditingPolicyWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseBlobAuditingPolicies()
+ .define()
+ .withExistingDatabase("blobauditingtest-4799", "blobauditingtest-6440", "testdb")
+ .withRetentionDays(6)
+ .withAuditActionsAndGroups(
+ Arrays
+ .asList(
+ "DATABASE_LOGOUT_GROUP",
+ "DATABASE_ROLE_MEMBER_CHANGE_GROUP",
+ "UPDATE on database::TestDatabaseName by public"))
+ .withIsStorageSecondaryKeyInUse(false)
+ .withIsAzureMonitorTargetEnabled(true)
+ .withQueueDelayMs(4000)
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseBlobAuditingCreateMin.json
+ */
+ /**
+ * Sample code: Create or update a database's blob auditing policy with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateADatabaseSBlobAuditingPolicyWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseBlobAuditingPolicies()
+ .define()
+ .withExistingDatabase("blobauditingtest-4799", "blobauditingtest-6440", "testdb")
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .create();
+ }
+}
+```
+
+### DatabaseBlobAuditingPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseBlobAuditingPolicies Get. */
+public final class DatabaseBlobAuditingPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseBlobAuditingGet.json
+ */
+ /**
+ * Sample code: Get a database's blob auditing policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getADatabaseSBlobAuditingPolicy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseBlobAuditingPolicies()
+ .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE);
+ }
+}
+```
+
+### DatabaseBlobAuditingPolicies_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseBlobAuditingPolicies ListByDatabase. */
+public final class DatabaseBlobAuditingPoliciesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAuditingSettingsList.json
+ */
+ /**
+ * Sample code: List audit settings of a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listAuditSettingsOfADatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseBlobAuditingPolicies()
+ .listByDatabase("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE);
+ }
+}
+```
+
+### DatabaseColumns_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseColumns Get. */
+public final class DatabaseColumnsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseColumnGet.json
+ */
+ /**
+ * Sample code: Get database column.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getDatabaseColumn(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseColumns()
+ .getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", "column1", Context.NONE);
+ }
+}
+```
+
+### DatabaseColumns_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+import java.util.Arrays;
+
+/** Samples for DatabaseColumns ListByDatabase. */
+public final class DatabaseColumnsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnsListByDatabaseMax.json
+ */
+ /**
+ * Sample code: Filter database columns.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void filterDatabaseColumns(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseColumns()
+ .listByDatabase(
+ "myRG",
+ "serverName",
+ "myDatabase",
+ Arrays.asList("dbo"),
+ Arrays.asList("customer", "address"),
+ Arrays.asList("username"),
+ Arrays.asList("schema asc", "table", "column desc"),
+ null,
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnsListByDatabaseMin.json
+ */
+ /**
+ * Sample code: List database columns.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabaseColumns(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseColumns()
+ .listByDatabase("myRG", "serverName", "myDatabase", null, null, null, null, null, Context.NONE);
+ }
+}
+```
+
+### DatabaseColumns_ListByTable
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseColumns ListByTable. */
+public final class DatabaseColumnsListByTableSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseColumnListByTable.json
+ */
+ /**
+ * Sample code: List database columns.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabaseColumns(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databaseColumns().listByTable("myRG", "serverName", "myDatabase", "dbo", "table1", null, Context.NONE);
+ }
+}
+```
+
+### DatabaseExtensionsOperation_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.OperationMode;
+import com.azure.resourcemanager.sql.generated.models.StorageKeyType;
+
+/** Samples for DatabaseExtensionsOperation CreateOrUpdate. */
+public final class DatabaseExtensionsOperationCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateDatabaseExtensions.json
+ */
+ /**
+ * Sample code: Create or Update database extensions.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateDatabaseExtensions(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseExtensionsOperations()
+ .define("polybaseimport")
+ .withExistingDatabase(
+ "rg_20cbe0f0-c2d9-4522-9177-5469aad53029",
+ "srv_1ffd1cf8-9951-47fb-807d-a9c384763849",
+ "878e303f-1ea0-4f17-aa3d-a22ac5e9da08")
+ .withOperationMode(OperationMode.POLYBASE_IMPORT)
+ .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY)
+ .withStorageKey("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
+ .withStorageUri("https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml")
+ .create();
+ }
+}
+```
+
+### DatabaseExtensionsOperation_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseExtensionsOperation Get. */
+public final class DatabaseExtensionsOperationGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseExtensions.json
+ */
+ /**
+ * Sample code: Get database extensions.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getDatabaseExtensions(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseExtensionsOperations()
+ .getWithResponse(
+ "rg_a1f9d6f8-30d5-4228-9504-8a364361bca3",
+ "srv_65858e0f-b1d1-4bdc-8351-a7da86ca4939",
+ "11aa6c5e-58ed-4693-b303-3b8e3131deaa",
+ "polybaseimport",
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseExtensionsOperation_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseExtensionsOperation ListByDatabase. */
+public final class DatabaseExtensionsOperationListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseExtensions.json
+ */
+ /**
+ * Sample code: List database extensions.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabaseExtensions(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseExtensionsOperations()
+ .listByDatabase(
+ "rg_4007c5a9-b3b0-41e1-bd46-9eef38768a4a",
+ "srv_3b67ec2a-519b-43a7-8533-fb62dce3431e",
+ "719d8fa4-bf0f-48fc-8cd3-ef40fe6ba1fe",
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseOperations_Cancel
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for DatabaseOperations Cancel. */
+public final class DatabaseOperationsCancelSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelDatabaseOperation.json
+ */
+ /**
+ * Sample code: Cancel the database management operation.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void cancelTheDatabaseManagementOperation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseOperations()
+ .cancelWithResponse(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-6661",
+ "testdb",
+ UUID.fromString("f779414b-e748-4925-8cfe-c8598f7660ae"),
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseOperations_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseOperations ListByDatabase. */
+public final class DatabaseOperationsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseOperations.json
+ */
+ /**
+ * Sample code: List the database management operations.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listTheDatabaseManagementOperations(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databaseOperations().listByDatabase("sqlcrudtest-7398", "sqlcrudtest-4645", "testdb", Context.NONE);
+ }
+}
+```
+
+### DatabaseRecommendedActions_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseRecommendedActions Get. */
+public final class DatabaseRecommendedActionsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionGet.json
+ */
+ /**
+ * Sample code: Get database recommended action.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getDatabaseRecommendedAction(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseRecommendedActions()
+ .getWithResponse(
+ "workloadinsight-demos",
+ "misosisvr",
+ "IndexAdvisor_test_3",
+ "CreateIndex",
+ "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB",
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseRecommendedActions_ListByDatabaseAdvisor
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseRecommendedActions ListByDatabaseAdvisor. */
+public final class DatabaseRecommendedActionsListByDatabaseAdvisorSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionList.json
+ */
+ /**
+ * Sample code: List of database recommended actions.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listOfDatabaseRecommendedActions(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseRecommendedActions()
+ .listByDatabaseAdvisorWithResponse(
+ "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", Context.NONE);
+ }
+}
+```
+
+### DatabaseRecommendedActions_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.RecommendedActionInner;
+import com.azure.resourcemanager.sql.generated.models.RecommendedActionCurrentState;
+import com.azure.resourcemanager.sql.generated.models.RecommendedActionStateInfo;
+
+/** Samples for DatabaseRecommendedActions Update. */
+public final class DatabaseRecommendedActionsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionUpdate.json
+ */
+ /**
+ * Sample code: Update database recommended action.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateDatabaseRecommendedAction(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseRecommendedActions()
+ .updateWithResponse(
+ "workloadinsight-demos",
+ "misosisvr",
+ "IndexAdvisor_test_3",
+ "CreateIndex",
+ "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB",
+ new RecommendedActionInner()
+ .withState(
+ new RecommendedActionStateInfo().withCurrentValue(RecommendedActionCurrentState.PENDING)),
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseSchemas_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseSchemas Get. */
+public final class DatabaseSchemasGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSchemaGet.json
+ */
+ /**
+ * Sample code: Get database schema.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getDatabaseSchema(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databaseSchemas().getWithResponse("myRG", "serverName", "myDatabase", "dbo", Context.NONE);
+ }
+}
+```
+
+### DatabaseSchemas_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseSchemas ListByDatabase. */
+public final class DatabaseSchemasListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSchemaListByDatabase.json
+ */
+ /**
+ * Sample code: List database schemas.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabaseSchemas(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databaseSchemas().listByDatabase("myRG", "serverName", "myDatabase", null, Context.NONE);
+ }
+}
+```
+
+### DatabaseSecurityAlertPolicies_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.DatabaseSecurityAlertPolicy;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertPolicyName;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertsPolicyState;
+import java.util.Arrays;
+
+/** Samples for DatabaseSecurityAlertPolicies CreateOrUpdate. */
+public final class DatabaseSecurityAlertPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertCreateMax.json
+ */
+ /**
+ * Sample code: Update a database's threat detection policy with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateADatabaseSThreatDetectionPolicyWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ DatabaseSecurityAlertPolicy resource =
+ manager
+ .databaseSecurityAlertPolicies()
+ .getWithResponse(
+ "securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withState(SecurityAlertsPolicyState.ENABLED)
+ .withDisabledAlerts(Arrays.asList("Sql_Injection", "Usage_Anomaly"))
+ .withEmailAddresses(Arrays.asList("test@microsoft.com", "user@microsoft.com"))
+ .withEmailAccountAdmins(true)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .withRetentionDays(6)
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertCreateMin.json
+ */
+ /**
+ * Sample code: Update a database's threat detection policy with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateADatabaseSThreatDetectionPolicyWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ DatabaseSecurityAlertPolicy resource =
+ manager
+ .databaseSecurityAlertPolicies()
+ .getWithResponse(
+ "securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource.update().withState(SecurityAlertsPolicyState.ENABLED).apply();
+ }
+}
+```
+
+### DatabaseSecurityAlertPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertPolicyName;
+
+/** Samples for DatabaseSecurityAlertPolicies Get. */
+public final class DatabaseSecurityAlertPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertGet.json
+ */
+ /**
+ * Sample code: Get a database's threat detection policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getADatabaseSThreatDetectionPolicy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseSecurityAlertPolicies()
+ .getWithResponse(
+ "securityalert-6852", "securityalert-2080", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### DatabaseSecurityAlertPolicies_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseSecurityAlertPolicies ListByDatabase. */
+public final class DatabaseSecurityAlertPoliciesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertListByDatabase.json
+ */
+ /**
+ * Sample code: Get the database's threat detection policies.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheDatabaseSThreatDetectionPolicies(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseSecurityAlertPolicies()
+ .listByDatabase("securityalert-6852", "securityalert-2080", "testdb", Context.NONE);
+ }
+}
+```
+
+### DatabaseTables_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseTables Get. */
+public final class DatabaseTablesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseTableGet.json
+ */
+ /**
+ * Sample code: Get database table.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getDatabaseTable(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databaseTables().getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", Context.NONE);
+ }
+}
+```
+
+### DatabaseTables_ListBySchema
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseTables ListBySchema. */
+public final class DatabaseTablesListBySchemaSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseTableListBySchema.json
+ */
+ /**
+ * Sample code: List database tables.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabaseTables(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databaseTables().listBySchema("myRG", "serverName", "myDatabase", "dbo", null, Context.NONE);
+ }
+}
+```
+
+### DatabaseUsages_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseUsages ListByDatabase. */
+public final class DatabaseUsagesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseUsages.json
+ */
+ /**
+ * Sample code: Gets database usages.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsDatabaseUsages(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databaseUsages().listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE);
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessmentRuleBaselines_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.DatabaseVulnerabilityAssessmentRuleBaselineItem;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentPolicyBaselineName;
+import java.util.Arrays;
+
+/** Samples for DatabaseVulnerabilityAssessmentRuleBaselines CreateOrUpdate. */
+public final class DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json
+ */
+ /**
+ * Sample code: Creates or updates a database's vulnerability assessment rule baseline.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessmentRuleBaselines()
+ .define(VulnerabilityAssessmentPolicyBaselineName.DEFAULT)
+ .withExistingRule(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "VA1001")
+ .withBaselineResults(
+ Arrays
+ .asList(
+ new DatabaseVulnerabilityAssessmentRuleBaselineItem()
+ .withResult(Arrays.asList("userA", "SELECT")),
+ new DatabaseVulnerabilityAssessmentRuleBaselineItem()
+ .withResult(Arrays.asList("userB", "SELECT")),
+ new DatabaseVulnerabilityAssessmentRuleBaselineItem()
+ .withResult(Arrays.asList("userC", "SELECT", "tableId_4"))))
+ .create();
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessmentRuleBaselines_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentPolicyBaselineName;
+
+/** Samples for DatabaseVulnerabilityAssessmentRuleBaselines Delete. */
+public final class DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json
+ */
+ /**
+ * Sample code: Removes a database's vulnerability assessment rule baseline.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void removesADatabaseSVulnerabilityAssessmentRuleBaseline(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessmentRuleBaselines()
+ .deleteWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "VA1001",
+ VulnerabilityAssessmentPolicyBaselineName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessmentRuleBaselines_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentPolicyBaselineName;
+
+/** Samples for DatabaseVulnerabilityAssessmentRuleBaselines Get. */
+public final class DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json
+ */
+ /**
+ * Sample code: Gets a database's vulnerability assessment rule baseline.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsADatabaseSVulnerabilityAssessmentRuleBaseline(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessmentRuleBaselines()
+ .getWithResponse(
+ "vulnerabilityaseessmenttest-4711",
+ "vulnerabilityaseessmenttest-6411",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "VA1001",
+ VulnerabilityAssessmentPolicyBaselineName.MASTER,
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessmentScans_Export
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for DatabaseVulnerabilityAssessmentScans Export. */
+public final class DatabaseVulnerabilityAssessmentScansExportSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json
+ */
+ /**
+ * Sample code: Export a database's vulnerability assessment scan results.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void exportADatabaseSVulnerabilityAssessmentScanResults(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessmentScans()
+ .exportWithResponse(
+ "vulnerabilityassessmenttest-4799",
+ "vulnerabilityassessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "scan001",
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessmentScans_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for DatabaseVulnerabilityAssessmentScans Get. */
+public final class DatabaseVulnerabilityAssessmentScansGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json
+ */
+ /**
+ * Sample code: Gets a database vulnerability assessment scan record by scan ID.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsADatabaseVulnerabilityAssessmentScanRecordByScanID(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessmentScans()
+ .getWithResponse(
+ "vulnerabilityassessmenttest-4711",
+ "vulnerabilityassessmenttest-6411",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "scan001",
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessmentScans_InitiateScan
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for DatabaseVulnerabilityAssessmentScans InitiateScan. */
+public final class DatabaseVulnerabilityAssessmentScansInitiateScanSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json
+ */
+ /**
+ * Sample code: Executes a database's vulnerability assessment scan.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void executesADatabaseSVulnerabilityAssessmentScan(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessmentScans()
+ .initiateScan(
+ "vulnerabilityassessmenttest-4711",
+ "vulnerabilityassessmenttest-6411",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "scan01",
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessmentScans_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for DatabaseVulnerabilityAssessmentScans ListByDatabase. */
+public final class DatabaseVulnerabilityAssessmentScansListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json
+ */
+ /**
+ * Sample code: Gets the list of a database vulnerability assessment scan records.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheListOfADatabaseVulnerabilityAssessmentScanRecords(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessmentScans()
+ .listByDatabase(
+ "vulnerabilityassessmenttest-4711",
+ "vulnerabilityassessmenttest-6411",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessments_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentRecurringScansProperties;
+import java.util.Arrays;
+
+/** Samples for DatabaseVulnerabilityAssessments CreateOrUpdate. */
+public final class DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json
+ */
+ /**
+ * Sample code: Create a database's vulnerability assessment with minimal parameters, when storageContainerSasKey is
+ * specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void
+ createADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessments()
+ .define(VulnerabilityAssessmentName.DEFAULT)
+ .withExistingDatabase("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb")
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json
+ */
+ /**
+ * Sample code: Create a database's vulnerability assessment with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createADatabaseSVulnerabilityAssessmentWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessments()
+ .define(VulnerabilityAssessmentName.DEFAULT)
+ .withExistingDatabase("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb")
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .withRecurringScans(
+ new VulnerabilityAssessmentRecurringScansProperties()
+ .withIsEnabled(true)
+ .withEmailSubscriptionAdmins(true)
+ .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com")))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json
+ */
+ /**
+ * Sample code: Create a database's vulnerability assessment with minimal parameters, when storageAccountAccessKey
+ * is specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void
+ createADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessments()
+ .define(VulnerabilityAssessmentName.DEFAULT)
+ .withExistingDatabase("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb")
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .create();
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessments_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for DatabaseVulnerabilityAssessments Delete. */
+public final class DatabaseVulnerabilityAssessmentsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json
+ */
+ /**
+ * Sample code: Remove a database's vulnerability assessment.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void removeADatabaseSVulnerabilityAssessment(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessments()
+ .deleteWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessments_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for DatabaseVulnerabilityAssessments Get. */
+public final class DatabaseVulnerabilityAssessmentsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json
+ */
+ /**
+ * Sample code: Get a database's vulnerability assessment.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getADatabaseSVulnerabilityAssessment(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessments()
+ .getWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseVulnerabilityAssessments_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseVulnerabilityAssessments ListByDatabase. */
+public final class DatabaseVulnerabilityAssessmentsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json
+ */
+ /**
+ * Sample code: Get the database's vulnerability assessment policies.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheDatabaseSVulnerabilityAssessmentPolicies(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databaseVulnerabilityAssessments()
+ .listByDatabase(
+ "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", Context.NONE);
+ }
+}
+```
+
+### Databases_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.BackupStorageRedundancy;
+import com.azure.resourcemanager.sql.generated.models.CreateMode;
+import com.azure.resourcemanager.sql.generated.models.SecondaryType;
+import com.azure.resourcemanager.sql.generated.models.Sku;
+import java.time.OffsetDateTime;
+
+/** Samples for Databases CreateOrUpdate. */
+public final class DatabasesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json
+ */
+ /**
+ * Sample code: Creates a database with preferred maintenance window.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsADatabaseWithPreferredMaintenanceWindow(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("testdb")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .withSku(new Sku().withName("S2").withTier("Standard"))
+ .withCreateMode(CreateMode.DEFAULT)
+ .withCollation("SQL_Latin1_General_CP1_CI_AS")
+ .withMaxSizeBytes(1073741824L)
+ .withMaintenanceConfigurationId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json
+ */
+ /**
+ * Sample code: Creates a database with specified backup storage redundancy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsADatabaseWithSpecifiedBackupStorageRedundancy(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("testdb")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.ZONE)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseCopyMode.json
+ */
+ /**
+ * Sample code: Creates a database as a copy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsADatabaseAsACopy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("dbcopy")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .withSku(new Sku().withName("S0").withTier("Standard"))
+ .withCreateMode(CreateMode.COPY)
+ .withSourceDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabasePITRMode.json
+ */
+ /**
+ * Sample code: Creates a database from PointInTimeRestore.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsADatabaseFromPointInTimeRestore(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("dbpitr")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE)
+ .withSourceDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb")
+ .withRestorePointInTime(OffsetDateTime.parse("2020-10-22T05:35:31.503Z"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseLedger.json
+ */
+ /**
+ * Sample code: Creates a database with ledger on.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsADatabaseWithLedgerOn(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("testdb")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .withIsLedgerOn(true)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseDefaultMode.json
+ */
+ /**
+ * Sample code: Creates a database with default mode.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsADatabaseWithDefaultMode(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("testdb")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .withSku(new Sku().withName("S0").withTier("Standard"))
+ .withCreateMode(CreateMode.DEFAULT)
+ .withCollation("SQL_Latin1_General_CP1_CI_AS")
+ .withMaxSizeBytes(1073741824L)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json
+ */
+ /**
+ * Sample code: Creates a VCore database by specifying service objective name.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsAVCoreDatabaseBySpecifyingServiceObjectiveName(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("testdb")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .withSku(new Sku().withName("BC").withFamily("Gen4").withCapacity(2))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseMin.json
+ */
+ /**
+ * Sample code: Creates a database with minimum number of parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsADatabaseWithMinimumNumberOfParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("testdb")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json
+ */
+ /**
+ * Sample code: Creates a VCore database by specifying sku name and capacity.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsAVCoreDatabaseBySpecifyingSkuNameAndCapacity(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("testdb")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .withSku(new Sku().withName("BC_Gen4").withCapacity(2))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseNamedReplica.json
+ */
+ /**
+ * Sample code: Creates a database as named replica secondary.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsADatabaseAsNamedReplicaSecondary(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("testdb")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .withSku(new Sku().withName("HS_Gen4").withTier("Hyperscale").withCapacity(2))
+ .withCreateMode(CreateMode.SECONDARY)
+ .withSourceDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/primarydb")
+ .withSecondaryType(SecondaryType.NAMED)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseSecondaryMode.json
+ */
+ /**
+ * Sample code: Creates a database as an on-line secondary.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsADatabaseAsAnOnLineSecondary(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .define("testdb")
+ .withRegion("southeastasia")
+ .withExistingServer("Default-SQL-SouthEastAsia", "testsvr")
+ .withSku(new Sku().withName("S0").withTier("Standard"))
+ .withCreateMode(CreateMode.SECONDARY)
+ .withSourceDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb")
+ .withSecondaryType(SecondaryType.GEO)
+ .create();
+ }
+}
+```
+
+### Databases_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases Delete. */
+public final class DatabasesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/DeleteDatabase.json
+ */
+ /**
+ * Sample code: Deletes a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deletesADatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databases().delete("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE);
+ }
+}
+```
+
+### Databases_Export
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ExportDatabaseDefinition;
+import com.azure.resourcemanager.sql.generated.models.NetworkIsolationSettings;
+import com.azure.resourcemanager.sql.generated.models.StorageKeyType;
+
+/** Samples for Databases Export. */
+public final class DatabasesExportSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ExportDatabase.json
+ */
+ /**
+ * Sample code: Exports a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void exportsADatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .export(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ "testdb",
+ new ExportDatabaseDefinition()
+ .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY)
+ .withStorageKey(
+ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==")
+ .withStorageUri("https://test.blob.core.windows.net/test.bacpac")
+ .withAdministratorLogin("login")
+ .withAdministratorLoginPassword("password")
+ .withAuthenticationType("Sql"),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ExportDatabaseWithNetworkIsolation.json
+ */
+ /**
+ * Sample code: Exports a database, using private link to communicate with SQL server and storage account.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void exportsADatabaseUsingPrivateLinkToCommunicateWithSQLServerAndStorageAccount(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .export(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ "testdb",
+ new ExportDatabaseDefinition()
+ .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY)
+ .withStorageKey(
+ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==")
+ .withStorageUri("https://test.blob.core.windows.net/test.bacpac")
+ .withAdministratorLogin("login")
+ .withAdministratorLoginPassword("password")
+ .withAuthenticationType("Sql")
+ .withNetworkIsolation(
+ new NetworkIsolationSettings()
+ .withStorageAccountResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink")
+ .withSqlServerResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")),
+ Context.NONE);
+ }
+}
+```
+
+### Databases_Failover
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ReplicaType;
+
+/** Samples for Databases Failover. */
+public final class DatabasesFailoverSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/FailoverDatabase.json
+ */
+ /**
+ * Sample code: Failover an database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void failoverAnDatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databases().failover("group1", "testServer", "testDatabase", ReplicaType.PRIMARY, Context.NONE);
+ }
+}
+```
+
+### Databases_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases Get. */
+public final class DatabasesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/GetVCoreDatabase.json
+ */
+ /**
+ * Sample code: Gets a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsADatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databases().getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE);
+ }
+}
+```
+
+### Databases_ImportMethod
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ImportExistingDatabaseDefinition;
+import com.azure.resourcemanager.sql.generated.models.NetworkIsolationSettings;
+import com.azure.resourcemanager.sql.generated.models.StorageKeyType;
+
+/** Samples for Databases ImportMethod. */
+public final class DatabasesImportMethodSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ImportDatabase.json
+ */
+ /**
+ * Sample code: Imports to an existing empty database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void importsToAnExistingEmptyDatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .importMethod(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ "testdb",
+ new ImportExistingDatabaseDefinition()
+ .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY)
+ .withStorageKey(
+ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==")
+ .withStorageUri("https://test.blob.core.windows.net/test.bacpac")
+ .withAdministratorLogin("login")
+ .withAdministratorLoginPassword("password")
+ .withAuthenticationType("Sql"),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ImportDatabaseWithNetworkIsolation.json
+ */
+ /**
+ * Sample code: Imports to an existing empty database, using private link to communicate with SQL server and storage
+ * account.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void importsToAnExistingEmptyDatabaseUsingPrivateLinkToCommunicateWithSQLServerAndStorageAccount(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .importMethod(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ "testdb",
+ new ImportExistingDatabaseDefinition()
+ .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY)
+ .withStorageKey(
+ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==")
+ .withStorageUri("https://test.blob.core.windows.net/test.bacpac")
+ .withAdministratorLogin("login")
+ .withAdministratorLoginPassword("password")
+ .withAuthenticationType("Sql")
+ .withNetworkIsolation(
+ new NetworkIsolationSettings()
+ .withStorageAccountResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink")
+ .withSqlServerResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")),
+ Context.NONE);
+ }
+}
+```
+
+### Databases_ListByElasticPool
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases ListByElasticPool. */
+public final class DatabasesListByElasticPoolSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListDatabasesByElasticPool.json
+ */
+ /**
+ * Sample code: Gets a list of databases in an elastic pool.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAListOfDatabasesInAnElasticPool(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databases().listByElasticPool("Default-SQL-SouthEastAsia", "testsvr", "pool1", Context.NONE);
+ }
+}
+```
+
+### Databases_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases ListByServer. */
+public final class DatabasesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListVCoreDatabasesByServer.json
+ */
+ /**
+ * Sample code: Gets a list of databases.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAListOfDatabases(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databases().listByServer("Default-SQL-SouthEastAsia", "testsvr", null, Context.NONE);
+ }
+}
+```
+
+### Databases_ListInaccessibleByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases ListInaccessibleByServer. */
+public final class DatabasesListInaccessibleByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json
+ */
+ /**
+ * Sample code: Gets a list of inaccessible databases in a logical server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAListOfInaccessibleDatabasesInALogicalServer(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databases().listInaccessibleByServer("Default-SQL-SouthEastAsia", "testsvr", Context.NONE);
+ }
+}
+```
+
+### Databases_ListMetricDefinitions
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases ListMetricDefinitions. */
+public final class DatabasesListMetricDefinitionsSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DatabaseMetricsDefinitionsList.json
+ */
+ /**
+ * Sample code: List database usage metrics.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabaseUsageMetrics(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databases().listMetricDefinitions("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", Context.NONE);
+ }
+}
+```
+
+### Databases_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases ListMetrics. */
+public final class DatabasesListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DatabaseMetricsListWithFilter.json
+ */
+ /**
+ * Sample code: List database usage metrics.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabaseUsageMetrics(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .listMetrics(
+ "sqlcrudtest-6730",
+ "sqlcrudtest-9007",
+ "3481",
+ "name/value eq 'cpu_percent' and timeGrain eq '00:10:00' and startTime eq '2017-06-02T18:35:00Z' and"
+ + " endTime eq '2017-06-02T18:55:00Z'",
+ Context.NONE);
+ }
+}
+```
+
+### Databases_Pause
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases Pause. */
+public final class DatabasesPauseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/PauseDatabase.json
+ */
+ /**
+ * Sample code: Pauses a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void pausesADatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databases().pause("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", Context.NONE);
+ }
+}
+```
+
+### Databases_Rename
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ResourceMoveDefinition;
+
+/** Samples for Databases Rename. */
+public final class DatabasesRenameSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/RenameDatabase.json
+ */
+ /**
+ * Sample code: Renames a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void renamesADatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .databases()
+ .renameWithResponse(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ "testdb",
+ new ResourceMoveDefinition()
+ .withId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/newtestdb"),
+ Context.NONE);
+ }
+}
+```
+
+### Databases_Resume
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases Resume. */
+public final class DatabasesResumeSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResumeDatabase.json
+ */
+ /**
+ * Sample code: Resumes a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void resumesADatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databases().resume("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", Context.NONE);
+ }
+}
+```
+
+### Databases_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.Database;
+import com.azure.resourcemanager.sql.generated.models.DatabaseLicenseType;
+import com.azure.resourcemanager.sql.generated.models.Sku;
+
+/** Samples for Databases Update. */
+public final class DatabasesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json
+ */
+ /**
+ * Sample code: Assigns maintenance window to a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void assignsMaintenanceWindowToADatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ Database resource =
+ manager
+ .databases()
+ .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withSku(new Sku().withName("BC_Gen5_4"))
+ .withMaintenanceConfigurationId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1")
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json
+ */
+ /**
+ * Sample code: Resets maintenance window of a database to default.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void resetsMaintenanceWindowOfADatabaseToDefault(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ Database resource =
+ manager
+ .databases()
+ .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withSku(new Sku().withName("BC_Gen5_4"))
+ .withMaintenanceConfigurationId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default")
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/PatchVCoreDatabase.json
+ */
+ /**
+ * Sample code: Updates a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updatesADatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ Database resource =
+ manager
+ .databases()
+ .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withSku(new Sku().withName("BC_Gen4_4"))
+ .withMaxSizeBytes(1073741824L)
+ .withLicenseType(DatabaseLicenseType.LICENSE_INCLUDED)
+ .apply();
+ }
+}
+```
+
+### Databases_UpgradeDataWarehouse
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases UpgradeDataWarehouse. */
+public final class DatabasesUpgradeDataWarehouseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/UpgradeDataWarehouse.json
+ */
+ /**
+ * Sample code: Upgrades a data warehouse.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void upgradesADataWarehouse(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.databases().upgradeDataWarehouse("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", Context.NONE);
+ }
+}
+```
+
+### DeletedServers_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DeletedServers Get. */
+public final class DeletedServersGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerGet.json
+ */
+ /**
+ * Sample code: Get deleted server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getDeletedServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.deletedServers().getWithResponse("japaneast", "sqlcrudtest-d-1414", Context.NONE);
+ }
+}
+```
+
+### DeletedServers_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DeletedServers List. */
+public final class DeletedServersListSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerListBySubscription.json
+ */
+ /**
+ * Sample code: List deleted servers in a subscription.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDeletedServersInASubscription(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.deletedServers().list(Context.NONE);
+ }
+}
+```
+
+### DeletedServers_ListByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DeletedServers ListByLocation. */
+public final class DeletedServersListByLocationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerList.json
+ */
+ /**
+ * Sample code: List deleted servers.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDeletedServers(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.deletedServers().listByLocation("japaneast", Context.NONE);
+ }
+}
+```
+
+### DeletedServers_Recover
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DeletedServers Recover. */
+public final class DeletedServersRecoverSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerRecover.json
+ */
+ /**
+ * Sample code: Recover deleted server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void recoverDeletedServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.deletedServers().recover("japaneast", "sqlcrudtest-d-1414", Context.NONE);
+ }
+}
+```
+
+### ElasticPoolActivities_ListByElasticPool
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ElasticPoolActivities ListByElasticPool. */
+public final class ElasticPoolActivitiesListByElasticPoolSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ElasticPoolActivityList.json
+ */
+ /**
+ * Sample code: List Elastic pool activity.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listElasticPoolActivity(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.elasticPoolActivities().listByElasticPool("sqlcrudtest-4291", "sqlcrudtest-6574", "8749", Context.NONE);
+ }
+}
+```
+
+### ElasticPoolDatabaseActivities_ListByElasticPool
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ElasticPoolDatabaseActivities ListByElasticPool. */
+public final class ElasticPoolDatabaseActivitiesListByElasticPoolSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ElasticPoolDatabaseActivityList.json
+ */
+ /**
+ * Sample code: List elastic pool database activity.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listElasticPoolDatabaseActivity(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .elasticPoolDatabaseActivities()
+ .listByElasticPool("sqlcrudtest-4673", "sqlcrudtest-603", "7537", Context.NONE);
+ }
+}
+```
+
+### ElasticPoolOperations_Cancel
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for ElasticPoolOperations Cancel. */
+public final class ElasticPoolOperationsCancelSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelElasticPoolOperation.json
+ */
+ /**
+ * Sample code: Cancel the elastic pool management operation.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void cancelTheElasticPoolManagementOperation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .elasticPoolOperations()
+ .cancelWithResponse(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-6661",
+ "testpool",
+ UUID.fromString("f779414b-e748-4925-8cfe-c8598f7660ae"),
+ Context.NONE);
+ }
+}
+```
+
+### ElasticPoolOperations_ListByElasticPool
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ElasticPoolOperations ListByElasticPool. */
+public final class ElasticPoolOperationsListByElasticPoolSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListElasticPoolOperations.json
+ */
+ /**
+ * Sample code: List the elastic pool management operations.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listTheElasticPoolManagementOperations(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .elasticPoolOperations()
+ .listByElasticPool("sqlcrudtestgroup", "sqlcrudtestserver", "testpool", Context.NONE);
+ }
+}
+```
+
+### ElasticPools_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.ElasticPoolPerDatabaseSettings;
+import com.azure.resourcemanager.sql.generated.models.Sku;
+
+/** Samples for ElasticPools CreateOrUpdate. */
+public final class ElasticPoolsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ElasticPoolCreateOrUpdateMax.json
+ */
+ /**
+ * Sample code: Create or update elastic pool with all parameter.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateElasticPoolWithAllParameter(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .elasticPools()
+ .define("sqlcrudtest-8102")
+ .withRegion("Japan East")
+ .withExistingServer("sqlcrudtest-2369", "sqlcrudtest-8069")
+ .withSku(new Sku().withName("GP_Gen4_2").withTier("GeneralPurpose").withCapacity(2))
+ .withPerDatabaseSettings(new ElasticPoolPerDatabaseSettings().withMinCapacity(0.25).withMaxCapacity(2.0))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json
+ */
+ /**
+ * Sample code: Create or update elastic pool with maintenance configuration parameter.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateElasticPoolWithMaintenanceConfigurationParameter(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .elasticPools()
+ .define("sqlcrudtest-8102")
+ .withRegion("Japan East")
+ .withExistingServer("sqlcrudtest-2369", "sqlcrudtest-8069")
+ .withMaintenanceConfigurationId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ElasticPoolCreateOrUpdateMin.json
+ */
+ /**
+ * Sample code: Create or update elastic pool with minimum parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateElasticPoolWithMinimumParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .elasticPools()
+ .define("sqlcrudtest-8102")
+ .withRegion("Japan East")
+ .withExistingServer("sqlcrudtest-2369", "sqlcrudtest-8069")
+ .create();
+ }
+}
+```
+
+### ElasticPools_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ElasticPools Delete. */
+public final class ElasticPoolsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ElasticPoolDelete.json
+ */
+ /**
+ * Sample code: Delete an elastic pool.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAnElasticPool(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.elasticPools().delete("sqlcrudtest-3129", "sqlcrudtest-228", "sqlcrudtest-3851", Context.NONE);
+ }
+}
+```
+
+### ElasticPools_Failover
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ElasticPools Failover. */
+public final class ElasticPoolsFailoverSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverElasticPool.json
+ */
+ /**
+ * Sample code: Failover an elastic pool.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void failoverAnElasticPool(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.elasticPools().failover("group1", "testServer", "testElasticPool", Context.NONE);
+ }
+}
+```
+
+### ElasticPools_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ElasticPools Get. */
+public final class ElasticPoolsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ElasticPoolGet.json
+ */
+ /**
+ * Sample code: Get an elastic pool.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAnElasticPool(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .elasticPools()
+ .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", Context.NONE);
+ }
+}
+```
+
+### ElasticPools_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ElasticPools ListByServer. */
+public final class ElasticPoolsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ElasticPoolListByServer.json
+ */
+ /**
+ * Sample code: Get all elastic pools in a server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllElasticPoolsInAServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.elasticPools().listByServer("sqlcrudtest-2369", "sqlcrudtest-8069", null, Context.NONE);
+ }
+}
+```
+
+### ElasticPools_ListMetricDefinitions
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ElasticPools ListMetricDefinitions. */
+public final class ElasticPoolsListMetricDefinitionsSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ElasticPoolMetricsDefinitionsList.json
+ */
+ /**
+ * Sample code: List database usage metrics.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabaseUsageMetrics(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.elasticPools().listMetricDefinitions("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", Context.NONE);
+ }
+}
+```
+
+### ElasticPools_ListMetrics
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ElasticPools ListMetrics. */
+public final class ElasticPoolsListMetricsSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ElasticPoolMetricsListWithFilter.json
+ */
+ /**
+ * Sample code: List database usage metrics.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabaseUsageMetrics(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .elasticPools()
+ .listMetrics(
+ "sqlcrudtest-6730",
+ "sqlcrudtest-9007",
+ "3481",
+ "name/value eq 'cpu_percent' and timeGrain eq '00:10:00' and startTime eq '2017-06-02T18:35:00Z' and"
+ + " endTime eq '2017-06-02T18:55:00Z'",
+ Context.NONE);
+ }
+}
+```
+
+### ElasticPools_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ElasticPool;
+import com.azure.resourcemanager.sql.generated.models.ElasticPoolLicenseType;
+import com.azure.resourcemanager.sql.generated.models.ElasticPoolPerDatabaseSettings;
+import com.azure.resourcemanager.sql.generated.models.Sku;
+
+/** Samples for ElasticPools Update. */
+public final class ElasticPoolsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ElasticPoolUpdateMax.json
+ */
+ /**
+ * Sample code: Update an elastic pool with all parameter.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAnElasticPoolWithAllParameter(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ElasticPool resource =
+ manager
+ .elasticPools()
+ .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withSku(new Sku().withName("BC_Gen4").withTier("BusinessCritical").withCapacity(2))
+ .withPerDatabaseSettings(new ElasticPoolPerDatabaseSettings().withMinCapacity(0.25).withMaxCapacity(1.0))
+ .withZoneRedundant(true)
+ .withLicenseType(ElasticPoolLicenseType.LICENSE_INCLUDED)
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ElasticPoolUpdateMin.json
+ */
+ /**
+ * Sample code: Update an elastic pool with minimum parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAnElasticPoolWithMinimumParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ElasticPool resource =
+ manager
+ .elasticPools()
+ .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", Context.NONE)
+ .getValue();
+ resource.update().apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json
+ */
+ /**
+ * Sample code: Assigns maintenance configuration to an elastic pool.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void assignsMaintenanceConfigurationToAnElasticPool(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ElasticPool resource =
+ manager
+ .elasticPools()
+ .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withMaintenanceConfigurationId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1")
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json
+ */
+ /**
+ * Sample code: Resets maintenance configuration of an elastic pool to default.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void resetsMaintenanceConfigurationOfAnElasticPoolToDefault(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ElasticPool resource =
+ manager
+ .elasticPools()
+ .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withMaintenanceConfigurationId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default")
+ .apply();
+ }
+}
+```
+
+### EncryptionProtectors_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.EncryptionProtector;
+import com.azure.resourcemanager.sql.generated.models.EncryptionProtectorName;
+import com.azure.resourcemanager.sql.generated.models.ServerKeyType;
+
+/** Samples for EncryptionProtectors CreateOrUpdate. */
+public final class EncryptionProtectorsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json
+ */
+ /**
+ * Sample code: Update the encryption protector to key vault.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheEncryptionProtectorToKeyVault(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ EncryptionProtector resource =
+ manager
+ .encryptionProtectors()
+ .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withServerKeyName("someVault_someKey_01234567890123456789012345678901")
+ .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT)
+ .withAutoRotationEnabled(false)
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json
+ */
+ /**
+ * Sample code: Update the encryption protector to service managed.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheEncryptionProtectorToServiceManaged(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ EncryptionProtector resource =
+ manager
+ .encryptionProtectors()
+ .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE)
+ .getValue();
+ resource.update().withServerKeyName("ServiceManaged").withServerKeyType(ServerKeyType.SERVICE_MANAGED).apply();
+ }
+}
+```
+
+### EncryptionProtectors_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.EncryptionProtectorName;
+
+/** Samples for EncryptionProtectors Get. */
+public final class EncryptionProtectorsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorGet.json
+ */
+ /**
+ * Sample code: Get the encryption protector.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheEncryptionProtector(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .encryptionProtectors()
+ .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE);
+ }
+}
+```
+
+### EncryptionProtectors_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for EncryptionProtectors ListByServer. */
+public final class EncryptionProtectorsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorList.json
+ */
+ /**
+ * Sample code: List encryption protectors by server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listEncryptionProtectorsByServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.encryptionProtectors().listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE);
+ }
+}
+```
+
+### EncryptionProtectors_Revalidate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.EncryptionProtectorName;
+
+/** Samples for EncryptionProtectors Revalidate. */
+public final class EncryptionProtectorsRevalidateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorRevalidate.json
+ */
+ /**
+ * Sample code: Revalidates the encryption protector.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void revalidatesTheEncryptionProtector(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .encryptionProtectors()
+ .revalidate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE);
+ }
+}
+```
+
+### ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.BlobAuditingPolicyState;
+import java.util.Arrays;
+import java.util.UUID;
+
+/** Samples for ExtendedDatabaseBlobAuditingPolicies CreateOrUpdate. */
+public final class ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json
+ */
+ /**
+ * Sample code: Create or update an extended database's blob auditing policy with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .extendedDatabaseBlobAuditingPolicies()
+ .define()
+ .withExistingDatabase("blobauditingtest-4799", "blobauditingtest-6440", "testdb")
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json
+ */
+ /**
+ * Sample code: Create or update an extended database's blob auditing policy with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .extendedDatabaseBlobAuditingPolicies()
+ .define()
+ .withExistingDatabase("blobauditingtest-4799", "blobauditingtest-6440", "testdb")
+ .withPredicateExpression("statement = 'select 1'")
+ .withRetentionDays(6)
+ .withAuditActionsAndGroups(
+ Arrays
+ .asList(
+ "DATABASE_LOGOUT_GROUP",
+ "DATABASE_ROLE_MEMBER_CHANGE_GROUP",
+ "UPDATE on database::TestDatabaseName by public"))
+ .withIsStorageSecondaryKeyInUse(false)
+ .withIsAzureMonitorTargetEnabled(true)
+ .withQueueDelayMs(4000)
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json
+ */
+ /**
+ * Sample code: Create or update an extended database's azure monitor auditing policy with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateAnExtendedDatabaseSAzureMonitorAuditingPolicyWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .extendedDatabaseBlobAuditingPolicies()
+ .define()
+ .withExistingDatabase("blobauditingtest-4799", "blobauditingtest-6440", "testdb")
+ .withIsAzureMonitorTargetEnabled(true)
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .create();
+ }
+}
+```
+
+### ExtendedDatabaseBlobAuditingPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ExtendedDatabaseBlobAuditingPolicies Get. */
+public final class ExtendedDatabaseBlobAuditingPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json
+ */
+ /**
+ * Sample code: Get an extended database's blob auditing policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAnExtendedDatabaseSBlobAuditingPolicy(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .extendedDatabaseBlobAuditingPolicies()
+ .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE);
+ }
+}
+```
+
+### ExtendedDatabaseBlobAuditingPolicies_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ExtendedDatabaseBlobAuditingPolicies ListByDatabase. */
+public final class ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseExtendedAuditingSettingsList.json
+ */
+ /**
+ * Sample code: List extended auditing settings of a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listExtendedAuditingSettingsOfADatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .extendedDatabaseBlobAuditingPolicies()
+ .listByDatabase("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE);
+ }
+}
+```
+
+### ExtendedServerBlobAuditingPolicies_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.BlobAuditingPolicyState;
+import com.azure.resourcemanager.sql.generated.models.ExtendedServerBlobAuditingPolicy;
+import java.util.Arrays;
+import java.util.UUID;
+
+/** Samples for ExtendedServerBlobAuditingPolicies CreateOrUpdate. */
+public final class ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json
+ */
+ /**
+ * Sample code: Update a server's extended blob auditing policy with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAServerSExtendedBlobAuditingPolicyWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ExtendedServerBlobAuditingPolicy resource =
+ manager
+ .extendedServerBlobAuditingPolicies()
+ .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json
+ */
+ /**
+ * Sample code: Update a server's extended blob auditing policy with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAServerSExtendedBlobAuditingPolicyWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ExtendedServerBlobAuditingPolicy resource =
+ manager
+ .extendedServerBlobAuditingPolicies()
+ .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withPredicateExpression("object_name = 'SensitiveData'")
+ .withRetentionDays(6)
+ .withAuditActionsAndGroups(
+ Arrays
+ .asList(
+ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP",
+ "FAILED_DATABASE_AUTHENTICATION_GROUP",
+ "BATCH_COMPLETED_GROUP"))
+ .withIsStorageSecondaryKeyInUse(false)
+ .withIsAzureMonitorTargetEnabled(true)
+ .withQueueDelayMs(4000)
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000"))
+ .apply();
+ }
+}
+```
+
+### ExtendedServerBlobAuditingPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ExtendedServerBlobAuditingPolicies Get. */
+public final class ExtendedServerBlobAuditingPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedServerBlobAuditingGet.json
+ */
+ /**
+ * Sample code: Get a server's blob extended auditing policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAServerSBlobExtendedAuditingPolicy(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .extendedServerBlobAuditingPolicies()
+ .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE);
+ }
+}
+```
+
+### ExtendedServerBlobAuditingPolicies_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ExtendedServerBlobAuditingPolicies ListByServer. */
+public final class ExtendedServerBlobAuditingPoliciesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerExtendedAuditingSettingsList.json
+ */
+ /**
+ * Sample code: List extended auditing settings of a server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listExtendedAuditingSettingsOfAServer(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .extendedServerBlobAuditingPolicies()
+ .listByServer("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE);
+ }
+}
+```
+
+### FailoverGroups_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.FailoverGroupReadOnlyEndpoint;
+import com.azure.resourcemanager.sql.generated.models.FailoverGroupReadWriteEndpoint;
+import com.azure.resourcemanager.sql.generated.models.PartnerInfo;
+import com.azure.resourcemanager.sql.generated.models.ReadOnlyEndpointFailoverPolicy;
+import com.azure.resourcemanager.sql.generated.models.ReadWriteEndpointFailoverPolicy;
+import java.util.Arrays;
+
+/** Samples for FailoverGroups CreateOrUpdate. */
+public final class FailoverGroupsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Create failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .failoverGroups()
+ .define("failover-group-test-3")
+ .withExistingServer("Default", "failover-group-primary-server")
+ .withReadWriteEndpoint(
+ new FailoverGroupReadWriteEndpoint()
+ .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC)
+ .withFailoverWithDataLossGracePeriodMinutes(480))
+ .withReadOnlyEndpoint(
+ new FailoverGroupReadOnlyEndpoint().withFailoverPolicy(ReadOnlyEndpointFailoverPolicy.DISABLED))
+ .withPartnerServers(
+ Arrays
+ .asList(
+ new PartnerInfo()
+ .withId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server")))
+ .withDatabases(
+ Arrays
+ .asList(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2"))
+ .create();
+ }
+}
+```
+
+### FailoverGroups_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FailoverGroups Delete. */
+public final class FailoverGroupsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupDelete.json
+ */
+ /**
+ * Sample code: Delete failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .failoverGroups()
+ .delete("Default", "failover-group-primary-server", "failover-group-test-1", Context.NONE);
+ }
+}
+```
+
+### FailoverGroups_Failover
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FailoverGroups Failover. */
+public final class FailoverGroupsFailoverSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupFailover.json
+ */
+ /**
+ * Sample code: Planned failover of a failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void plannedFailoverOfAFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .failoverGroups()
+ .failover("Default", "failover-group-secondary-server", "failover-group-test-3", Context.NONE);
+ }
+}
+```
+
+### FailoverGroups_ForceFailoverAllowDataLoss
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FailoverGroups ForceFailoverAllowDataLoss. */
+public final class FailoverGroupsForceFailoverAllowDataLossSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json
+ */
+ /**
+ * Sample code: Forced failover of a failover group allowing data loss.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void forcedFailoverOfAFailoverGroupAllowingDataLoss(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .failoverGroups()
+ .forceFailoverAllowDataLoss(
+ "Default", "failover-group-secondary-server", "failover-group-test-3", Context.NONE);
+ }
+}
+```
+
+### FailoverGroups_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FailoverGroups Get. */
+public final class FailoverGroupsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupGet.json
+ */
+ /**
+ * Sample code: Get failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .failoverGroups()
+ .getWithResponse("Default", "failover-group-primary-server", "failover-group-test", Context.NONE);
+ }
+}
+```
+
+### FailoverGroups_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FailoverGroups ListByServer. */
+public final class FailoverGroupsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupList.json
+ */
+ /**
+ * Sample code: List failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.failoverGroups().listByServer("Default", "failover-group-primary-server", Context.NONE);
+ }
+}
+```
+
+### FailoverGroups_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.FailoverGroup;
+import com.azure.resourcemanager.sql.generated.models.FailoverGroupReadWriteEndpoint;
+import com.azure.resourcemanager.sql.generated.models.ReadWriteEndpointFailoverPolicy;
+import java.util.Arrays;
+
+/** Samples for FailoverGroups Update. */
+public final class FailoverGroupsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupUpdate.json
+ */
+ /**
+ * Sample code: Update failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ FailoverGroup resource =
+ manager
+ .failoverGroups()
+ .getWithResponse("Default", "failover-group-primary-server", "failover-group-test-1", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withReadWriteEndpoint(
+ new FailoverGroupReadWriteEndpoint()
+ .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC)
+ .withFailoverWithDataLossGracePeriodMinutes(120))
+ .withDatabases(
+ Arrays
+ .asList(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1"))
+ .apply();
+ }
+}
+```
+
+### FirewallRules_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.FirewallRule;
+
+/** Samples for FirewallRules CreateOrUpdate. */
+public final class FirewallRulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleCreate.json
+ */
+ /**
+ * Sample code: Create a firewall rule max/min.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAFirewallRuleMaxMin(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .firewallRules()
+ .define("firewallrulecrudtest-5370")
+ .withExistingServer("firewallrulecrudtest-12", "firewallrulecrudtest-6285")
+ .withStartIpAddress("0.0.0.3")
+ .withEndIpAddress("0.0.0.3")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleUpdate.json
+ */
+ /**
+ * Sample code: Update a firewall rule max/min.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAFirewallRuleMaxMin(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ FirewallRule resource =
+ manager
+ .firewallRules()
+ .getWithResponse(
+ "firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-3927", Context.NONE)
+ .getValue();
+ resource.update().withStartIpAddress("0.0.0.1").withEndIpAddress("0.0.0.1").apply();
+ }
+}
+```
+
+### FirewallRules_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FirewallRules Delete. */
+public final class FirewallRulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleDelete.json
+ */
+ /**
+ * Sample code: Delete a firewall rule.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAFirewallRule(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .firewallRules()
+ .deleteWithResponse(
+ "firewallrulecrudtest-9886", "firewallrulecrudtest-2368", "firewallrulecrudtest-7011", Context.NONE);
+ }
+}
+```
+
+### FirewallRules_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FirewallRules Get. */
+public final class FirewallRulesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleGet.json
+ */
+ /**
+ * Sample code: Get Firewall Rule.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getFirewallRule(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .firewallRules()
+ .getWithResponse(
+ "firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-2304", Context.NONE);
+ }
+}
+```
+
+### FirewallRules_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FirewallRules ListByServer. */
+public final class FirewallRulesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleList.json
+ */
+ /**
+ * Sample code: List Firewall Rules.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listFirewallRules(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.firewallRules().listByServer("firewallrulecrudtest-12", "firewallrulecrudtest-6285", Context.NONE);
+ }
+}
+```
+
+### FirewallRules_Replace
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.FirewallRuleInner;
+import com.azure.resourcemanager.sql.generated.models.FirewallRuleList;
+import java.util.Arrays;
+
+/** Samples for FirewallRules Replace. */
+public final class FirewallRulesReplaceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleReplace.json
+ */
+ /**
+ * Sample code: Replace firewall rules.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void replaceFirewallRules(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .firewallRules()
+ .replaceWithResponse(
+ "firewallrulecrudtest-12",
+ "firewallrulecrudtest-6285",
+ new FirewallRuleList()
+ .withValues(
+ Arrays
+ .asList(
+ new FirewallRuleInner()
+ .withName("firewallrulecrudtest-5370 ")
+ .withStartIpAddress("0.0.0.0")
+ .withEndIpAddress("100.0.0.0"))),
+ Context.NONE);
+ }
+}
+```
+
+### GeoBackupPolicies_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.GeoBackupPolicy;
+import com.azure.resourcemanager.sql.generated.models.GeoBackupPolicyName;
+import com.azure.resourcemanager.sql.generated.models.GeoBackupPolicyState;
+
+/** Samples for GeoBackupPolicies CreateOrUpdate. */
+public final class GeoBackupPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Update geo backup policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateGeoBackupPolicy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ GeoBackupPolicy resource =
+ manager
+ .geoBackupPolicies()
+ .getWithResponse(
+ "sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", GeoBackupPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource.update().withState(GeoBackupPolicyState.ENABLED).apply();
+ }
+}
+```
+
+### GeoBackupPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.GeoBackupPolicyName;
+
+/** Samples for GeoBackupPolicies Get. */
+public final class GeoBackupPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesGet.json
+ */
+ /**
+ * Sample code: Get geo backup policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getGeoBackupPolicy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .geoBackupPolicies()
+ .getWithResponse(
+ "sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", GeoBackupPolicyName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### GeoBackupPolicies_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GeoBackupPolicies ListByDatabase. */
+public final class GeoBackupPoliciesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesList.json
+ */
+ /**
+ * Sample code: List geo backup policies.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listGeoBackupPolicies(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.geoBackupPolicies().listByDatabase("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", Context.NONE);
+ }
+}
+```
+
+### InstanceFailoverGroups_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.InstanceFailoverGroupReadOnlyEndpoint;
+import com.azure.resourcemanager.sql.generated.models.InstanceFailoverGroupReadWriteEndpoint;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstancePairInfo;
+import com.azure.resourcemanager.sql.generated.models.PartnerRegionInfo;
+import com.azure.resourcemanager.sql.generated.models.ReadOnlyEndpointFailoverPolicy;
+import com.azure.resourcemanager.sql.generated.models.ReadWriteEndpointFailoverPolicy;
+import java.util.Arrays;
+
+/** Samples for InstanceFailoverGroups CreateOrUpdate. */
+public final class InstanceFailoverGroupsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Create failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .instanceFailoverGroups()
+ .define("failover-group-test-3")
+ .withExistingLocation("Default", "Japan East")
+ .withReadWriteEndpoint(
+ new InstanceFailoverGroupReadWriteEndpoint()
+ .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC)
+ .withFailoverWithDataLossGracePeriodMinutes(480))
+ .withReadOnlyEndpoint(
+ new InstanceFailoverGroupReadOnlyEndpoint().withFailoverPolicy(ReadOnlyEndpointFailoverPolicy.DISABLED))
+ .withPartnerRegions(Arrays.asList(new PartnerRegionInfo().withLocation("Japan West")))
+ .withManagedInstancePairs(
+ Arrays
+ .asList(
+ new ManagedInstancePairInfo()
+ .withPrimaryManagedInstanceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance")
+ .withPartnerManagedInstanceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance")))
+ .create();
+ }
+}
+```
+
+### InstanceFailoverGroups_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for InstanceFailoverGroups Delete. */
+public final class InstanceFailoverGroupsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupDelete.json
+ */
+ /**
+ * Sample code: Delete failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.instanceFailoverGroups().delete("Default", "Japan East", "failover-group-test-1", Context.NONE);
+ }
+}
+```
+
+### InstanceFailoverGroups_Failover
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for InstanceFailoverGroups Failover. */
+public final class InstanceFailoverGroupsFailoverSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupFailover.json
+ */
+ /**
+ * Sample code: Planned failover of a failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void plannedFailoverOfAFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.instanceFailoverGroups().failover("Default", "Japan West", "failover-group-test-3", Context.NONE);
+ }
+}
+```
+
+### InstanceFailoverGroups_ForceFailoverAllowDataLoss
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for InstanceFailoverGroups ForceFailoverAllowDataLoss. */
+public final class InstanceFailoverGroupsForceFailoverAllowDataLossSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json
+ */
+ /**
+ * Sample code: Forced failover of a failover group allowing data loss.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void forcedFailoverOfAFailoverGroupAllowingDataLoss(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .instanceFailoverGroups()
+ .forceFailoverAllowDataLoss("Default", "Japan West", "failover-group-test-3", Context.NONE);
+ }
+}
+```
+
+### InstanceFailoverGroups_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for InstanceFailoverGroups Get. */
+public final class InstanceFailoverGroupsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupGet.json
+ */
+ /**
+ * Sample code: Get failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.instanceFailoverGroups().getWithResponse("Default", "Japan East", "failover-group-test", Context.NONE);
+ }
+}
+```
+
+### InstanceFailoverGroups_ListByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for InstanceFailoverGroups ListByLocation. */
+public final class InstanceFailoverGroupsListByLocationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupList.json
+ */
+ /**
+ * Sample code: List failover group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listFailoverGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.instanceFailoverGroups().listByLocation("Default", "Japan East", Context.NONE);
+ }
+}
+```
+
+### InstancePools_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.InstancePoolLicenseType;
+import com.azure.resourcemanager.sql.generated.models.Sku;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for InstancePools CreateOrUpdate. */
+public final class InstancePoolsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateInstancePoolMax.json
+ */
+ /**
+ * Sample code: Create an instance pool with all properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAnInstancePoolWithAllProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .instancePools()
+ .define("testIP")
+ .withRegion("japaneast")
+ .withExistingResourceGroup("group1")
+ .withTags(mapOf("a", "b"))
+ .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose").withFamily("Gen5"))
+ .withSubnetId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1")
+ .withVCores(8)
+ .withLicenseType(InstancePoolLicenseType.LICENSE_INCLUDED)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateInstancePoolMin.json
+ */
+ /**
+ * Sample code: Create an instance pool with min properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAnInstancePoolWithMinProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .instancePools()
+ .define("testIP")
+ .withRegion("japaneast")
+ .withExistingResourceGroup("group1")
+ .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose").withFamily("Gen5"))
+ .withSubnetId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1")
+ .withVCores(8)
+ .withLicenseType(InstancePoolLicenseType.LICENSE_INCLUDED)
+ .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;
+ }
+}
+```
+
+### InstancePools_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for InstancePools Delete. */
+public final class InstancePoolsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteInstancePool.json
+ */
+ /**
+ * Sample code: Delete an instance pool.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAnInstancePool(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.instancePools().delete("group1", "testIP", Context.NONE);
+ }
+}
+```
+
+### InstancePools_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for InstancePools GetByResourceGroup. */
+public final class InstancePoolsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetInstancePool.json
+ */
+ /**
+ * Sample code: Get an instance pool.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAnInstancePool(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.instancePools().getByResourceGroupWithResponse("group1", "testIP", Context.NONE);
+ }
+}
+```
+
+### InstancePools_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for InstancePools List. */
+public final class InstancePoolsListSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListInstancePoolsBySubscriptionId.json
+ */
+ /**
+ * Sample code: List instance pools in the subscription.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listInstancePoolsInTheSubscription(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.instancePools().list(Context.NONE);
+ }
+}
+```
+
+### InstancePools_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for InstancePools ListByResourceGroup. */
+public final class InstancePoolsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListInstancePoolsByResourceGroup.json
+ */
+ /**
+ * Sample code: List instance pools by resource group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listInstancePoolsByResourceGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.instancePools().listByResourceGroup("group1", Context.NONE);
+ }
+}
+```
+
+### InstancePools_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.InstancePool;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for InstancePools Update. */
+public final class InstancePoolsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PatchInstancePool.json
+ */
+ /**
+ * Sample code: Patch an instance pool.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void patchAnInstancePool(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ InstancePool resource =
+ manager.instancePools().getByResourceGroupWithResponse("group1", "testIP", Context.NONE).getValue();
+ resource.update().withTags(mapOf("x", "y")).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;
+ }
+}
+```
+
+### JobAgents_CreateOrUpdate
+
+```java
+/** Samples for JobAgents CreateOrUpdate. */
+public final class JobAgentsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobAgent.json
+ */
+ /**
+ * Sample code: Create or update a job agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateAJobAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobAgents()
+ .define("agent1")
+ .withRegion("southeastasia")
+ .withExistingServer("group1", "server1")
+ .withDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1")
+ .create();
+ }
+}
+```
+
+### JobAgents_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobAgents Delete. */
+public final class JobAgentsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobAgent.json
+ */
+ /**
+ * Sample code: Delete a job agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAJobAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobAgents().delete("group1", "server1", "agent1", Context.NONE);
+ }
+}
+```
+
+### JobAgents_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobAgents Get. */
+public final class JobAgentsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobAgent.json
+ */
+ /**
+ * Sample code: Get a job agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAJobAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobAgents().getWithResponse("group1", "server1", "agent1", Context.NONE);
+ }
+}
+```
+
+### JobAgents_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobAgents ListByServer. */
+public final class JobAgentsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobAgentsByServer.json
+ */
+ /**
+ * Sample code: List job agents in a server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listJobAgentsInAServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobAgents().listByServer("group1", "server1", Context.NONE);
+ }
+}
+```
+
+### JobAgents_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.JobAgent;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for JobAgents Update. */
+public final class JobAgentsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateJobAgent.json
+ */
+ /**
+ * Sample code: Update a job agent's tags.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAJobAgentSTags(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ JobAgent resource = manager.jobAgents().getWithResponse("group1", "server1", "agent1", Context.NONE).getValue();
+ resource.update().withTags(mapOf("mytag1", "myvalue1")).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;
+ }
+}
+```
+
+### JobCredentials_CreateOrUpdate
+
+```java
+/** Samples for JobCredentials CreateOrUpdate. */
+public final class JobCredentialsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobCredential.json
+ */
+ /**
+ * Sample code: Create or update a credential.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateACredential(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobCredentials()
+ .define("cred1")
+ .withExistingJobAgent("group1", "server1", "agent1")
+ .withUsername("myuser")
+ .withPassword("")
+ .create();
+ }
+}
+```
+
+### JobCredentials_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobCredentials Delete. */
+public final class JobCredentialsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobCredential.json
+ */
+ /**
+ * Sample code: Delete a credential.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteACredential(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobCredentials().deleteWithResponse("group1", "server1", "agent1", "cred1", Context.NONE);
+ }
+}
+```
+
+### JobCredentials_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobCredentials Get. */
+public final class JobCredentialsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobCredential.json
+ */
+ /**
+ * Sample code: Get a credential.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getACredential(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobCredentials().getWithResponse("group1", "server1", "agent1", "cred1", Context.NONE);
+ }
+}
+```
+
+### JobCredentials_ListByAgent
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobCredentials ListByAgent. */
+public final class JobCredentialsListByAgentSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobCredentialsByAgent.json
+ */
+ /**
+ * Sample code: List credentials in a job agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listCredentialsInAJobAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobCredentials().listByAgent("group1", "server1", "agent1", Context.NONE);
+ }
+}
+```
+
+### JobExecutions_Cancel
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for JobExecutions Cancel. */
+public final class JobExecutionsCancelSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelJobExecution.json
+ */
+ /**
+ * Sample code: Cancel a job execution.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void cancelAJobExecution(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobExecutions()
+ .cancelWithResponse(
+ "group1",
+ "server1",
+ "agent1",
+ "job1",
+ UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"),
+ Context.NONE);
+ }
+}
+```
+
+### JobExecutions_Create
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobExecutions Create. */
+public final class JobExecutionsCreateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateJobExecution.json
+ */
+ /**
+ * Sample code: Start a job execution.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void startAJobExecution(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobExecutions().create("group1", "server1", "agent1", "job1", Context.NONE);
+ }
+}
+```
+
+### JobExecutions_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for JobExecutions CreateOrUpdate. */
+public final class JobExecutionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobExecution.json
+ */
+ /**
+ * Sample code: Create job execution.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createJobExecution(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobExecutions()
+ .createOrUpdate(
+ "group1",
+ "server1",
+ "agent1",
+ "job1",
+ UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"),
+ Context.NONE);
+ }
+}
+```
+
+### JobExecutions_Get
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for JobExecutions Get. */
+public final class JobExecutionsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecution.json
+ */
+ /**
+ * Sample code: Get a job execution.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAJobExecution(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobExecutions()
+ .getWithResponse(
+ "group1",
+ "server1",
+ "agent1",
+ "job1",
+ UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"),
+ Context.NONE);
+ }
+}
+```
+
+### JobExecutions_ListByAgent
+
+```java
+import com.azure.core.util.Context;
+import java.time.OffsetDateTime;
+
+/** Samples for JobExecutions ListByAgent. */
+public final class JobExecutionsListByAgentSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByAgent.json
+ */
+ /**
+ * Sample code: List all job executions in a job agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listAllJobExecutionsInAJobAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobExecutions()
+ .listByAgent("group1", "server1", "agent1", null, null, null, null, null, null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByAgentWithFilter.json
+ */
+ /**
+ * Sample code: List all job executions in a job agent with filtering.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listAllJobExecutionsInAJobAgentWithFiltering(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobExecutions()
+ .listByAgent(
+ "group1",
+ "server1",
+ "agent1",
+ OffsetDateTime.parse("2017-03-21T19:00:00Z"),
+ OffsetDateTime.parse("2017-03-21T19:05:00Z"),
+ OffsetDateTime.parse("2017-03-21T19:20:00Z"),
+ OffsetDateTime.parse("2017-03-21T19:25:00Z"),
+ false,
+ null,
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### JobExecutions_ListByJob
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobExecutions ListByJob. */
+public final class JobExecutionsListByJobSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByJob.json
+ */
+ /**
+ * Sample code: List a job's executions.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listAJobSExecutions(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobExecutions()
+ .listByJob("group1", "server1", "agent1", "job1", null, null, null, null, null, null, null, Context.NONE);
+ }
+}
+```
+
+### JobStepExecutions_Get
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for JobStepExecutions Get. */
+public final class JobStepExecutionsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecutionStep.json
+ */
+ /**
+ * Sample code: Get a job step execution.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAJobStepExecution(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobStepExecutions()
+ .getWithResponse(
+ "group1",
+ "server1",
+ "agent1",
+ "job1",
+ UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"),
+ "step1",
+ Context.NONE);
+ }
+}
+```
+
+### JobStepExecutions_ListByJobExecution
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for JobStepExecutions ListByJobExecution. */
+public final class JobStepExecutionsListByJobExecutionSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionSteps.json
+ */
+ /**
+ * Sample code: List job step executions.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listJobStepExecutions(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobStepExecutions()
+ .listByJobExecution(
+ "group1",
+ "server1",
+ "agent1",
+ "job1",
+ UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"),
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### JobSteps_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.JobStepAction;
+import com.azure.resourcemanager.sql.generated.models.JobStepActionSource;
+import com.azure.resourcemanager.sql.generated.models.JobStepActionType;
+import com.azure.resourcemanager.sql.generated.models.JobStepExecutionOptions;
+import com.azure.resourcemanager.sql.generated.models.JobStepOutput;
+import com.azure.resourcemanager.sql.generated.models.JobStepOutputType;
+import java.util.UUID;
+
+/** Samples for JobSteps CreateOrUpdate. */
+public final class JobStepsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobStepMin.json
+ */
+ /**
+ * Sample code: Create or update a job step with minimal properties specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateAJobStepWithMinimalPropertiesSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobSteps()
+ .define("step1")
+ .withExistingJob("group1", "server1", "agent1", "job1")
+ .withTargetGroup(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0")
+ .withCredential(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0")
+ .withAction(new JobStepAction().withValue("select 1"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobStepMax.json
+ */
+ /**
+ * Sample code: Create or update a job step with all properties specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateAJobStepWithAllPropertiesSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobSteps()
+ .define("step1")
+ .withExistingJob("group1", "server1", "agent1", "job1")
+ .withStepId(1)
+ .withTargetGroup(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1")
+ .withCredential(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1")
+ .withAction(
+ new JobStepAction()
+ .withType(JobStepActionType.TSQL)
+ .withSource(JobStepActionSource.INLINE)
+ .withValue("select 2"))
+ .withOutput(
+ new JobStepOutput()
+ .withType(JobStepOutputType.SQL_DATABASE)
+ .withSubscriptionId(UUID.fromString("3501b905-a848-4b5d-96e8-b253f62d735a"))
+ .withResourceGroupName("group3")
+ .withServerName("server3")
+ .withDatabaseName("database3")
+ .withSchemaName("myschema1234")
+ .withTableName("mytable5678")
+ .withCredential(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0"))
+ .withExecutionOptions(
+ new JobStepExecutionOptions()
+ .withTimeoutSeconds(1234)
+ .withRetryAttempts(42)
+ .withInitialRetryIntervalSeconds(11)
+ .withMaximumRetryIntervalSeconds(222)
+ .withRetryIntervalBackoffMultiplier(3.0f))
+ .create();
+ }
+}
+```
+
+### JobSteps_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobSteps Delete. */
+public final class JobStepsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobStep.json
+ */
+ /**
+ * Sample code: Delete a job step.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAJobStep(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobSteps().deleteWithResponse("group1", "server1", "agent1", "job1", "step1", Context.NONE);
+ }
+}
+```
+
+### JobSteps_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobSteps Get. */
+public final class JobStepsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobStepByJob.json
+ */
+ /**
+ * Sample code: Get the latest version of a job step.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheLatestVersionOfAJobStep(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobSteps().getWithResponse("group1", "server1", "agent1", "job1", "step1", Context.NONE);
+ }
+}
+```
+
+### JobSteps_GetByVersion
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobSteps GetByVersion. */
+public final class JobStepsGetByVersionSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobStepByVersion.json
+ */
+ /**
+ * Sample code: Get the specified version of a job step.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheSpecifiedVersionOfAJobStep(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobSteps().getByVersionWithResponse("group1", "server1", "agent1", "job1", 1, "step1", Context.NONE);
+ }
+}
+```
+
+### JobSteps_ListByJob
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobSteps ListByJob. */
+public final class JobStepsListByJobSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobStepsByJob.json
+ */
+ /**
+ * Sample code: List job steps for the latest version of a job.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listJobStepsForTheLatestVersionOfAJob(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobSteps().listByJob("group1", "server1", "agent1", "job1", Context.NONE);
+ }
+}
+```
+
+### JobSteps_ListByVersion
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobSteps ListByVersion. */
+public final class JobStepsListByVersionSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobStepsByVersion.json
+ */
+ /**
+ * Sample code: List job steps for the specified version of a job.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listJobStepsForTheSpecifiedVersionOfAJob(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobSteps().listByVersion("group1", "server1", "agent1", "job1", 1, Context.NONE);
+ }
+}
+```
+
+### JobTargetExecutions_Get
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for JobTargetExecutions Get. */
+public final class JobTargetExecutionsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecutionTarget.json
+ */
+ /**
+ * Sample code: Get a job step target execution.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAJobStepTargetExecution(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobTargetExecutions()
+ .getWithResponse(
+ "group1",
+ "server1",
+ "agent1",
+ "job1",
+ UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"),
+ "step1",
+ UUID.fromString("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
+ Context.NONE);
+ }
+}
+```
+
+### JobTargetExecutions_ListByJobExecution
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for JobTargetExecutions ListByJobExecution. */
+public final class JobTargetExecutionsListByJobExecutionSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionTargetsByExecution.json
+ */
+ /**
+ * Sample code: List job step target executions.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listJobStepTargetExecutions(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobTargetExecutions()
+ .listByJobExecution(
+ "group1",
+ "server1",
+ "agent1",
+ "job1",
+ UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"),
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### JobTargetExecutions_ListByStep
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for JobTargetExecutions ListByStep. */
+public final class JobTargetExecutionsListByStepSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionTargetsByStep.json
+ */
+ /**
+ * Sample code: List job step target executions.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listJobStepTargetExecutions(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobTargetExecutions()
+ .listByStep(
+ "group1",
+ "server1",
+ "agent1",
+ "job1",
+ UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"),
+ "step1",
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### JobTargetGroups_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.JobTarget;
+import com.azure.resourcemanager.sql.generated.models.JobTargetGroupMembershipType;
+import com.azure.resourcemanager.sql.generated.models.JobTargetType;
+import java.util.Arrays;
+
+/** Samples for JobTargetGroups CreateOrUpdate. */
+public final class JobTargetGroupsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json
+ */
+ /**
+ * Sample code: Create or update a target group with minimal properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateATargetGroupWithMinimalProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobTargetGroups()
+ .define("targetGroup1")
+ .withExistingJobAgent("group1", "server1", "agent1")
+ .withMembers(Arrays.asList())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json
+ */
+ /**
+ * Sample code: Create or update a target group with all properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateATargetGroupWithAllProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobTargetGroups()
+ .define("targetGroup1")
+ .withExistingJobAgent("group1", "server1", "agent1")
+ .withMembers(
+ Arrays
+ .asList(
+ new JobTarget()
+ .withMembershipType(JobTargetGroupMembershipType.EXCLUDE)
+ .withType(JobTargetType.SQL_DATABASE)
+ .withServerName("server1")
+ .withDatabaseName("database1"),
+ new JobTarget()
+ .withMembershipType(JobTargetGroupMembershipType.INCLUDE)
+ .withType(JobTargetType.SQL_SERVER)
+ .withServerName("server1")
+ .withRefreshCredential(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"),
+ new JobTarget()
+ .withMembershipType(JobTargetGroupMembershipType.INCLUDE)
+ .withType(JobTargetType.SQL_ELASTIC_POOL)
+ .withServerName("server2")
+ .withElasticPoolName("pool1")
+ .withRefreshCredential(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"),
+ new JobTarget()
+ .withMembershipType(JobTargetGroupMembershipType.INCLUDE)
+ .withType(JobTargetType.SQL_SHARD_MAP)
+ .withServerName("server3")
+ .withShardMapName("shardMap1")
+ .withRefreshCredential(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential")))
+ .create();
+ }
+}
+```
+
+### JobTargetGroups_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobTargetGroups Delete. */
+public final class JobTargetGroupsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobTargetGroup.json
+ */
+ /**
+ * Sample code: Delete a target group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteATargetGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobTargetGroups().deleteWithResponse("group1", "server1", "agent1", "targetGroup1", Context.NONE);
+ }
+}
+```
+
+### JobTargetGroups_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobTargetGroups Get. */
+public final class JobTargetGroupsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobTargetGroup.json
+ */
+ /**
+ * Sample code: Get a target group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getATargetGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobTargetGroups().getWithResponse("group1", "server1", "agent1", "targetGroup1", Context.NONE);
+ }
+}
+```
+
+### JobTargetGroups_ListByAgent
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobTargetGroups ListByAgent. */
+public final class JobTargetGroupsListByAgentSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobTargetGroups.json
+ */
+ /**
+ * Sample code: Get all target groups in an agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllTargetGroupsInAnAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobTargetGroups().listByAgent("group1", "server1", "agent1", Context.NONE);
+ }
+}
+```
+
+### JobVersions_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobVersions Get. */
+public final class JobVersionsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobVersion.json
+ */
+ /**
+ * Sample code: Get a version of a job.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAVersionOfAJob(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobVersions().getWithResponse("group1", "server1", "agent1", "job1", 1, Context.NONE);
+ }
+}
+```
+
+### JobVersions_ListByJob
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobVersions ListByJob. */
+public final class JobVersionsListByJobSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobVersions.json
+ */
+ /**
+ * Sample code: Get all versions of a job.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllVersionsOfAJob(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobVersions().listByJob("group1", "server1", "agent1", "job1", Context.NONE);
+ }
+}
+```
+
+### Jobs_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.JobSchedule;
+import com.azure.resourcemanager.sql.generated.models.JobScheduleType;
+import java.time.OffsetDateTime;
+
+/** Samples for Jobs CreateOrUpdate. */
+public final class JobsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobMin.json
+ */
+ /**
+ * Sample code: Create a job with default properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAJobWithDefaultProperties(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobs().define("job1").withExistingJobAgent("group1", "server1", "agent1").create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobMax.json
+ */
+ /**
+ * Sample code: Create a job with all properties specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAJobWithAllPropertiesSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .jobs()
+ .define("job1")
+ .withExistingJobAgent("group1", "server1", "agent1")
+ .withDescription("my favourite job")
+ .withSchedule(
+ new JobSchedule()
+ .withStartTime(OffsetDateTime.parse("2015-09-24T18:30:01Z"))
+ .withEndTime(OffsetDateTime.parse("2015-09-24T23:59:59Z"))
+ .withType(JobScheduleType.RECURRING)
+ .withEnabled(true)
+ .withInterval("PT5M"))
+ .create();
+ }
+}
+```
+
+### Jobs_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Jobs Delete. */
+public final class JobsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJob.json
+ */
+ /**
+ * Sample code: Delete a job.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAJob(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobs().deleteWithResponse("group1", "server1", "agent1", "job1", Context.NONE);
+ }
+}
+```
+
+### Jobs_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Jobs Get. */
+public final class JobsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJob.json
+ */
+ /**
+ * Sample code: Get a job.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAJob(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobs().getWithResponse("group1", "server1", "agent1", "job1", Context.NONE);
+ }
+}
+```
+
+### Jobs_ListByAgent
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Jobs ListByAgent. */
+public final class JobsListByAgentSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobsByAgent.json
+ */
+ /**
+ * Sample code: List jobs in a job agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listJobsInAJobAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.jobs().listByAgent("group1", "server1", "agent1", Context.NONE);
+ }
+}
+```
+
+### LedgerDigestUploadsOperation_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.LedgerDigestUploadsName;
+
+/** Samples for LedgerDigestUploadsOperation CreateOrUpdate. */
+public final class LedgerDigestUploadsOperationCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsEnable.json
+ */
+ /**
+ * Sample code: Enables ledger digest upload configuration for a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void enablesLedgerDigestUploadConfigurationForADatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .ledgerDigestUploadsOperations()
+ .define(LedgerDigestUploadsName.CURRENT)
+ .withExistingDatabase("ledgertestrg", "ledgertestserver", "testdb")
+ .withDigestStorageEndpoint("https://MyAccount.blob.core.windows.net")
+ .create();
+ }
+}
+```
+
+### LedgerDigestUploadsOperation_Disable
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.LedgerDigestUploadsName;
+
+/** Samples for LedgerDigestUploadsOperation Disable. */
+public final class LedgerDigestUploadsOperationDisableSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsDisable.json
+ */
+ /**
+ * Sample code: Disables uploading ledger digests for a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void disablesUploadingLedgerDigestsForADatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .ledgerDigestUploadsOperations()
+ .disable("ledgertestrg", "ledgertestserver", "testdb", LedgerDigestUploadsName.CURRENT, Context.NONE);
+ }
+}
+```
+
+### LedgerDigestUploadsOperation_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.LedgerDigestUploadsName;
+
+/** Samples for LedgerDigestUploadsOperation Get. */
+public final class LedgerDigestUploadsOperationGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsGet.json
+ */
+ /**
+ * Sample code: Gets the current ledger digest upload configuration for a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheCurrentLedgerDigestUploadConfigurationForADatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .ledgerDigestUploadsOperations()
+ .getWithResponse(
+ "ledgertestrg", "ledgertestserver", "testdb", LedgerDigestUploadsName.CURRENT, Context.NONE);
+ }
+}
+```
+
+### LedgerDigestUploadsOperation_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LedgerDigestUploadsOperation ListByDatabase. */
+public final class LedgerDigestUploadsOperationListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsList.json
+ */
+ /**
+ * Sample code: Gets list of ledger digest upload settings on a database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsListOfLedgerDigestUploadSettingsOnADatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .ledgerDigestUploadsOperations()
+ .listByDatabase("ledgertestrg", "ledgertestserver", "testdb", Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_Copy
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.BackupStorageRedundancy;
+import com.azure.resourcemanager.sql.generated.models.CopyLongTermRetentionBackupParameters;
+
+/** Samples for LongTermRetentionBackups Copy. */
+public final class LongTermRetentionBackupsCopySamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupCopy.json
+ */
+ /**
+ * Sample code: Copy the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void copyTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .copy(
+ "japaneast",
+ "testserver",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ new CopyLongTermRetentionBackupParameters()
+ .withTargetServerResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2")
+ .withTargetDatabaseName("testDatabase2")
+ .withTargetBackupStorageRedundancy(BackupStorageRedundancy.GEO),
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_CopyByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.BackupStorageRedundancy;
+import com.azure.resourcemanager.sql.generated.models.CopyLongTermRetentionBackupParameters;
+
+/** Samples for LongTermRetentionBackups CopyByResourceGroup. */
+public final class LongTermRetentionBackupsCopyByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json
+ */
+ /**
+ * Sample code: Copy the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void copyTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .copyByResourceGroup(
+ "testResourceGroup",
+ "japaneast",
+ "testserver",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ new CopyLongTermRetentionBackupParameters()
+ .withTargetServerResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2")
+ .withTargetDatabaseName("testDatabase2")
+ .withTargetBackupStorageRedundancy(BackupStorageRedundancy.GEO),
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionBackups Delete. */
+public final class LongTermRetentionBackupsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupDelete.json
+ */
+ /**
+ * Sample code: Delete the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .delete(
+ "japaneast",
+ "testserver",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_DeleteByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionBackups DeleteByResourceGroup. */
+public final class LongTermRetentionBackupsDeleteByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json
+ */
+ /**
+ * Sample code: Delete the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .deleteByResourceGroup(
+ "testResourceGroup",
+ "japaneast",
+ "testserver",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionBackups Get. */
+public final class LongTermRetentionBackupsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupGet.json
+ */
+ /**
+ * Sample code: Get the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .getWithResponse(
+ "japaneast",
+ "testserver",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionBackups GetByResourceGroup. */
+public final class LongTermRetentionBackupsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json
+ */
+ /**
+ * Sample code: Get the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .getByResourceGroupWithResponse(
+ "testResourceGroup",
+ "japaneast",
+ "testserver",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionBackups ListByDatabase. */
+public final class LongTermRetentionBackupsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupListByDatabase.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .listByDatabase("japaneast", "testserver", "testDatabase", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_ListByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionBackups ListByLocation. */
+public final class LongTermRetentionBackupsListByLocationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupListByLocation.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the location.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheLocation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.longTermRetentionBackups().listByLocation("japaneast", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_ListByResourceGroupDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionBackups ListByResourceGroupDatabase. */
+public final class LongTermRetentionBackupsListByResourceGroupDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .listByResourceGroupDatabase(
+ "testResourceGroup", "japaneast", "testserver", "testDatabase", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_ListByResourceGroupLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionBackups ListByResourceGroupLocation. */
+public final class LongTermRetentionBackupsListByResourceGroupLocationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the location.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheLocation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .listByResourceGroupLocation("testResourceGroup", "japaneast", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_ListByResourceGroupServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionBackups ListByResourceGroupServer. */
+public final class LongTermRetentionBackupsListByResourceGroupServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheServer(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .listByResourceGroupServer("testResourceGroup", "japaneast", "testserver", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionBackups ListByServer. */
+public final class LongTermRetentionBackupsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupListByServer.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheServer(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.longTermRetentionBackups().listByServer("japaneast", "testserver", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.BackupStorageRedundancy;
+import com.azure.resourcemanager.sql.generated.models.UpdateLongTermRetentionBackupParameters;
+
+/** Samples for LongTermRetentionBackups Update. */
+public final class LongTermRetentionBackupsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupUpdate.json
+ */
+ /**
+ * Sample code: Update the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .update(
+ "japaneast",
+ "testserver",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ new UpdateLongTermRetentionBackupParameters()
+ .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO),
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionBackups_UpdateByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.BackupStorageRedundancy;
+import com.azure.resourcemanager.sql.generated.models.UpdateLongTermRetentionBackupParameters;
+
+/** Samples for LongTermRetentionBackups UpdateByResourceGroup. */
+public final class LongTermRetentionBackupsUpdateByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json
+ */
+ /**
+ * Sample code: Update the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionBackups()
+ .updateByResourceGroup(
+ "testResourceGroup",
+ "japaneast",
+ "testserver",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ new UpdateLongTermRetentionBackupParameters()
+ .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO),
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionManagedInstanceBackups_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionManagedInstanceBackups Delete. */
+public final class LongTermRetentionManagedInstanceBackupsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json
+ */
+ /**
+ * Sample code: Delete the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionManagedInstanceBackups()
+ .delete(
+ "japaneast",
+ "testInstance",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionManagedInstanceBackups_DeleteByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionManagedInstanceBackups DeleteByResourceGroup. */
+public final class LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json
+ */
+ /**
+ * Sample code: Delete the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionManagedInstanceBackups()
+ .deleteByResourceGroup(
+ "testResourceGroup",
+ "japaneast",
+ "testInstance",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionManagedInstanceBackups_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionManagedInstanceBackups Get. */
+public final class LongTermRetentionManagedInstanceBackupsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json
+ */
+ /**
+ * Sample code: Get the long term retention backup of a managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheLongTermRetentionBackupOfAManagedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionManagedInstanceBackups()
+ .getWithResponse(
+ "japaneast",
+ "testInstance",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionManagedInstanceBackups_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionManagedInstanceBackups GetByResourceGroup. */
+public final class LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json
+ */
+ /**
+ * Sample code: Get the long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheLongTermRetentionBackup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionManagedInstanceBackups()
+ .getByResourceGroupWithResponse(
+ "testResourceGroup",
+ "japaneast",
+ "testInstance",
+ "testDatabase",
+ "55555555-6666-7777-8888-999999999999;131637960820000000",
+ Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionManagedInstanceBackups_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionManagedInstanceBackups ListByDatabase. */
+public final class LongTermRetentionManagedInstanceBackupsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionManagedInstanceBackups()
+ .listByDatabase("japaneast", "testInstance", "testDatabase", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionManagedInstanceBackups_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionManagedInstanceBackups ListByInstance. */
+public final class LongTermRetentionManagedInstanceBackupsListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheManagedInstance(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionManagedInstanceBackups()
+ .listByInstance("japaneast", "testInstance", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionManagedInstanceBackups_ListByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionManagedInstanceBackups ListByLocation. */
+public final class LongTermRetentionManagedInstanceBackupsListByLocationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the location.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheLocation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.longTermRetentionManagedInstanceBackups().listByLocation("japaneast", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionManagedInstanceBackups_ListByResourceGroupDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupDatabase. */
+public final class LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionManagedInstanceBackups()
+ .listByResourceGroupDatabase(
+ "testResourceGroup", "japaneast", "testInstance", "testDatabase", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionManagedInstanceBackups_ListByResourceGroupInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupInstance. */
+public final class LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheManagedInstance(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionManagedInstanceBackups()
+ .listByResourceGroupInstance("testResourceGroup", "japaneast", "testInstance", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionManagedInstanceBackups_ListByResourceGroupLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupLocation. */
+public final class LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json
+ */
+ /**
+ * Sample code: Get all long term retention backups under the location.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAllLongTermRetentionBackupsUnderTheLocation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionManagedInstanceBackups()
+ .listByResourceGroupLocation("testResourceGroup", "japaneast", null, null, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionPolicies_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.LongTermRetentionPolicyName;
+
+/** Samples for LongTermRetentionPolicies CreateOrUpdate. */
+public final class LongTermRetentionPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Create or update the long term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateTheLongTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionPolicies()
+ .define(LongTermRetentionPolicyName.DEFAULT)
+ .withExistingDatabase("resourceGroup", "testserver", "testDatabase")
+ .withWeeklyRetention("P1M")
+ .withMonthlyRetention("P1Y")
+ .withYearlyRetention("P5Y")
+ .withWeekOfYear(5)
+ .create();
+ }
+}
+```
+
+### LongTermRetentionPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.LongTermRetentionPolicyName;
+
+/** Samples for LongTermRetentionPolicies Get. */
+public final class LongTermRetentionPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LongTermRetentionPolicyGet.json
+ */
+ /**
+ * Sample code: Get the long term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheLongTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .longTermRetentionPolicies()
+ .getWithResponse(
+ "resourceGroup", "testserver", "testDatabase", LongTermRetentionPolicyName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### LongTermRetentionPolicies_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LongTermRetentionPolicies ListByDatabase. */
+public final class LongTermRetentionPoliciesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LongTermRetentionPolicyListByDatabase.json
+ */
+ /**
+ * Sample code: Get the long term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheLongTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.longTermRetentionPolicies().listByDatabase("resourceGroup", "testserver", "testDatabase", Context.NONE);
+ }
+}
+```
+
+### MaintenanceWindowOptionsOperation_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MaintenanceWindowOptionsOperation Get. */
+public final class MaintenanceWindowOptionsOperationGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetMaintenanceWindowOptions.json
+ */
+ /**
+ * Sample code: Gets a list of available maintenance windows for a selected database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAListOfAvailableMaintenanceWindowsForASelectedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .maintenanceWindowOptionsOperations()
+ .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "current", Context.NONE);
+ }
+}
+```
+
+### MaintenanceWindowsOperation_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.MaintenanceWindowsInner;
+import com.azure.resourcemanager.sql.generated.models.DayOfWeek;
+import com.azure.resourcemanager.sql.generated.models.MaintenanceWindowTimeRange;
+import java.util.Arrays;
+
+/** Samples for MaintenanceWindowsOperation CreateOrUpdate. */
+public final class MaintenanceWindowsOperationCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateMaintenanceWindows.json
+ */
+ /**
+ * Sample code: Sets maintenance window settings for a selected database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void setsMaintenanceWindowSettingsForASelectedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .maintenanceWindowsOperations()
+ .createOrUpdateWithResponse(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ "testdwdb",
+ "current",
+ new MaintenanceWindowsInner()
+ .withTimeRanges(
+ Arrays
+ .asList(
+ new MaintenanceWindowTimeRange()
+ .withDayOfWeek(DayOfWeek.SATURDAY)
+ .withStartTime("00:00:00")
+ .withDuration("PT60M"))),
+ Context.NONE);
+ }
+}
+```
+
+### MaintenanceWindowsOperation_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for MaintenanceWindowsOperation Get. */
+public final class MaintenanceWindowsOperationGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetMaintenanceWindows.json
+ */
+ /**
+ * Sample code: Gets maintenance window settings for a selected database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsMaintenanceWindowSettingsForASelectedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .maintenanceWindowsOperations()
+ .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "current", Context.NONE);
+ }
+}
+```
+
+### ManagedBackupShortTermRetentionPolicies_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.ManagedShortTermRetentionPolicyName;
+
+/** Samples for ManagedBackupShortTermRetentionPolicies CreateOrUpdate. */
+public final class ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json
+ */
+ /**
+ * Sample code: Update the short term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheShortTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedBackupShortTermRetentionPolicies()
+ .define(ManagedShortTermRetentionPolicyName.DEFAULT)
+ .withExistingDatabase("resourceGroup", "testsvr", "testdb")
+ .withRetentionDays(14)
+ .create();
+ }
+}
+```
+
+### ManagedBackupShortTermRetentionPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ManagedShortTermRetentionPolicyName;
+
+/** Samples for ManagedBackupShortTermRetentionPolicies Get. */
+public final class ManagedBackupShortTermRetentionPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedShortTermRetentionPolicy.json
+ */
+ /**
+ * Sample code: Get the short term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheShortTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedBackupShortTermRetentionPolicies()
+ .getWithResponse(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ "testdb",
+ ManagedShortTermRetentionPolicyName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedBackupShortTermRetentionPolicies_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedBackupShortTermRetentionPolicies ListByDatabase. */
+public final class ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetListManagedShortTermRetentionPolicy.json
+ */
+ /**
+ * Sample code: Get the short term retention policy list for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheShortTermRetentionPolicyListForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedBackupShortTermRetentionPolicies()
+ .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE);
+ }
+}
+```
+
+### ManagedBackupShortTermRetentionPolicies_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ManagedBackupShortTermRetentionPolicy;
+import com.azure.resourcemanager.sql.generated.models.ManagedShortTermRetentionPolicyName;
+
+/** Samples for ManagedBackupShortTermRetentionPolicies Update. */
+public final class ManagedBackupShortTermRetentionPoliciesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json
+ */
+ /**
+ * Sample code: Update the short term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheShortTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedBackupShortTermRetentionPolicy resource =
+ manager
+ .managedBackupShortTermRetentionPolicies()
+ .getWithResponse(
+ "resourceGroup", "testsvr", "testdb", ManagedShortTermRetentionPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource.update().withRetentionDays(14).apply();
+ }
+}
+```
+
+### ManagedDatabaseColumns_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseColumns Get. */
+public final class ManagedDatabaseColumnsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnGet.json
+ */
+ /**
+ * Sample code: Get managed database column.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getManagedDatabaseColumn(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseColumns()
+ .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", "column1", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseColumns_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+import java.util.Arrays;
+
+/** Samples for ManagedDatabaseColumns ListByDatabase. */
+public final class ManagedDatabaseColumnsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedColumnsListByDatabaseMin.json
+ */
+ /**
+ * Sample code: List managed database columns.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedDatabaseColumns(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseColumns()
+ .listByDatabase("myRG", "serverName", "myDatabase", null, null, null, null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedColumnsListByDatabaseMax.json
+ */
+ /**
+ * Sample code: Filter managed database columns.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void filterManagedDatabaseColumns(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseColumns()
+ .listByDatabase(
+ "myRG",
+ "serverName",
+ "myDatabase",
+ Arrays.asList("dbo"),
+ Arrays.asList("customer", "address"),
+ Arrays.asList("username"),
+ Arrays.asList("schema asc", "table", "column desc"),
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseColumns_ListByTable
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseColumns ListByTable. */
+public final class ManagedDatabaseColumnsListByTableSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnListByTable.json
+ */
+ /**
+ * Sample code: List managed database columns.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedDatabaseColumns(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseColumns()
+ .listByTable("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", null, Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseQueries_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseQueries Get. */
+public final class ManagedDatabaseQueriesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryGet.json
+ */
+ /**
+ * Sample code: Obtain query properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void obtainQueryProperties(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseQueries()
+ .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseQueries_ListByQuery
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.QueryTimeGrainType;
+
+/** Samples for ManagedDatabaseQueries ListByQuery. */
+public final class ManagedDatabaseQueriesListByQuerySamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json
+ */
+ /**
+ * Sample code: Obtain query execution statistics. Example with all request parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void obtainQueryExecutionStatisticsExampleWithAllRequestParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseQueries()
+ .listByQuery(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ "database_1",
+ "42",
+ "03/01/2020 16:23:09",
+ "03/11/2020 14:00:00",
+ QueryTimeGrainType.P1D,
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryStatisticsList.json
+ */
+ /**
+ * Sample code: Obtain query execution statistics.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void obtainQueryExecutionStatistics(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseQueries()
+ .listByQuery("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", null, null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json
+ */
+ /**
+ * Sample code: Obtain query execution statistics. Minimal example with only mandatory request parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void obtainQueryExecutionStatisticsMinimalExampleWithOnlyMandatoryRequestParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseQueries()
+ .listByQuery(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ "database_1",
+ "42",
+ null,
+ null,
+ QueryTimeGrainType.PT1H,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseRecommendedSensitivityLabels_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.RecommendedSensitivityLabelUpdate;
+import com.azure.resourcemanager.sql.generated.models.RecommendedSensitivityLabelUpdateKind;
+import com.azure.resourcemanager.sql.generated.models.RecommendedSensitivityLabelUpdateList;
+import java.util.Arrays;
+
+/** Samples for ManagedDatabaseRecommendedSensitivityLabels Update. */
+public final class ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json
+ */
+ /**
+ * Sample code: Update recommended sensitivity labels of a given database using an operations batch.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateRecommendedSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseRecommendedSensitivityLabels()
+ .updateWithResponse(
+ "myRG",
+ "myManagedInstanceName",
+ "myDatabase",
+ new RecommendedSensitivityLabelUpdateList()
+ .withOperations(
+ Arrays
+ .asList(
+ new RecommendedSensitivityLabelUpdate()
+ .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE)
+ .withSchema("dbo")
+ .withTable("table1")
+ .withColumn("column1"),
+ new RecommendedSensitivityLabelUpdate()
+ .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE)
+ .withSchema("dbo")
+ .withTable("table2")
+ .withColumn("column2"),
+ new RecommendedSensitivityLabelUpdate()
+ .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE)
+ .withSchema("dbo")
+ .withTable("Table1")
+ .withColumn("Column3"))),
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseRestoreDetails_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.RestoreDetailsName;
+
+/** Samples for ManagedDatabaseRestoreDetails Get. */
+public final class ManagedDatabaseRestoreDetailsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseRestoreDetails.json
+ */
+ /**
+ * Sample code: Managed database restore details.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void managedDatabaseRestoreDetails(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseRestoreDetails()
+ .getWithResponse(
+ "Default-SQL-SouthEastAsia", "managedInstance", "testdb", RestoreDetailsName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSchemas_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseSchemas Get. */
+public final class ManagedDatabaseSchemasGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSchemaGet.json
+ */
+ /**
+ * Sample code: Get managed database schema.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getManagedDatabaseSchema(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSchemas()
+ .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSchemas_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseSchemas ListByDatabase. */
+public final class ManagedDatabaseSchemasListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json
+ */
+ /**
+ * Sample code: List managed database schemas.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedDatabaseSchemas(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSchemas()
+ .listByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSecurityAlertPolicies_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseSecurityAlertPolicy;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertPolicyName;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertPolicyState;
+import java.util.Arrays;
+
+/** Samples for ManagedDatabaseSecurityAlertPolicies CreateOrUpdate. */
+public final class ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json
+ */
+ /**
+ * Sample code: Update a database's threat detection policy with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateADatabaseSThreatDetectionPolicyWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedDatabaseSecurityAlertPolicy resource =
+ manager
+ .managedDatabaseSecurityAlertPolicies()
+ .getWithResponse(
+ "securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withState(SecurityAlertPolicyState.ENABLED)
+ .withDisabledAlerts(Arrays.asList("Sql_Injection", "Usage_Anomaly"))
+ .withEmailAddresses(Arrays.asList("test@contoso.com", "user@contoso.com"))
+ .withEmailAccountAdmins(true)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .withRetentionDays(6)
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json
+ */
+ /**
+ * Sample code: Update a database's threat detection policy with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateADatabaseSThreatDetectionPolicyWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedDatabaseSecurityAlertPolicy resource =
+ manager
+ .managedDatabaseSecurityAlertPolicies()
+ .getWithResponse(
+ "securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource.update().withState(SecurityAlertPolicyState.ENABLED).apply();
+ }
+}
+```
+
+### ManagedDatabaseSecurityAlertPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertPolicyName;
+
+/** Samples for ManagedDatabaseSecurityAlertPolicies Get. */
+public final class ManagedDatabaseSecurityAlertPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertGet.json
+ */
+ /**
+ * Sample code: Get a database's threat detection policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getADatabaseSThreatDetectionPolicy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSecurityAlertPolicies()
+ .getWithResponse(
+ "securityalert-6852", "securityalert-2080", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSecurityAlertPolicies_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseSecurityAlertPolicies ListByDatabase. */
+public final class ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json
+ */
+ /**
+ * Sample code: Get a list of the database's threat detection policies.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAListOfTheDatabaseSThreatDetectionPolicies(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSecurityAlertPolicies()
+ .listByDatabase("securityalert-6852", "securityalert-2080", "testdb", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSecurityEvents_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseSecurityEvents ListByDatabase. */
+public final class ManagedDatabaseSecurityEventsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityEventsGetMin.json
+ */
+ /**
+ * Sample code: Get the managed database's security events with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheManagedDatabaseSSecurityEventsWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSecurityEvents()
+ .listByDatabase("testrg", "testcl", "database1", null, null, null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json
+ */
+ /**
+ * Sample code: Get the managed database's security events with maximal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheManagedDatabaseSSecurityEventsWithMaximalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSecurityEvents()
+ .listByDatabase(
+ "testrg",
+ "testcl",
+ "database1",
+ "ShowServerRecords eq true",
+ 0,
+ 1,
+ "eyJCbG9iTmFtZURhdGVUaW1lIjoiXC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbG92ZXJJbmRleCI6IjAiLCJFbmREYXRlIjoiXC9EYXRlKDE1MTI0NjYyMDA1MjkpXC8iLCJJc1NraXBUb2tlblNldCI6ZmFsc2UsIklzVjJCbG9iVGltZUZvcm1hdCI6dHJ1ZSwiU2hvd1NlcnZlclJlY29yZHMiOmZhbHNlLCJTa2lwVmFsdWUiOjAsIlRha2VWYWx1ZSI6MTB9",
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSensitivityLabels_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.SensitivityLabelRank;
+
+/** Samples for ManagedDatabaseSensitivityLabels CreateOrUpdate. */
+public final class ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json
+ */
+ /**
+ * Sample code: Updates or creates a sensitivity label of a given column with all parameters in a managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updatesOrCreatesASensitivityLabelOfAGivenColumnWithAllParametersInAManagedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSensitivityLabels()
+ .define()
+ .withExistingColumn("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn")
+ .withLabelName("PII")
+ .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff")
+ .withInformationType("PhoneNumber")
+ .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646")
+ .withRank(SensitivityLabelRank.HIGH)
+ .create();
+ }
+}
+```
+
+### ManagedDatabaseSensitivityLabels_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseSensitivityLabels Delete. */
+public final class ManagedDatabaseSensitivityLabelsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json
+ */
+ /**
+ * Sample code: Deletes the sensitivity label of a given column in a managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deletesTheSensitivityLabelOfAGivenColumnInAManagedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSensitivityLabels()
+ .deleteWithResponse(
+ "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSensitivityLabels_DisableRecommendation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseSensitivityLabels DisableRecommendation. */
+public final class ManagedDatabaseSensitivityLabelsDisableRecommendationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json
+ */
+ /**
+ * Sample code: Disables the sensitivity recommendations on a given column.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void disablesTheSensitivityRecommendationsOnAGivenColumn(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSensitivityLabels()
+ .disableRecommendationWithResponse(
+ "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSensitivityLabels_EnableRecommendation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseSensitivityLabels EnableRecommendation. */
+public final class ManagedDatabaseSensitivityLabelsEnableRecommendationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json
+ */
+ /**
+ * Sample code: Enables the sensitivity recommendations on a given column.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void enablesTheSensitivityRecommendationsOnAGivenColumn(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSensitivityLabels()
+ .enableRecommendationWithResponse(
+ "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSensitivityLabels_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SensitivityLabelSource;
+
+/** Samples for ManagedDatabaseSensitivityLabels Get. */
+public final class ManagedDatabaseSensitivityLabelsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json
+ */
+ /**
+ * Sample code: Gets the sensitivity label of a given column in a managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheSensitivityLabelOfAGivenColumnInAManagedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSensitivityLabels()
+ .getWithResponse(
+ "myRG",
+ "myManagedInstanceName",
+ "myDatabase",
+ "dbo",
+ "myTable",
+ "myColumn",
+ SensitivityLabelSource.CURRENT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSensitivityLabels_ListCurrentByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseSensitivityLabels ListCurrentByDatabase. */
+public final class ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json
+ */
+ /**
+ * Sample code: Gets the current sensitivity labels of a given database in a managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheCurrentSensitivityLabelsOfAGivenDatabaseInAManagedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSensitivityLabels()
+ .listCurrentByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, null, null, Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSensitivityLabels_ListRecommendedByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseSensitivityLabels ListRecommendedByDatabase. */
+public final class ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json
+ */
+ /**
+ * Sample code: Gets the recommended sensitivity labels of a given database in a managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheRecommendedSensitivityLabelsOfAGivenDatabaseInAManagedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSensitivityLabels()
+ .listRecommendedByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, null, null, Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseSensitivityLabels_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.SensitivityLabelInner;
+import com.azure.resourcemanager.sql.generated.fluent.models.SensitivityLabelUpdateInner;
+import com.azure.resourcemanager.sql.generated.models.SensitivityLabelUpdateKind;
+import com.azure.resourcemanager.sql.generated.models.SensitivityLabelUpdateList;
+import java.util.Arrays;
+
+/** Samples for ManagedDatabaseSensitivityLabels Update. */
+public final class ManagedDatabaseSensitivityLabelsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json
+ */
+ /**
+ * Sample code: Update sensitivity labels of a given database using an operations batch.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseSensitivityLabels()
+ .updateWithResponse(
+ "myRG",
+ "myManagedInstanceName",
+ "myDatabase",
+ new SensitivityLabelUpdateList()
+ .withOperations(
+ Arrays
+ .asList(
+ new SensitivityLabelUpdateInner()
+ .withOp(SensitivityLabelUpdateKind.SET)
+ .withSchema("dbo")
+ .withTable("table1")
+ .withColumn("column1")
+ .withSensitivityLabel(
+ new SensitivityLabelInner()
+ .withLabelName("Highly Confidential")
+ .withLabelId("3A477B16-9423-432B-AA97-6069B481CEC3")
+ .withInformationType("Financial")
+ .withInformationTypeId("1D3652D6-422C-4115-82F1-65DAEBC665C8")),
+ new SensitivityLabelUpdateInner()
+ .withOp(SensitivityLabelUpdateKind.SET)
+ .withSchema("dbo")
+ .withTable("table2")
+ .withColumn("column2")
+ .withSensitivityLabel(
+ new SensitivityLabelInner()
+ .withLabelName("PII")
+ .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff")
+ .withInformationType("PhoneNumber")
+ .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646")),
+ new SensitivityLabelUpdateInner()
+ .withOp(SensitivityLabelUpdateKind.REMOVE)
+ .withSchema("dbo")
+ .withTable("Table1")
+ .withColumn("Column3"))),
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseTables_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseTables Get. */
+public final class ManagedDatabaseTablesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseTableGet.json
+ */
+ /**
+ * Sample code: Get managed database table.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getManagedDatabaseTable(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseTables()
+ .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseTables_ListBySchema
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseTables ListBySchema. */
+public final class ManagedDatabaseTablesListBySchemaSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseTableListBySchema.json
+ */
+ /**
+ * Sample code: List managed database tables.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedDatabaseTables(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseTables()
+ .listBySchema("myRG", "myManagedInstanceName", "myDatabase", "dbo", null, Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseTransparentDataEncryption_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ManagedTransparentDataEncryption;
+import com.azure.resourcemanager.sql.generated.models.TransparentDataEncryptionName;
+import com.azure.resourcemanager.sql.generated.models.TransparentDataEncryptionState;
+
+/** Samples for ManagedDatabaseTransparentDataEncryption CreateOrUpdate. */
+public final class ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json
+ */
+ /**
+ * Sample code: Update a database's Transparent Data Encryption state with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateADatabaseSTransparentDataEncryptionStateWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedTransparentDataEncryption resource =
+ manager
+ .managedDatabaseTransparentDataEncryptions()
+ .getWithResponse(
+ "securitytde-42-rg",
+ "securitytde-42",
+ "testdb",
+ TransparentDataEncryptionName.CURRENT,
+ Context.NONE)
+ .getValue();
+ resource.update().withState(TransparentDataEncryptionState.ENABLED).apply();
+ }
+}
+```
+
+### ManagedDatabaseTransparentDataEncryption_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.TransparentDataEncryptionName;
+
+/** Samples for ManagedDatabaseTransparentDataEncryption Get. */
+public final class ManagedDatabaseTransparentDataEncryptionGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionGet.json
+ */
+ /**
+ * Sample code: Get a database's transparent data encryption.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getADatabaseSTransparentDataEncryption(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseTransparentDataEncryptions()
+ .getWithResponse(
+ "security-tde-resourcegroup",
+ "securitytde",
+ "testdb",
+ TransparentDataEncryptionName.CURRENT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseTransparentDataEncryption_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseTransparentDataEncryption ListByDatabase. */
+public final class ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionList.json
+ */
+ /**
+ * Sample code: Get a list of the database's transparent data encryptions.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAListOfTheDatabaseSTransparentDataEncryptions(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseTransparentDataEncryptions()
+ .listByDatabase("security-tde-resourcegroup", "securitytde", "testdb", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessmentRuleBaselines_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseVulnerabilityAssessmentRuleBaselineInner;
+import com.azure.resourcemanager.sql.generated.models.DatabaseVulnerabilityAssessmentRuleBaselineItem;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentPolicyBaselineName;
+import java.util.Arrays;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines CreateOrUpdate. */
+public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json
+ */
+ /**
+ * Sample code: Creates or updates a database's vulnerability assessment rule baseline.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessmentRuleBaselines()
+ .createOrUpdateWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "VA1001",
+ VulnerabilityAssessmentPolicyBaselineName.DEFAULT,
+ new DatabaseVulnerabilityAssessmentRuleBaselineInner()
+ .withBaselineResults(
+ Arrays
+ .asList(
+ new DatabaseVulnerabilityAssessmentRuleBaselineItem()
+ .withResult(Arrays.asList("userA", "SELECT")),
+ new DatabaseVulnerabilityAssessmentRuleBaselineItem()
+ .withResult(Arrays.asList("userB", "SELECT")),
+ new DatabaseVulnerabilityAssessmentRuleBaselineItem()
+ .withResult(Arrays.asList("userC", "SELECT", "tableId_4")))),
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessmentRuleBaselines_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentPolicyBaselineName;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines Delete. */
+public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json
+ */
+ /**
+ * Sample code: Removes a database's vulnerability assessment rule baseline.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void removesADatabaseSVulnerabilityAssessmentRuleBaseline(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessmentRuleBaselines()
+ .deleteWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "VA1001",
+ VulnerabilityAssessmentPolicyBaselineName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessmentRuleBaselines_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentPolicyBaselineName;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines Get. */
+public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json
+ */
+ /**
+ * Sample code: Gets a database's vulnerability assessment rule baseline.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsADatabaseSVulnerabilityAssessmentRuleBaseline(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessmentRuleBaselines()
+ .getWithResponse(
+ "vulnerabilityaseessmenttest-4711",
+ "vulnerabilityaseessmenttest-6411",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "VA1001",
+ VulnerabilityAssessmentPolicyBaselineName.MASTER,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessmentScans_Export
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessmentScans Export. */
+public final class ManagedDatabaseVulnerabilityAssessmentScansExportSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json
+ */
+ /**
+ * Sample code: Export a database's vulnerability assessment scan results.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void exportADatabaseSVulnerabilityAssessmentScanResults(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessmentScans()
+ .exportWithResponse(
+ "vulnerabilityassessmenttest-4799",
+ "vulnerabilityassessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "scan001",
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessmentScans_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessmentScans Get. */
+public final class ManagedDatabaseVulnerabilityAssessmentScansGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json
+ */
+ /**
+ * Sample code: Gets a database vulnerability assessment scan record by scan ID.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsADatabaseVulnerabilityAssessmentScanRecordByScanID(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessmentScans()
+ .getWithResponse(
+ "vulnerabilityassessmenttest-4711",
+ "vulnerabilityassessmenttest-6411",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "scan001",
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessmentScans_InitiateScan
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessmentScans InitiateScan. */
+public final class ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json
+ */
+ /**
+ * Sample code: Executes a database's vulnerability assessment scan.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void executesADatabaseSVulnerabilityAssessmentScan(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessmentScans()
+ .initiateScan(
+ "vulnerabilityassessmenttest-4711",
+ "vulnerabilityassessmenttest-6411",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ "scan01",
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessmentScans_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessmentScans ListByDatabase. */
+public final class ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json
+ */
+ /**
+ * Sample code: Gets the list of a database vulnerability assessment scan records.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheListOfADatabaseVulnerabilityAssessmentScanRecords(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessmentScans()
+ .listByDatabase(
+ "vulnerabilityassessmenttest-4711",
+ "vulnerabilityassessmenttest-6411",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessments_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseVulnerabilityAssessmentInner;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentRecurringScansProperties;
+import java.util.Arrays;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessments CreateOrUpdate. */
+public final class ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json
+ */
+ /**
+ * Sample code: Create a database's vulnerability assessment with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createADatabaseSVulnerabilityAssessmentWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessments()
+ .createOrUpdateWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ new DatabaseVulnerabilityAssessmentInner()
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .withRecurringScans(
+ new VulnerabilityAssessmentRecurringScansProperties()
+ .withIsEnabled(true)
+ .withEmailSubscriptionAdmins(true)
+ .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json
+ */
+ /**
+ * Sample code: Create a database's vulnerability assessment with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createADatabaseSVulnerabilityAssessmentWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessments()
+ .createOrUpdateWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ new DatabaseVulnerabilityAssessmentInner()
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"),
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessments_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessments Delete. */
+public final class ManagedDatabaseVulnerabilityAssessmentsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json
+ */
+ /**
+ * Sample code: Remove a database's vulnerability assessment.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void removeADatabaseSVulnerabilityAssessment(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessments()
+ .deleteWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessments_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessments Get. */
+public final class ManagedDatabaseVulnerabilityAssessmentsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json
+ */
+ /**
+ * Sample code: Get a database's vulnerability assessment.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getADatabaseSVulnerabilityAssessment(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessments()
+ .getWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ "testdb",
+ VulnerabilityAssessmentName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabaseVulnerabilityAssessments_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabaseVulnerabilityAssessments ListByDatabase. */
+public final class ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json
+ */
+ /**
+ * Sample code: Get a database's vulnerability assessments list.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getADatabaseSVulnerabilityAssessmentsList(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabaseVulnerabilityAssessments()
+ .listByDatabase(
+ "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabases_CompleteRestore
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.CompleteDatabaseRestoreDefinition;
+
+/** Samples for ManagedDatabases CompleteRestore. */
+public final class ManagedDatabasesCompleteRestoreSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json
+ */
+ /**
+ * Sample code: Completes a managed database external backup restore.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void completesAManagedDatabaseExternalBackupRestore(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabases()
+ .completeRestore(
+ "myRG",
+ "myManagedInstanceName",
+ "myDatabase",
+ new CompleteDatabaseRestoreDefinition().withLastBackupName("testdb1_log4"),
+ Context.NONE);
+ }
+}
+```
+
+### ManagedDatabases_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseCreateMode;
+import java.time.OffsetDateTime;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ManagedDatabases CreateOrUpdate. */
+public final class ManagedDatabasesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateRecovery.json
+ */
+ /**
+ * Sample code: Creates a new managed database from restoring a geo-replicated backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsANewManagedDatabaseFromRestoringAGeoReplicatedBackup(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabases()
+ .define("testdb_recovered")
+ .withRegion("southeastasia")
+ .withExistingManagedInstance("Default-SQL-SouthEastAsia", "server1")
+ .withCreateMode(ManagedDatabaseCreateMode.RECOVERY)
+ .withRecoverableDatabaseId(
+ "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-WestEurope/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json
+ */
+ /**
+ * Sample code: Creates a new managed database by restoring from an external backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsANewManagedDatabaseByRestoringFromAnExternalBackup(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabases()
+ .define("managedDatabase")
+ .withRegion("southeastasia")
+ .withExistingManagedInstance("Default-SQL-SouthEastAsia", "managedInstance")
+ .withCollation("SQL_Latin1_General_CP1_CI_AS")
+ .withCreateMode(ManagedDatabaseCreateMode.RESTORE_EXTERNAL_BACKUP)
+ .withStorageContainerUri("https://myaccountname.blob.core.windows.net/backups")
+ .withStorageContainerSasToken("sv=2015-12-11&sr=c&sp=rl&sig=1234")
+ .withAutoCompleteRestore(true)
+ .withLastBackupName("last_backup_name")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateMax.json
+ */
+ /**
+ * Sample code: Creates a new managed database with maximal properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsANewManagedDatabaseWithMaximalProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabases()
+ .define("managedDatabase")
+ .withRegion("southeastasia")
+ .withExistingManagedInstance("Default-SQL-SouthEastAsia", "managedInstance")
+ .withTags(mapOf("tagKey1", "TagValue1"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateMin.json
+ */
+ /**
+ * Sample code: Creates a new managed database with minimal properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsANewManagedDatabaseWithMinimalProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabases()
+ .define("managedDatabase")
+ .withRegion("southeastasia")
+ .withExistingManagedInstance("Default-SQL-SouthEastAsia", "managedInstance")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json
+ */
+ /**
+ * Sample code: Creates a new managed database using point in time restore.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsANewManagedDatabaseUsingPointInTimeRestore(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabases()
+ .define("managedDatabase")
+ .withRegion("southeastasia")
+ .withExistingManagedInstance("Default-SQL-SouthEastAsia", "managedInstance")
+ .withRestorePointInTime(OffsetDateTime.parse("2017-07-14T05:35:31.503Z"))
+ .withCreateMode(ManagedDatabaseCreateMode.POINT_IN_TIME_RESTORE)
+ .withSourceDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json
+ */
+ /**
+ * Sample code: Creates a new managed database from restoring a long term retention backup.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsANewManagedDatabaseFromRestoringALongTermRetentionBackup(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedDatabases()
+ .define("managedDatabase")
+ .withRegion("southeastasia")
+ .withExistingManagedInstance("Default-SQL-SouthEastAsia", "managedInstance")
+ .withCollation("SQL_Latin1_General_CP1_CI_AS")
+ .withCreateMode(ManagedDatabaseCreateMode.RESTORE_EXTERNAL_BACKUP)
+ .withStorageContainerUri("https://myaccountname.blob.core.windows.net/backups")
+ .withStorageContainerSasToken("sv=2015-12-11&sr=c&sp=rl&sig=1234")
+ .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;
+ }
+}
+```
+
+### ManagedDatabases_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabases Delete. */
+public final class ManagedDatabasesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseDelete.json
+ */
+ /**
+ * Sample code: Delete managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteManagedDatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedDatabases().delete("Default-SQL-SouthEastAsia", "managedInstance", "testdb", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabases_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabases Get. */
+public final class ManagedDatabasesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseGet.json
+ */
+ /**
+ * Sample code: Gets a managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAManagedDatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedDatabases().getWithResponse("Test1", "managedInstance", "managedDatabase", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabases_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabases ListByInstance. */
+public final class ManagedDatabasesListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseListByManagedInstance.json
+ */
+ /**
+ * Sample code: List databases by managed instances.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabasesByManagedInstances(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedDatabases().listByInstance("Test1", "managedInstance", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabases_ListInaccessibleByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedDatabases ListInaccessibleByInstance. */
+public final class ManagedDatabasesListInaccessibleByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json
+ */
+ /**
+ * Sample code: List inaccessible managed databases by managed instances.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listInaccessibleManagedDatabasesByManagedInstances(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedDatabases().listInaccessibleByInstance("testrg", "testcl", Context.NONE);
+ }
+}
+```
+
+### ManagedDatabases_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabase;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ManagedDatabases Update. */
+public final class ManagedDatabasesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseUpdateMax.json
+ */
+ /**
+ * Sample code: Updates a managed database with maximal properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updatesAManagedDatabaseWithMaximalProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedDatabase resource =
+ manager
+ .managedDatabases()
+ .getWithResponse("Default-SQL-SouthEastAsia", "managedInstance", "testdb", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagKey1", "TagValue1")).apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseUpdateMin.json
+ */
+ /**
+ * Sample code: Updates a managed database with minimal properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updatesAManagedDatabaseWithMinimalProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedDatabase resource =
+ manager
+ .managedDatabases()
+ .getWithResponse("Default-SQL-SouthEastAsia", "managedInstance", "testdb", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagKey1", "TagValue1")).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;
+ }
+}
+```
+
+### ManagedInstanceAdministrators_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.AdministratorName;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceAdministrator;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceAdministratorType;
+import java.util.UUID;
+
+/** Samples for ManagedInstanceAdministrators CreateOrUpdate. */
+public final class ManagedInstanceAdministratorsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorCreate.json
+ */
+ /**
+ * Sample code: Create administrator of managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAdministratorOfManagedInstance(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceAdministrators()
+ .define(AdministratorName.ACTIVE_DIRECTORY)
+ .withExistingManagedInstance("Default-SQL-SouthEastAsia", "managedInstance")
+ .withAdministratorType(ManagedInstanceAdministratorType.ACTIVE_DIRECTORY)
+ .withLogin("bob@contoso.com")
+ .withSid(UUID.fromString("44444444-3333-2222-1111-000000000000"))
+ .withTenantId(UUID.fromString("55555555-4444-3333-2222-111111111111"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorUpdate.json
+ */
+ /**
+ * Sample code: Update administrator of managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAdministratorOfManagedInstance(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedInstanceAdministrator resource =
+ manager
+ .managedInstanceAdministrators()
+ .getWithResponse(
+ "Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withAdministratorType(ManagedInstanceAdministratorType.ACTIVE_DIRECTORY)
+ .withLogin("bob@contoso.com")
+ .withSid(UUID.fromString("44444444-3333-2222-1111-000000000000"))
+ .withTenantId(UUID.fromString("55555555-4444-3333-2222-111111111111"))
+ .apply();
+ }
+}
+```
+
+### ManagedInstanceAdministrators_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.AdministratorName;
+
+/** Samples for ManagedInstanceAdministrators Delete. */
+public final class ManagedInstanceAdministratorsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorDelete.json
+ */
+ /**
+ * Sample code: Delete administrator of managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAdministratorOfManagedInstance(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceAdministrators()
+ .delete("Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceAdministrators_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.AdministratorName;
+
+/** Samples for ManagedInstanceAdministrators Get. */
+public final class ManagedInstanceAdministratorsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorGet.json
+ */
+ /**
+ * Sample code: Get administrator of managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAdministratorOfManagedInstance(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceAdministrators()
+ .getWithResponse(
+ "Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceAdministrators_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstanceAdministrators ListByInstance. */
+public final class ManagedInstanceAdministratorsListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorListByInstance.json
+ */
+ /**
+ * Sample code: List administrators of managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listAdministratorsOfManagedInstance(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceAdministrators()
+ .listByInstance("Default-SQL-SouthEastAsia", "managedInstance", Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceAzureADOnlyAuthentications_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.AuthenticationName;
+
+/** Samples for ManagedInstanceAzureADOnlyAuthentications CreateOrUpdate. */
+public final class ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Creates or updates Azure Active Directory only authentication object.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsOrUpdatesAzureActiveDirectoryOnlyAuthenticationObject(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceAzureADOnlyAuthentications()
+ .define(AuthenticationName.DEFAULT)
+ .withExistingManagedInstance("Default-SQL-SouthEastAsia", "managedInstance")
+ .withAzureADOnlyAuthentication(false)
+ .create();
+ }
+}
+```
+
+### ManagedInstanceAzureADOnlyAuthentications_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.AuthenticationName;
+
+/** Samples for ManagedInstanceAzureADOnlyAuthentications Delete. */
+public final class ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json
+ */
+ /**
+ * Sample code: Deletes Azure Active Directory only authentication object.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deletesAzureActiveDirectoryOnlyAuthenticationObject(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceAzureADOnlyAuthentications()
+ .delete("Default-SQL-SouthEastAsia", "managedInstance", AuthenticationName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceAzureADOnlyAuthentications_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.AuthenticationName;
+
+/** Samples for ManagedInstanceAzureADOnlyAuthentications Get. */
+public final class ManagedInstanceAzureADOnlyAuthenticationsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json
+ */
+ /**
+ * Sample code: Gets a Azure Active Directory only authentication property.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAAzureActiveDirectoryOnlyAuthenticationProperty(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceAzureADOnlyAuthentications()
+ .getWithResponse("Default-SQL-SouthEastAsia", "managedInstance", AuthenticationName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceAzureADOnlyAuthentications_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstanceAzureADOnlyAuthentications ListByInstance. */
+public final class ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json
+ */
+ /**
+ * Sample code: Gets a list of Azure Active Directory only authentication object.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAListOfAzureActiveDirectoryOnlyAuthenticationObject(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceAzureADOnlyAuthentications()
+ .listByInstance("Default-SQL-SouthEastAsia", "managedInstance", Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceEncryptionProtectors_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.EncryptionProtectorName;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceEncryptionProtector;
+import com.azure.resourcemanager.sql.generated.models.ServerKeyType;
+
+/** Samples for ManagedInstanceEncryptionProtectors CreateOrUpdate. */
+public final class ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json
+ */
+ /**
+ * Sample code: Update the encryption protector to key vault.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheEncryptionProtectorToKeyVault(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedInstanceEncryptionProtector resource =
+ manager
+ .managedInstanceEncryptionProtectors()
+ .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withServerKeyName("someVault_someKey_01234567890123456789012345678901")
+ .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT)
+ .withAutoRotationEnabled(false)
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json
+ */
+ /**
+ * Sample code: Update the encryption protector to service managed.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheEncryptionProtectorToServiceManaged(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedInstanceEncryptionProtector resource =
+ manager
+ .managedInstanceEncryptionProtectors()
+ .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE)
+ .getValue();
+ resource.update().withServerKeyName("ServiceManaged").withServerKeyType(ServerKeyType.SERVICE_MANAGED).apply();
+ }
+}
+```
+
+### ManagedInstanceEncryptionProtectors_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.EncryptionProtectorName;
+
+/** Samples for ManagedInstanceEncryptionProtectors Get. */
+public final class ManagedInstanceEncryptionProtectorsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json
+ */
+ /**
+ * Sample code: Get the encryption protector.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheEncryptionProtector(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceEncryptionProtectors()
+ .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceEncryptionProtectors_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstanceEncryptionProtectors ListByInstance. */
+public final class ManagedInstanceEncryptionProtectorsListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorList.json
+ */
+ /**
+ * Sample code: List encryption protectors by managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listEncryptionProtectorsByManagedInstance(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceEncryptionProtectors()
+ .listByInstance("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceEncryptionProtectors_Revalidate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.EncryptionProtectorName;
+
+/** Samples for ManagedInstanceEncryptionProtectors Revalidate. */
+public final class ManagedInstanceEncryptionProtectorsRevalidateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json
+ */
+ /**
+ * Sample code: Revalidates the encryption protector.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void revalidatesTheEncryptionProtector(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceEncryptionProtectors()
+ .revalidate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceKeys_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.ServerKeyType;
+
+/** Samples for ManagedInstanceKeys CreateOrUpdate. */
+public final class ManagedInstanceKeysCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Creates or updates a managed instance key.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsOrUpdatesAManagedInstanceKey(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceKeys()
+ .define("someVault_someKey_01234567890123456789012345678901")
+ .withExistingManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645")
+ .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT)
+ .withUri("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901")
+ .create();
+ }
+}
+```
+
+### ManagedInstanceKeys_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstanceKeys Delete. */
+public final class ManagedInstanceKeysDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyDelete.json
+ */
+ /**
+ * Sample code: Delete the managed instance key.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteTheManagedInstanceKey(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceKeys()
+ .delete(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ "someVault_someKey_01234567890123456789012345678901",
+ Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceKeys_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstanceKeys Get. */
+public final class ManagedInstanceKeysGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyGet.json
+ */
+ /**
+ * Sample code: Get the managed instance key.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheManagedInstanceKey(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceKeys()
+ .getWithResponse(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ "someVault_someKey_01234567890123456789012345678901",
+ Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceKeys_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstanceKeys ListByInstance. */
+public final class ManagedInstanceKeysListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyList.json
+ */
+ /**
+ * Sample code: List the keys for a managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listTheKeysForAManagedInstance(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstanceKeys().listByInstance("sqlcrudtest-7398", "sqlcrudtest-4645", null, Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceLongTermRetentionPolicies_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceLongTermRetentionPolicyName;
+
+/** Samples for ManagedInstanceLongTermRetentionPolicies CreateOrUpdate. */
+public final class ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Create or update the LTR policy for the managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateTheLTRPolicyForTheManagedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceLongTermRetentionPolicies()
+ .define(ManagedInstanceLongTermRetentionPolicyName.DEFAULT)
+ .withExistingDatabase("testResourceGroup", "testInstance", "testDatabase")
+ .withWeeklyRetention("P1M")
+ .withMonthlyRetention("P1Y")
+ .withYearlyRetention("P5Y")
+ .withWeekOfYear(5)
+ .create();
+ }
+}
+```
+
+### ManagedInstanceLongTermRetentionPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceLongTermRetentionPolicyName;
+
+/** Samples for ManagedInstanceLongTermRetentionPolicies Get. */
+public final class ManagedInstanceLongTermRetentionPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json
+ */
+ /**
+ * Sample code: Get the long term retention policy for the managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheLongTermRetentionPolicyForTheManagedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceLongTermRetentionPolicies()
+ .getWithResponse(
+ "testResourceGroup",
+ "testInstance",
+ "testDatabase",
+ ManagedInstanceLongTermRetentionPolicyName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceLongTermRetentionPolicies_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstanceLongTermRetentionPolicies ListByDatabase. */
+public final class ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json
+ */
+ /**
+ * Sample code: Get the long term retention policies for the managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheLongTermRetentionPoliciesForTheManagedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceLongTermRetentionPolicies()
+ .listByDatabase("testResourceGroup", "testInstance", "testDatabase", Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceOperations_Cancel
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for ManagedInstanceOperations Cancel. */
+public final class ManagedInstanceOperationsCancelSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelManagedInstanceOperation.json
+ */
+ /**
+ * Sample code: Cancel the managed instance management operation.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void cancelTheManagedInstanceManagementOperation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceOperations()
+ .cancelWithResponse(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ UUID.fromString("11111111-1111-1111-1111-111111111111"),
+ Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceOperations_Get
+
+```java
+import com.azure.core.util.Context;
+import java.util.UUID;
+
+/** Samples for ManagedInstanceOperations Get. */
+public final class ManagedInstanceOperationsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedInstanceOperation.json
+ */
+ /**
+ * Sample code: Gets the managed instance management operation.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheManagedInstanceManagementOperation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceOperations()
+ .getWithResponse(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ UUID.fromString("00000000-1111-2222-3333-444444444444"),
+ Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceOperations_ListByManagedInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstanceOperations ListByManagedInstance. */
+public final class ManagedInstanceOperationsListByManagedInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListManagedInstanceOperations.json
+ */
+ /**
+ * Sample code: List the managed instance management operations.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listTheManagedInstanceManagementOperations(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstanceOperations().listByManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE);
+ }
+}
+```
+
+### ManagedInstancePrivateEndpointConnections_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.ManagedInstancePrivateLinkServiceConnectionStateProperty;
+
+/** Samples for ManagedInstancePrivateEndpointConnections CreateOrUpdate. */
+public final class ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json
+ */
+ /**
+ * Sample code: Approve or reject a private endpoint connection with a given name.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstancePrivateEndpointConnections()
+ .define("private-endpoint-connection-name")
+ .withExistingManagedInstance("Default", "test-cl")
+ .withPrivateLinkServiceConnectionState(
+ new ManagedInstancePrivateLinkServiceConnectionStateProperty()
+ .withStatus("Approved")
+ .withDescription("Approved by johndoe@contoso.com"))
+ .create();
+ }
+}
+```
+
+### ManagedInstancePrivateEndpointConnections_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstancePrivateEndpointConnections Delete. */
+public final class ManagedInstancePrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json
+ */
+ /**
+ * Sample code: Deletes a private endpoint connection with a given name.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deletesAPrivateEndpointConnectionWithAGivenName(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstancePrivateEndpointConnections()
+ .delete("Default", "test-cl", "private-endpoint-connection-name", Context.NONE);
+ }
+}
+```
+
+### ManagedInstancePrivateEndpointConnections_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstancePrivateEndpointConnections Get. */
+public final class ManagedInstancePrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json
+ */
+ /**
+ * Sample code: Gets private endpoint connection.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsPrivateEndpointConnection(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstancePrivateEndpointConnections()
+ .getWithResponse("Default", "test-cl", "private-endpoint-connection-name", Context.NONE);
+ }
+}
+```
+
+### ManagedInstancePrivateEndpointConnections_ListByManagedInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstancePrivateEndpointConnections ListByManagedInstance. */
+public final class ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json
+ */
+ /**
+ * Sample code: Gets list of private endpoint connections on a server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsListOfPrivateEndpointConnectionsOnAServer(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstancePrivateEndpointConnections().listByManagedInstance("Default", "test-cl", Context.NONE);
+ }
+}
+```
+
+### ManagedInstancePrivateLinkResources_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstancePrivateLinkResources Get. */
+public final class ManagedInstancePrivateLinkResourcesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json
+ */
+ /**
+ * Sample code: Gets a private link resource for SQL.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAPrivateLinkResourceForSQL(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstancePrivateLinkResources().getWithResponse("Default", "test-cl", "plr", Context.NONE);
+ }
+}
+```
+
+### ManagedInstancePrivateLinkResources_ListByManagedInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstancePrivateLinkResources ListByManagedInstance. */
+public final class ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json
+ */
+ /**
+ * Sample code: Gets private link resources for SQL.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsPrivateLinkResourcesForSQL(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstancePrivateLinkResources().listByManagedInstance("Default", "test-cl", Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceTdeCertificates_Create
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.TdeCertificate;
+
+/** Samples for ManagedInstanceTdeCertificates Create. */
+public final class ManagedInstanceTdeCertificatesCreateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTdeCertificate.json
+ */
+ /**
+ * Sample code: Upload a TDE certificate.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void uploadATDECertificate(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceTdeCertificates()
+ .create("testtdecert", "testtdecert", new TdeCertificate().withPrivateBlob("MIIXXXXXXXX"), Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceVulnerabilityAssessments_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentRecurringScansProperties;
+import java.util.Arrays;
+
+/** Samples for ManagedInstanceVulnerabilityAssessments CreateOrUpdate. */
+public final class ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json
+ */
+ /**
+ * Sample code: Create a managed instance's vulnerability assessment with minimal parameters, when
+ * storageAccountAccessKey is specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void
+ createAManagedInstanceSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceVulnerabilityAssessments()
+ .define(VulnerabilityAssessmentName.DEFAULT)
+ .withExistingManagedInstance("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440")
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json
+ */
+ /**
+ * Sample code: Create a managed instance's vulnerability assessment with minimal parameters, when
+ * storageContainerSasKey is specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void
+ createAManagedInstanceSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceVulnerabilityAssessments()
+ .define(VulnerabilityAssessmentName.DEFAULT)
+ .withExistingManagedInstance("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440")
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json
+ */
+ /**
+ * Sample code: Create a managed instance's vulnerability assessment with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAManagedInstanceSVulnerabilityAssessmentWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceVulnerabilityAssessments()
+ .define(VulnerabilityAssessmentName.DEFAULT)
+ .withExistingManagedInstance("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440")
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .withRecurringScans(
+ new VulnerabilityAssessmentRecurringScansProperties()
+ .withIsEnabled(true)
+ .withEmailSubscriptionAdmins(true)
+ .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com")))
+ .create();
+ }
+}
+```
+
+### ManagedInstanceVulnerabilityAssessments_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for ManagedInstanceVulnerabilityAssessments Delete. */
+public final class ManagedInstanceVulnerabilityAssessmentsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json
+ */
+ /**
+ * Sample code: Remove a managed instance's vulnerability assessment.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void removeAManagedInstanceSVulnerabilityAssessment(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceVulnerabilityAssessments()
+ .deleteWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ VulnerabilityAssessmentName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceVulnerabilityAssessments_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for ManagedInstanceVulnerabilityAssessments Get. */
+public final class ManagedInstanceVulnerabilityAssessmentsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json
+ */
+ /**
+ * Sample code: Get a managed instance's vulnerability assessment.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAManagedInstanceSVulnerabilityAssessment(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceVulnerabilityAssessments()
+ .getWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ VulnerabilityAssessmentName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedInstanceVulnerabilityAssessments_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstanceVulnerabilityAssessments ListByInstance. */
+public final class ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json
+ */
+ /**
+ * Sample code: Get a managed instance's vulnerability assessment policies.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAManagedInstanceSVulnerabilityAssessmentPolicies(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstanceVulnerabilityAssessments()
+ .listByInstance("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", Context.NONE);
+ }
+}
+```
+
+### ManagedInstances_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.BackupStorageRedundancy;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceExternalAdministrator;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceLicenseType;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceProxyOverride;
+import com.azure.resourcemanager.sql.generated.models.PrincipalType;
+import com.azure.resourcemanager.sql.generated.models.ServicePrincipal;
+import com.azure.resourcemanager.sql.generated.models.ServicePrincipalType;
+import com.azure.resourcemanager.sql.generated.models.Sku;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/** Samples for ManagedInstances CreateOrUpdate. */
+public final class ManagedInstancesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceCreateMin.json
+ */
+ /**
+ * Sample code: Create managed instance with minimal properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createManagedInstanceWithMinimalProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstances()
+ .define("testinstance")
+ .withRegion("Japan East")
+ .withExistingResourceGroup("testrg")
+ .withSku(new Sku().withName("GP_Gen4").withTier("GeneralPurpose"))
+ .withAdministratorLogin("dummylogin")
+ .withAdministratorLoginPassword("PLACEHOLDER")
+ .withSubnetId(
+ "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")
+ .withLicenseType(ManagedInstanceLicenseType.LICENSE_INCLUDED)
+ .withVCores(8)
+ .withStorageSizeInGB(1024)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceCreateMax.json
+ */
+ /**
+ * Sample code: Create managed instance with all properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createManagedInstanceWithAllProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstances()
+ .define("testinstance")
+ .withRegion("Japan East")
+ .withExistingResourceGroup("testrg")
+ .withTags(mapOf("tagKey1", "TagValue1"))
+ .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose"))
+ .withAdministratorLogin("dummylogin")
+ .withAdministratorLoginPassword("PLACEHOLDER")
+ .withSubnetId(
+ "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")
+ .withLicenseType(ManagedInstanceLicenseType.LICENSE_INCLUDED)
+ .withVCores(8)
+ .withStorageSizeInGB(1024)
+ .withCollation("SQL_Latin1_General_CP1_CI_AS")
+ .withDnsZonePartner(
+ "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance")
+ .withPublicDataEndpointEnabled(false)
+ .withProxyOverride(ManagedInstanceProxyOverride.REDIRECT)
+ .withTimezoneId("UTC")
+ .withInstancePoolId(
+ "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1")
+ .withMaintenanceConfigurationId(
+ "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1")
+ .withMinimalTlsVersion("1.2")
+ .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO)
+ .withAdministrators(
+ new ManagedInstanceExternalAdministrator()
+ .withPrincipalType(PrincipalType.USER)
+ .withLogin("bob@contoso.com")
+ .withSid(UUID.fromString("00000011-1111-2222-2222-123456789111"))
+ .withTenantId(UUID.fromString("00000011-1111-2222-2222-123456789111"))
+ .withAzureADOnlyAuthentication(true))
+ .withServicePrincipal(new ServicePrincipal().withType(ServicePrincipalType.SYSTEM_ASSIGNED))
+ .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;
+ }
+}
+```
+
+### ManagedInstances_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstances Delete. */
+public final class ManagedInstancesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceDelete.json
+ */
+ /**
+ * Sample code: Delete managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteManagedInstance(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstances().delete("testrg", "testinstance", Context.NONE);
+ }
+}
+```
+
+### ManagedInstances_Failover
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ReplicaType;
+
+/** Samples for ManagedInstances Failover. */
+public final class ManagedInstancesFailoverSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/FailoverManagedInstance.json
+ */
+ /**
+ * Sample code: Failover a managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void failoverAManagedInstance(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstances().failover("group1", "instanceName", ReplicaType.PRIMARY, Context.NONE);
+ }
+}
+```
+
+### ManagedInstances_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstances GetByResourceGroup. */
+public final class ManagedInstancesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json
+ */
+ /**
+ * Sample code: Get managed instance with $expand=administrators/activedirectory.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getManagedInstanceWithExpandAdministratorsActivedirectory(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstances().getByResourceGroupWithResponse("testrg", "testinstance", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceGet.json
+ */
+ /**
+ * Sample code: Get managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getManagedInstance(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstances().getByResourceGroupWithResponse("testrg", "testinstance", null, Context.NONE);
+ }
+}
+```
+
+### ManagedInstances_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstances List. */
+public final class ManagedInstancesListSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceList.json
+ */
+ /**
+ * Sample code: List managed instances.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedInstances(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstances().list(null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json
+ */
+ /**
+ * Sample code: List managed instances with $expand=administrators/activedirectory.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedInstancesWithExpandAdministratorsActivedirectory(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstances().list(null, Context.NONE);
+ }
+}
+```
+
+### ManagedInstances_ListByInstancePool
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstances ListByInstancePool. */
+public final class ManagedInstancesListByInstancePoolSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListByInstancePool.json
+ */
+ /**
+ * Sample code: List managed instances by instance pool.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedInstancesByInstancePool(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstances().listByInstancePool("Test1", "pool1", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json
+ */
+ /**
+ * Sample code: List managed instances by instance pool with $expand=administrators/activedirectory.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedInstancesByInstancePoolWithExpandAdministratorsActivedirectory(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstances().listByInstancePool("Test1", "pool1", null, Context.NONE);
+ }
+}
+```
+
+### ManagedInstances_ListByManagedInstance
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.MetricType;
+import com.azure.resourcemanager.sql.generated.models.QueryTimeGrainType;
+
+/** Samples for ManagedInstances ListByManagedInstance. */
+public final class ManagedInstancesListByManagedInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceTopQueriesList.json
+ */
+ /**
+ * Sample code: Obtain list of instance's top resource consuming queries.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void obtainListOfInstanceSTopResourceConsumingQueries(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstances()
+ .listByManagedInstance(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ null,
+ null,
+ null,
+ null,
+ QueryTimeGrainType.PT1H,
+ null,
+ MetricType.DURATION,
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceTopQueriesListMax.json
+ */
+ /**
+ * Sample code: Obtain list of instance's top resource consuming queries. Full-blown request and response.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void obtainListOfInstanceSTopResourceConsumingQueriesFullBlownRequestAndResponse(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstances()
+ .listByManagedInstance(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ null,
+ "db1,db2",
+ "2020-03-10T12:00:00Z",
+ "2020-03-12T12:00:00Z",
+ QueryTimeGrainType.P1D,
+ null,
+ MetricType.CPU,
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceTopQueriesListMin.json
+ */
+ /**
+ * Sample code: Obtain list of instance's top resource consuming queries. Minimal request and response.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void obtainListOfInstanceSTopResourceConsumingQueriesMinimalRequestAndResponse(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedInstances()
+ .listByManagedInstance(
+ "sqlcrudtest-7398", "sqlcrudtest-4645", null, null, null, null, null, null, null, Context.NONE);
+ }
+}
+```
+
+### ManagedInstances_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedInstances ListByResourceGroup. */
+public final class ManagedInstancesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json
+ */
+ /**
+ * Sample code: List managed instances by resource group with $expand=administrators/activedirectory.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedInstancesByResourceGroupWithExpandAdministratorsActivedirectory(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstances().listByResourceGroup("Test1", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListByResourceGroup.json
+ */
+ /**
+ * Sample code: List managed instances by resource group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedInstancesByResourceGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.managedInstances().listByResourceGroup("Test1", null, Context.NONE);
+ }
+}
+```
+
+### ManagedInstances_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstance;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceLicenseType;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceProxyOverride;
+import com.azure.resourcemanager.sql.generated.models.Sku;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ManagedInstances Update. */
+public final class ManagedInstancesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceUpdateMin.json
+ */
+ /**
+ * Sample code: Update managed instance with minimal properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateManagedInstanceWithMinimalProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedInstance resource =
+ manager
+ .managedInstances()
+ .getByResourceGroupWithResponse("testrg", "testinstance", null, Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagKey1", "TagValue1")).apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceUpdateMax.json
+ */
+ /**
+ * Sample code: Update managed instance with all properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateManagedInstanceWithAllProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedInstance resource =
+ manager
+ .managedInstances()
+ .getByResourceGroupWithResponse("testrg", "testinstance", null, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("tagKey1", "TagValue1"))
+ .withSku(new Sku().withName("GP_Gen4").withTier("GeneralPurpose").withCapacity(8))
+ .withAdministratorLoginPassword("PLACEHOLDER")
+ .withLicenseType(ManagedInstanceLicenseType.BASE_PRICE)
+ .withVCores(8)
+ .withStorageSizeInGB(448)
+ .withPublicDataEndpointEnabled(false)
+ .withProxyOverride(ManagedInstanceProxyOverride.REDIRECT)
+ .withMaintenanceConfigurationId(
+ "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1")
+ .withMinimalTlsVersion("1.2")
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json
+ */
+ /**
+ * Sample code: Remove maintenance policy from managed instance (select default maintenance policy).
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void removeMaintenancePolicyFromManagedInstanceSelectDefaultMaintenancePolicy(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedInstance resource =
+ manager
+ .managedInstances()
+ .getByResourceGroupWithResponse("testrg", "testinstance", null, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withMaintenanceConfigurationId(
+ "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default")
+ .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;
+ }
+}
+```
+
+### ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.ManagedBackupShortTermRetentionPolicyInner;
+import com.azure.resourcemanager.sql.generated.models.ManagedShortTermRetentionPolicyName;
+
+/** Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies CreateOrUpdate. */
+public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json
+ */
+ /**
+ * Sample code: Update the short term retention policy for the restorable dropped database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheShortTermRetentionPolicyForTheRestorableDroppedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies()
+ .createOrUpdate(
+ "resourceGroup",
+ "testsvr",
+ "testdb,131403269876900000",
+ ManagedShortTermRetentionPolicyName.DEFAULT,
+ new ManagedBackupShortTermRetentionPolicyInner().withRetentionDays(14),
+ Context.NONE);
+ }
+}
+```
+
+### ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ManagedShortTermRetentionPolicyName;
+
+/** Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies Get. */
+public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json
+ */
+ /**
+ * Sample code: Get the short term retention policy for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheShortTermRetentionPolicyForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies()
+ .getWithResponse(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ "testdb,131403269876900000",
+ ManagedShortTermRetentionPolicyName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_ListByRestorableDroppedDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies ListByRestorableDroppedDatabase. */
+public final
+class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json
+ */
+ /**
+ * Sample code: Get the short term retention policy list for the database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheShortTermRetentionPolicyListForTheDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies()
+ .listByRestorableDroppedDatabase(
+ "Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", Context.NONE);
+ }
+}
+```
+
+### ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.ManagedBackupShortTermRetentionPolicyInner;
+import com.azure.resourcemanager.sql.generated.models.ManagedShortTermRetentionPolicyName;
+
+/** Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies Update. */
+public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json
+ */
+ /**
+ * Sample code: Update the short term retention policy for the restorable dropped database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateTheShortTermRetentionPolicyForTheRestorableDroppedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies()
+ .update(
+ "resourceGroup",
+ "testsvr",
+ "testdb,131403269876900000",
+ ManagedShortTermRetentionPolicyName.DEFAULT,
+ new ManagedBackupShortTermRetentionPolicyInner().withRetentionDays(14),
+ Context.NONE);
+ }
+}
+```
+
+### ManagedServerSecurityAlertPolicies_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ManagedServerSecurityAlertPolicy;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertPolicyName;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertsPolicyState;
+import java.util.Arrays;
+
+/** Samples for ManagedServerSecurityAlertPolicies CreateOrUpdate. */
+public final class ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertCreateMin.json
+ */
+ /**
+ * Sample code: Update a managed server's threat detection policy with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAManagedServerSThreatDetectionPolicyWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedServerSecurityAlertPolicy resource =
+ manager
+ .managedServerSecurityAlertPolicies()
+ .getWithResponse(
+ "securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource.update().withState(SecurityAlertsPolicyState.ENABLED).apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertCreateMax.json
+ */
+ /**
+ * Sample code: Update a managed server's threat detection policy with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAManagedServerSThreatDetectionPolicyWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ManagedServerSecurityAlertPolicy resource =
+ manager
+ .managedServerSecurityAlertPolicies()
+ .getWithResponse(
+ "securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withState(SecurityAlertsPolicyState.ENABLED)
+ .withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly"))
+ .withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com"))
+ .withEmailAccountAdmins(true)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .withRetentionDays(5)
+ .apply();
+ }
+}
+```
+
+### ManagedServerSecurityAlertPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertPolicyName;
+
+/** Samples for ManagedServerSecurityAlertPolicies Get. */
+public final class ManagedServerSecurityAlertPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertGet.json
+ */
+ /**
+ * Sample code: Get a managed server's threat detection policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAManagedServerSThreatDetectionPolicy(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedServerSecurityAlertPolicies()
+ .getWithResponse("securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### ManagedServerSecurityAlertPolicies_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagedServerSecurityAlertPolicies ListByInstance. */
+public final class ManagedServerSecurityAlertPoliciesListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertListByInstance.json
+ */
+ /**
+ * Sample code: Get the managed server's threat detection policies.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheManagedServerSThreatDetectionPolicies(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .managedServerSecurityAlertPolicies()
+ .listByInstance("securityalert-4799", "securityalert-6440", Context.NONE);
+ }
+}
+```
+
+### OutboundFirewallRules_CreateOrUpdate
+
+```java
+/** Samples for OutboundFirewallRules CreateOrUpdate. */
+public final class OutboundFirewallRulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleCreate.json
+ */
+ /**
+ * Sample code: Approve or reject a outbound firewall rule with a given name.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void approveOrRejectAOutboundFirewallRuleWithAGivenName(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .outboundFirewallRules()
+ .define("server.database.windows.net")
+ .withExistingServer("sqlcrudtest-7398", "sqlcrudtest-4645")
+ .create();
+ }
+}
+```
+
+### OutboundFirewallRules_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for OutboundFirewallRules Delete. */
+public final class OutboundFirewallRulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleDelete.json
+ */
+ /**
+ * Sample code: Deletes a outbound firewall rule with a given name.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deletesAOutboundFirewallRuleWithAGivenName(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .outboundFirewallRules()
+ .delete("sqlcrudtest-7398", "sqlcrudtest-6661", "server.database.windows.net", Context.NONE);
+ }
+}
+```
+
+### OutboundFirewallRules_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for OutboundFirewallRules Get. */
+public final class OutboundFirewallRulesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleGet.json
+ */
+ /**
+ * Sample code: Gets outbound firewall rule.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsOutboundFirewallRule(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .outboundFirewallRules()
+ .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "server.database.windows.net", Context.NONE);
+ }
+}
+```
+
+### OutboundFirewallRules_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for OutboundFirewallRules ListByServer. */
+public final class OutboundFirewallRulesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleList.json
+ */
+ /**
+ * Sample code: Gets list of outbound firewall rules on a server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsListOfOutboundFirewallRulesOnAServer(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.outboundFirewallRules().listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.PrivateLinkServiceConnectionStateProperty;
+import com.azure.resourcemanager.sql.generated.models.PrivateLinkServiceConnectionStateStatus;
+
+/** Samples for PrivateEndpointConnections CreateOrUpdate. */
+public final class PrivateEndpointConnectionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionUpdate.json
+ */
+ /**
+ * Sample code: Approve or reject a private endpoint connection with a given name.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .privateEndpointConnections()
+ .define("private-endpoint-connection-name")
+ .withExistingServer("Default", "test-svr")
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionStateProperty()
+ .withStatus(PrivateLinkServiceConnectionStateStatus.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/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionDelete.json
+ */
+ /**
+ * Sample code: Deletes a private endpoint connection with a given name.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deletesAPrivateEndpointConnectionWithAGivenName(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .privateEndpointConnections()
+ .delete("Default", "test-svr", "private-endpoint-connection-name", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionGet.json
+ */
+ /**
+ * Sample code: Gets private endpoint connection.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsPrivateEndpointConnection(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("Default", "test-svr", "private-endpoint-connection-name", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections ListByServer. */
+public final class PrivateEndpointConnectionsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionList.json
+ */
+ /**
+ * Sample code: Gets list of private endpoint connections on a server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsListOfPrivateEndpointConnectionsOnAServer(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.privateEndpointConnections().listByServer("Default", "test-svr", Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResources_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources Get. */
+public final class PrivateLinkResourcesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateLinkResourcesGet.json
+ */
+ /**
+ * Sample code: Gets a private link resource for SQL.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAPrivateLinkResourceForSQL(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.privateLinkResources().getWithResponse("Default", "test-svr", "plr", Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResources_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources ListByServer. */
+public final class PrivateLinkResourcesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateLinkResourcesList.json
+ */
+ /**
+ * Sample code: Gets private link resources for SQL.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsPrivateLinkResourcesForSQL(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.privateLinkResources().listByServer("Default", "test-svr", Context.NONE);
+ }
+}
+```
+
+### RecommendedSensitivityLabels_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.RecommendedSensitivityLabelUpdate;
+import com.azure.resourcemanager.sql.generated.models.RecommendedSensitivityLabelUpdateKind;
+import com.azure.resourcemanager.sql.generated.models.RecommendedSensitivityLabelUpdateList;
+import java.util.Arrays;
+
+/** Samples for RecommendedSensitivityLabels Update. */
+public final class RecommendedSensitivityLabelsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsRecommendedUpdate.json
+ */
+ /**
+ * Sample code: Update recommended sensitivity labels of a given database using an operations batch.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateRecommendedSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .recommendedSensitivityLabels()
+ .updateWithResponse(
+ "myRG",
+ "myServer",
+ "myDatabase",
+ new RecommendedSensitivityLabelUpdateList()
+ .withOperations(
+ Arrays
+ .asList(
+ new RecommendedSensitivityLabelUpdate()
+ .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE)
+ .withSchema("dbo")
+ .withTable("table1")
+ .withColumn("column1"),
+ new RecommendedSensitivityLabelUpdate()
+ .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE)
+ .withSchema("dbo")
+ .withTable("table2")
+ .withColumn("column2"),
+ new RecommendedSensitivityLabelUpdate()
+ .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE)
+ .withSchema("dbo")
+ .withTable("table1")
+ .withColumn("column3"))),
+ Context.NONE);
+ }
+}
+```
+
+### RecoverableDatabases_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RecoverableDatabases Get. */
+public final class RecoverableDatabasesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/RecoverableDatabaseGet.json
+ */
+ /**
+ * Sample code: Get a recoverable database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getARecoverableDatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .recoverableDatabases()
+ .getWithResponse(
+ "recoverabledatabasetest-6852",
+ "recoverabledatabasetest-2080",
+ "recoverabledatabasetest-9187",
+ Context.NONE);
+ }
+}
+```
+
+### RecoverableDatabases_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RecoverableDatabases ListByServer. */
+public final class RecoverableDatabasesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/RecoverableDatabaseList.json
+ */
+ /**
+ * Sample code: Get list of restorable dropped databases.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getListOfRestorableDroppedDatabases(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .recoverableDatabases()
+ .listByServer("recoverabledatabasetest-1234", "recoverabledatabasetest-7177", Context.NONE);
+ }
+}
+```
+
+### RecoverableManagedDatabases_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RecoverableManagedDatabases Get. */
+public final class RecoverableManagedDatabasesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetRecoverableManagedDatabase.json
+ */
+ /**
+ * Sample code: Gets a recoverable databases by managed instances.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsARecoverableDatabasesByManagedInstances(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.recoverableManagedDatabases().getWithResponse("Test1", "managedInstance", "testdb", Context.NONE);
+ }
+}
+```
+
+### RecoverableManagedDatabases_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RecoverableManagedDatabases ListByInstance. */
+public final class RecoverableManagedDatabasesListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListRecoverableManagedDatabasesByServer.json
+ */
+ /**
+ * Sample code: List recoverable databases by managed instances.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listRecoverableDatabasesByManagedInstances(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.recoverableManagedDatabases().listByInstance("Test1", "managedInstance", Context.NONE);
+ }
+}
+```
+
+### ReplicationLinks_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ReplicationLinks Delete. */
+public final class ReplicationLinksDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json
+ */
+ /**
+ * Sample code: Delete a replication link.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAReplicationLink(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .replicationLinks()
+ .deleteWithResponse(
+ "sqlcrudtest-4799", "sqlcrudtest-6440", "testdb", "5b301b68-03f6-4b26-b0f4-73ebb8634238", Context.NONE);
+ }
+}
+```
+
+### ReplicationLinks_Failover
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ReplicationLinks Failover. */
+public final class ReplicationLinksFailoverSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json
+ */
+ /**
+ * Sample code: Failover a replication link.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void failoverAReplicationLink(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .replicationLinks()
+ .failover(
+ "sqlcrudtest-8931", "sqlcrudtest-2137", "testdb", "f0550bf5-07ce-4270-8e4b-71737975973a", Context.NONE);
+ }
+}
+```
+
+### ReplicationLinks_FailoverAllowDataLoss
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ReplicationLinks FailoverAllowDataLoss. */
+public final class ReplicationLinksFailoverAllowDataLossSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json
+ */
+ /**
+ * Sample code: Failover a replication link.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void failoverAReplicationLink(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .replicationLinks()
+ .failoverAllowDataLoss(
+ "sqlcrudtest-8931", "sqlcrudtest-2137", "testdb", "f0550bf5-07ce-4270-8e4b-71737975973a", Context.NONE);
+ }
+}
+```
+
+### ReplicationLinks_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ReplicationLinks Get. */
+public final class ReplicationLinksGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkGet.json
+ */
+ /**
+ * Sample code: Gets the replication link.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheReplicationLink(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .replicationLinks()
+ .getWithResponse("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", Context.NONE);
+ }
+}
+```
+
+### ReplicationLinks_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ReplicationLinks ListByDatabase. */
+public final class ReplicationLinksListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkListByDatabase.json
+ */
+ /**
+ * Sample code: List replication links on server on database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listReplicationLinksOnServerOnDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.replicationLinks().listByDatabase("Default", "sourcesvr", "tetha-db", Context.NONE);
+ }
+}
+```
+
+### ReplicationLinks_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ReplicationLinks ListByServer. */
+public final class ReplicationLinksListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkListByServer.json
+ */
+ /**
+ * Sample code: List replication links on server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listReplicationLinksOnServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.replicationLinks().listByServer("Default", "sourcesvr", Context.NONE);
+ }
+}
+```
+
+### ReplicationLinks_Unlink
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.UnlinkParameters;
+
+/** Samples for ReplicationLinks Unlink. */
+public final class ReplicationLinksUnlinkSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json
+ */
+ /**
+ * Sample code: Delete replication link.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteReplicationLink(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .replicationLinks()
+ .unlink(
+ "sqlcrudtest-8931",
+ "sqlcrudtest-2137",
+ "testdb",
+ "f0550bf5-07ce-4270-8e4b-71737975973a",
+ new UnlinkParameters().withForcedTermination(true),
+ Context.NONE);
+ }
+}
+```
+
+### RestorableDroppedDatabases_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableDroppedDatabases Get. */
+public final class RestorableDroppedDatabasesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/GetRestorableDroppedDatabase.json
+ */
+ /**
+ * Sample code: Gets a restorable dropped database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsARestorableDroppedDatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .restorableDroppedDatabases()
+ .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", Context.NONE);
+ }
+}
+```
+
+### RestorableDroppedDatabases_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableDroppedDatabases ListByServer. */
+public final class RestorableDroppedDatabasesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListRestorableDroppedDatabasesByServer.json
+ */
+ /**
+ * Sample code: Gets a list of restorable dropped databases.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAListOfRestorableDroppedDatabases(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.restorableDroppedDatabases().listByServer("Default-SQL-SouthEastAsia", "testsvr", Context.NONE);
+ }
+}
+```
+
+### RestorableDroppedManagedDatabases_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableDroppedManagedDatabases Get. */
+public final class RestorableDroppedManagedDatabasesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json
+ */
+ /**
+ * Sample code: Gets a restorable dropped managed database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsARestorableDroppedManagedDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .restorableDroppedManagedDatabases()
+ .getWithResponse("Test1", "managedInstance", "testdb,131403269876900000", Context.NONE);
+ }
+}
+```
+
+### RestorableDroppedManagedDatabases_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorableDroppedManagedDatabases ListByInstance. */
+public final class RestorableDroppedManagedDatabasesListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json
+ */
+ /**
+ * Sample code: List restorable dropped databases by managed instances.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listRestorableDroppedDatabasesByManagedInstances(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.restorableDroppedManagedDatabases().listByInstance("Test1", "managedInstance", Context.NONE);
+ }
+}
+```
+
+### RestorePoints_Create
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.CreateDatabaseRestorePointDefinition;
+
+/** Samples for RestorePoints Create. */
+public final class RestorePointsCreateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsPost.json
+ */
+ /**
+ * Sample code: Creates datawarehouse database restore point.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsDatawarehouseDatabaseRestorePoint(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .restorePoints()
+ .create(
+ "Default-SQL-SouthEastAsia",
+ "testserver",
+ "testDatabase",
+ new CreateDatabaseRestorePointDefinition().withRestorePointLabel("mylabel"),
+ Context.NONE);
+ }
+}
+```
+
+### RestorePoints_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorePoints Delete. */
+public final class RestorePointsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsDelete.json
+ */
+ /**
+ * Sample code: Deletes a restore point.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deletesARestorePoint(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .restorePoints()
+ .deleteWithResponse(
+ "Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", Context.NONE);
+ }
+}
+```
+
+### RestorePoints_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorePoints Get. */
+public final class RestorePointsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsGet.json
+ */
+ /**
+ * Sample code: Gets a database restore point.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsADatabaseRestorePoint(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .restorePoints()
+ .getWithResponse(
+ "Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DataWarehouseRestorePointsGet.json
+ */
+ /**
+ * Sample code: Gets a datawarehouse database restore point.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsADatawarehouseDatabaseRestorePoint(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .restorePoints()
+ .getWithResponse(
+ "Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", Context.NONE);
+ }
+}
+```
+
+### RestorePoints_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RestorePoints ListByDatabase. */
+public final class RestorePointsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsListByDatabase.json
+ */
+ /**
+ * Sample code: List database restore points.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatabaseRestorePoints(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.restorePoints().listByDatabase("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json
+ */
+ /**
+ * Sample code: List datawarehouse database restore points.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDatawarehouseDatabaseRestorePoints(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.restorePoints().listByDatabase("Default-SQL-SouthEastAsia", "testserver", "testDatabase", Context.NONE);
+ }
+}
+```
+
+### SensitivityLabels_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.SensitivityLabelInner;
+import com.azure.resourcemanager.sql.generated.models.SensitivityLabelRank;
+
+/** Samples for SensitivityLabels CreateOrUpdate. */
+public final class SensitivityLabelsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnSensitivityLabelCreateMax.json
+ */
+ /**
+ * Sample code: Updates the sensitivity label of a given column with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updatesTheSensitivityLabelOfAGivenColumnWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .sensitivityLabels()
+ .createOrUpdateWithResponse(
+ "myRG",
+ "myServer",
+ "myDatabase",
+ "dbo",
+ "myTable",
+ "myColumn",
+ new SensitivityLabelInner()
+ .withLabelName("PII")
+ .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff")
+ .withInformationType("PhoneNumber")
+ .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646")
+ .withRank(SensitivityLabelRank.LOW),
+ Context.NONE);
+ }
+}
+```
+
+### SensitivityLabels_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SensitivityLabels Delete. */
+public final class SensitivityLabelsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnSensitivityLabelDelete.json
+ */
+ /**
+ * Sample code: Deletes the sensitivity label of a given column.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deletesTheSensitivityLabelOfAGivenColumn(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .sensitivityLabels()
+ .deleteWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE);
+ }
+}
+```
+
+### SensitivityLabels_DisableRecommendation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SensitivityLabels DisableRecommendation. */
+public final class SensitivityLabelsDisableRecommendationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json
+ */
+ /**
+ * Sample code: Disables sensitivity recommendations on a given column.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void disablesSensitivityRecommendationsOnAGivenColumn(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .sensitivityLabels()
+ .disableRecommendationWithResponse(
+ "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE);
+ }
+}
+```
+
+### SensitivityLabels_EnableRecommendation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SensitivityLabels EnableRecommendation. */
+public final class SensitivityLabelsEnableRecommendationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json
+ */
+ /**
+ * Sample code: Enables sensitivity recommendations on a given column.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void enablesSensitivityRecommendationsOnAGivenColumn(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .sensitivityLabels()
+ .enableRecommendationWithResponse(
+ "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE);
+ }
+}
+```
+
+### SensitivityLabels_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SensitivityLabelSource;
+
+/** Samples for SensitivityLabels Get. */
+public final class SensitivityLabelsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnSensitivityLabelGet.json
+ */
+ /**
+ * Sample code: Gets the sensitivity label of a given column.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheSensitivityLabelOfAGivenColumn(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .sensitivityLabels()
+ .getWithResponse(
+ "myRG",
+ "myServer",
+ "myDatabase",
+ "dbo",
+ "myTable",
+ "myColumn",
+ SensitivityLabelSource.CURRENT,
+ Context.NONE);
+ }
+}
+```
+
+### SensitivityLabels_ListCurrentByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SensitivityLabels ListCurrentByDatabase. */
+public final class SensitivityLabelsListCurrentByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json
+ */
+ /**
+ * Sample code: Gets the current sensitivity labels of a given database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheCurrentSensitivityLabelsOfAGivenDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .sensitivityLabels()
+ .listCurrentByDatabase("myRG", "myServer", "myDatabase", null, null, null, Context.NONE);
+ }
+}
+```
+
+### SensitivityLabels_ListRecommendedByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SensitivityLabels ListRecommendedByDatabase. */
+public final class SensitivityLabelsListRecommendedByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json
+ */
+ /**
+ * Sample code: Gets the recommended sensitivity labels of a given database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsTheRecommendedSensitivityLabelsOfAGivenDatabase(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .sensitivityLabels()
+ .listRecommendedByDatabase("myRG", "myServer", "myDatabase", null, null, null, Context.NONE);
+ }
+}
+```
+
+### SensitivityLabels_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.SensitivityLabelInner;
+import com.azure.resourcemanager.sql.generated.fluent.models.SensitivityLabelUpdateInner;
+import com.azure.resourcemanager.sql.generated.models.SensitivityLabelRank;
+import com.azure.resourcemanager.sql.generated.models.SensitivityLabelUpdateKind;
+import com.azure.resourcemanager.sql.generated.models.SensitivityLabelUpdateList;
+import java.util.Arrays;
+
+/** Samples for SensitivityLabels Update. */
+public final class SensitivityLabelsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsCurrentUpdate.json
+ */
+ /**
+ * Sample code: Update sensitivity labels of a given database using an operations batch.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .sensitivityLabels()
+ .updateWithResponse(
+ "myRG",
+ "myServer",
+ "myDatabase",
+ new SensitivityLabelUpdateList()
+ .withOperations(
+ Arrays
+ .asList(
+ new SensitivityLabelUpdateInner()
+ .withOp(SensitivityLabelUpdateKind.SET)
+ .withSchema("dbo")
+ .withTable("table1")
+ .withColumn("column1")
+ .withSensitivityLabel(
+ new SensitivityLabelInner()
+ .withLabelName("Highly Confidential")
+ .withLabelId("3A477B16-9423-432B-AA97-6069B481CEC3")
+ .withInformationType("Financial")
+ .withInformationTypeId("1D3652D6-422C-4115-82F1-65DAEBC665C8")
+ .withRank(SensitivityLabelRank.LOW)),
+ new SensitivityLabelUpdateInner()
+ .withOp(SensitivityLabelUpdateKind.SET)
+ .withSchema("dbo")
+ .withTable("table2")
+ .withColumn("column2")
+ .withSensitivityLabel(
+ new SensitivityLabelInner()
+ .withLabelName("PII")
+ .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff")
+ .withInformationType("PhoneNumber")
+ .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646")
+ .withRank(SensitivityLabelRank.CRITICAL)),
+ new SensitivityLabelUpdateInner()
+ .withOp(SensitivityLabelUpdateKind.REMOVE)
+ .withSchema("dbo")
+ .withTable("Table1")
+ .withColumn("Column3"))),
+ Context.NONE);
+ }
+}
+```
+
+### ServerAdvisors_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerAdvisors Get. */
+public final class ServerAdvisorsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorGet.json
+ */
+ /**
+ * Sample code: Get server advisor.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getServerAdvisor(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverAdvisors().getWithResponse("workloadinsight-demos", "misosisvr", "CreateIndex", Context.NONE);
+ }
+}
+```
+
+### ServerAdvisors_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerAdvisors ListByServer. */
+public final class ServerAdvisorsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorList.json
+ */
+ /**
+ * Sample code: List of server advisors.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listOfServerAdvisors(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverAdvisors().listByServerWithResponse("workloadinsight-demos", "misosisvr", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerRecommendedActionListExpand.json
+ */
+ /**
+ * Sample code: List of server recommended actions for all advisors.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listOfServerRecommendedActionsForAllAdvisors(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverAdvisors()
+ .listByServerWithResponse("workloadinsight-demos", "misosisvr", "recommendedActions", Context.NONE);
+ }
+}
+```
+
+### ServerAdvisors_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.AdvisorInner;
+import com.azure.resourcemanager.sql.generated.models.AutoExecuteStatus;
+
+/** Samples for ServerAdvisors Update. */
+public final class ServerAdvisorsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorUpdate.json
+ */
+ /**
+ * Sample code: Update server advisor.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateServerAdvisor(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverAdvisors()
+ .updateWithResponse(
+ "workloadinsight-demos",
+ "misosisvr",
+ "CreateIndex",
+ new AdvisorInner().withAutoExecuteStatus(AutoExecuteStatus.DISABLED),
+ Context.NONE);
+ }
+}
+```
+
+### ServerAutomaticTuning_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerAutomaticTuning Get. */
+public final class ServerAutomaticTuningGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningGet.json
+ */
+ /**
+ * Sample code: Get a server's automatic tuning settings.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAServerSAutomaticTuningSettings(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverAutomaticTunings().getWithResponse("default-sql-onebox", "testsvr11", Context.NONE);
+ }
+}
+```
+
+### ServerAutomaticTuning_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.ServerAutomaticTuningInner;
+import com.azure.resourcemanager.sql.generated.models.AutomaticTuningOptionModeDesired;
+import com.azure.resourcemanager.sql.generated.models.AutomaticTuningServerMode;
+import com.azure.resourcemanager.sql.generated.models.AutomaticTuningServerOptions;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ServerAutomaticTuning Update. */
+public final class ServerAutomaticTuningUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningUpdateMax.json
+ */
+ /**
+ * Sample code: Updates server automatic tuning settings with all properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updatesServerAutomaticTuningSettingsWithAllProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverAutomaticTunings()
+ .updateWithResponse(
+ "default-sql-onebox",
+ "testsvr11",
+ new ServerAutomaticTuningInner()
+ .withDesiredState(AutomaticTuningServerMode.AUTO)
+ .withOptions(
+ mapOf(
+ "createIndex",
+ new AutomaticTuningServerOptions().withDesiredState(AutomaticTuningOptionModeDesired.OFF),
+ "dropIndex",
+ new AutomaticTuningServerOptions().withDesiredState(AutomaticTuningOptionModeDesired.ON),
+ "forceLastGoodPlan",
+ new AutomaticTuningServerOptions()
+ .withDesiredState(AutomaticTuningOptionModeDesired.DEFAULT))),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningUpdateMin.json
+ */
+ /**
+ * Sample code: Updates server automatic tuning settings with minimal properties.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updatesServerAutomaticTuningSettingsWithMinimalProperties(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverAutomaticTunings()
+ .updateWithResponse(
+ "default-sql-onebox",
+ "testsvr11",
+ new ServerAutomaticTuningInner().withDesiredState(AutomaticTuningServerMode.AUTO),
+ 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;
+ }
+}
+```
+
+### ServerAzureADAdministrators_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.AdministratorName;
+import com.azure.resourcemanager.sql.generated.models.AdministratorType;
+import java.util.UUID;
+
+/** Samples for ServerAzureADAdministrators CreateOrUpdate. */
+public final class ServerAzureADAdministratorsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Creates or updates an existing Azure Active Directory administrator.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsOrUpdatesAnExistingAzureActiveDirectoryAdministrator(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverAzureADAdministrators()
+ .define(AdministratorName.ACTIVE_DIRECTORY)
+ .withExistingServer("sqlcrudtest-4799", "sqlcrudtest-6440")
+ .withAdministratorType(AdministratorType.ACTIVE_DIRECTORY)
+ .withLogin("bob@contoso.com")
+ .withSid(UUID.fromString("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"))
+ .withTenantId(UUID.fromString("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"))
+ .create();
+ }
+}
+```
+
+### ServerAzureADAdministrators_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.AdministratorName;
+
+/** Samples for ServerAzureADAdministrators Delete. */
+public final class ServerAzureADAdministratorsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorDelete.json
+ */
+ /**
+ * Sample code: Delete Azure Active Directory administrator.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAzureActiveDirectoryAdministrator(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverAzureADAdministrators()
+ .delete("sqlcrudtest-4799", "sqlcrudtest-6440", AdministratorName.ACTIVE_DIRECTORY, Context.NONE);
+ }
+}
+```
+
+### ServerAzureADAdministrators_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.AdministratorName;
+
+/** Samples for ServerAzureADAdministrators Get. */
+public final class ServerAzureADAdministratorsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorGet.json
+ */
+ /**
+ * Sample code: Gets a Azure Active Directory administrator.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAAzureActiveDirectoryAdministrator(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverAzureADAdministrators()
+ .getWithResponse("sqlcrudtest-4799", "sqlcrudtest-6440", AdministratorName.ACTIVE_DIRECTORY, Context.NONE);
+ }
+}
+```
+
+### ServerAzureADAdministrators_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerAzureADAdministrators ListByServer. */
+public final class ServerAzureADAdministratorsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorList.json
+ */
+ /**
+ * Sample code: Gets a list of Azure Active Directory administrator.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAListOfAzureActiveDirectoryAdministrator(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverAzureADAdministrators().listByServer("sqlcrudtest-4799", "sqlcrudtest-6440", Context.NONE);
+ }
+}
+```
+
+### ServerAzureADOnlyAuthentications_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.AuthenticationName;
+
+/** Samples for ServerAzureADOnlyAuthentications CreateOrUpdate. */
+public final class ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Creates or updates Azure Active Directory only authentication object.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsOrUpdatesAzureActiveDirectoryOnlyAuthenticationObject(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverAzureADOnlyAuthentications()
+ .define(AuthenticationName.DEFAULT)
+ .withExistingServer("sqlcrudtest-4799", "sqlcrudtest-6440")
+ .withAzureADOnlyAuthentication(false)
+ .create();
+ }
+}
+```
+
+### ServerAzureADOnlyAuthentications_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.AuthenticationName;
+
+/** Samples for ServerAzureADOnlyAuthentications Delete. */
+public final class ServerAzureADOnlyAuthenticationsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthDelete.json
+ */
+ /**
+ * Sample code: Deletes Azure Active Directory only authentication object.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deletesAzureActiveDirectoryOnlyAuthenticationObject(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverAzureADOnlyAuthentications()
+ .delete("sqlcrudtest-4799", "sqlcrudtest-6440", AuthenticationName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### ServerAzureADOnlyAuthentications_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.AuthenticationName;
+
+/** Samples for ServerAzureADOnlyAuthentications Get. */
+public final class ServerAzureADOnlyAuthenticationsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthGet.json
+ */
+ /**
+ * Sample code: Gets a Azure Active Directory only authentication property.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAAzureActiveDirectoryOnlyAuthenticationProperty(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverAzureADOnlyAuthentications()
+ .getWithResponse("sqlcrudtest-4799", "sqlcrudtest-6440", AuthenticationName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### ServerAzureADOnlyAuthentications_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerAzureADOnlyAuthentications ListByServer. */
+public final class ServerAzureADOnlyAuthenticationsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthList.json
+ */
+ /**
+ * Sample code: Gets a list of Azure Active Directory only authentication object.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAListOfAzureActiveDirectoryOnlyAuthenticationObject(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverAzureADOnlyAuthentications().listByServer("sqlcrudtest-4799", "sqlcrudtest-6440", Context.NONE);
+ }
+}
+```
+
+### ServerBlobAuditingPolicies_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.BlobAuditingPolicyState;
+import com.azure.resourcemanager.sql.generated.models.ServerBlobAuditingPolicy;
+import java.util.Arrays;
+import java.util.UUID;
+
+/** Samples for ServerBlobAuditingPolicies CreateOrUpdate. */
+public final class ServerBlobAuditingPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerBlobAuditingCreateMin.json
+ */
+ /**
+ * Sample code: Update a server's blob auditing policy with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAServerSBlobAuditingPolicyWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ServerBlobAuditingPolicy resource =
+ manager
+ .serverBlobAuditingPolicies()
+ .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerBlobAuditingCreateMax.json
+ */
+ /**
+ * Sample code: Update a server's blob auditing policy with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAServerSBlobAuditingPolicyWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ServerBlobAuditingPolicy resource =
+ manager
+ .serverBlobAuditingPolicies()
+ .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withRetentionDays(6)
+ .withAuditActionsAndGroups(
+ Arrays
+ .asList(
+ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP",
+ "FAILED_DATABASE_AUTHENTICATION_GROUP",
+ "BATCH_COMPLETED_GROUP"))
+ .withIsStorageSecondaryKeyInUse(false)
+ .withIsAzureMonitorTargetEnabled(true)
+ .withQueueDelayMs(4000)
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000"))
+ .apply();
+ }
+}
+```
+
+### ServerBlobAuditingPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerBlobAuditingPolicies Get. */
+public final class ServerBlobAuditingPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerBlobAuditingGet.json
+ */
+ /**
+ * Sample code: Get a server's blob auditing policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAServerSBlobAuditingPolicy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverBlobAuditingPolicies()
+ .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE);
+ }
+}
+```
+
+### ServerBlobAuditingPolicies_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerBlobAuditingPolicies ListByServer. */
+public final class ServerBlobAuditingPoliciesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAuditingSettingsList.json
+ */
+ /**
+ * Sample code: List auditing settings of a server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listAuditingSettingsOfAServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverBlobAuditingPolicies()
+ .listByServer("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE);
+ }
+}
+```
+
+### ServerCommunicationLinks_CreateOrUpdate
+
+```java
+/** Samples for ServerCommunicationLinks CreateOrUpdate. */
+public final class ServerCommunicationLinksCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Create a server communication link.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAServerCommunicationLink(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverCommunicationLinks()
+ .define("link1")
+ .withExistingServer("sqlcrudtest-7398", "sqlcrudtest-4645")
+ .withPartnerServer("sqldcrudtest-test")
+ .create();
+ }
+}
+```
+
+### ServerCommunicationLinks_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerCommunicationLinks Delete. */
+public final class ServerCommunicationLinksDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkDelete.json
+ */
+ /**
+ * Sample code: Delete a server communication link.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAServerCommunicationLink(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverCommunicationLinks()
+ .deleteWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "link1", Context.NONE);
+ }
+}
+```
+
+### ServerCommunicationLinks_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerCommunicationLinks Get. */
+public final class ServerCommunicationLinksGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkGet.json
+ */
+ /**
+ * Sample code: Get a server communication link.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAServerCommunicationLink(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverCommunicationLinks()
+ .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "link1", Context.NONE);
+ }
+}
+```
+
+### ServerCommunicationLinks_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerCommunicationLinks ListByServer. */
+public final class ServerCommunicationLinksListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkList.json
+ */
+ /**
+ * Sample code: List server communication links.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listServerCommunicationLinks(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverCommunicationLinks().listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE);
+ }
+}
+```
+
+### ServerConnectionPolicies_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ConnectionPolicyName;
+import com.azure.resourcemanager.sql.generated.models.ServerConnectionPolicy;
+import com.azure.resourcemanager.sql.generated.models.ServerConnectionType;
+
+/** Samples for ServerConnectionPolicies CreateOrUpdate. */
+public final class ServerConnectionPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesUpdate.json
+ */
+ /**
+ * Sample code: Updates a server connection policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updatesAServerConnectionPolicy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ServerConnectionPolicy resource =
+ manager
+ .serverConnectionPolicies()
+ .getWithResponse("testrg", "testserver", ConnectionPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource.update().withConnectionType(ServerConnectionType.REDIRECT).apply();
+ }
+}
+```
+
+### ServerConnectionPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ConnectionPolicyName;
+
+/** Samples for ServerConnectionPolicies Get. */
+public final class ServerConnectionPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesGet.json
+ */
+ /**
+ * Sample code: Gets a server connection policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAServerConnectionPolicy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverConnectionPolicies()
+ .getWithResponse("rgtest-12", "servertest-6285", ConnectionPolicyName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### ServerConnectionPolicies_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerConnectionPolicies ListByServer. */
+public final class ServerConnectionPoliciesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesList.json
+ */
+ /**
+ * Sample code: Lists a servers connection policies.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listsAServersConnectionPolicies(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverConnectionPolicies().listByServer("rgtest-12", "servertest-6285", Context.NONE);
+ }
+}
+```
+
+### ServerDevOpsAuditSettings_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.BlobAuditingPolicyState;
+import com.azure.resourcemanager.sql.generated.models.ServerDevOpsAuditingSettings;
+import java.util.UUID;
+
+/** Samples for ServerDevOpsAuditSettings CreateOrUpdate. */
+public final class ServerDevOpsAuditSettingsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditCreateMin.json
+ */
+ /**
+ * Sample code: Update a server's DevOps audit settings with minimal input.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAServerSDevOpsAuditSettingsWithMinimalInput(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ServerDevOpsAuditingSettings resource =
+ manager
+ .serverDevOpsAuditSettings()
+ .getWithResponse("devAuditTestRG", "devOpsAuditTestSvr", "default", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditCreateMax.json
+ */
+ /**
+ * Sample code: Update a server's DevOps audit settings with all params.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAServerSDevOpsAuditSettingsWithAllParams(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ServerDevOpsAuditingSettings resource =
+ manager
+ .serverDevOpsAuditSettings()
+ .getWithResponse("devAuditTestRG", "devOpsAuditTestSvr", "default", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withIsAzureMonitorTargetEnabled(true)
+ .withState(BlobAuditingPolicyState.ENABLED)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000"))
+ .apply();
+ }
+}
+```
+
+### ServerDevOpsAuditSettings_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerDevOpsAuditSettings Get. */
+public final class ServerDevOpsAuditSettingsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditGet.json
+ */
+ /**
+ * Sample code: Get a server's DevOps audit settings.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAServerSDevOpsAuditSettings(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverDevOpsAuditSettings()
+ .getWithResponse("devAuditTestRG", "devOpsAuditTestSvr", "default", Context.NONE);
+ }
+}
+```
+
+### ServerDevOpsAuditSettings_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerDevOpsAuditSettings ListByServer. */
+public final class ServerDevOpsAuditSettingsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditSettingsList.json
+ */
+ /**
+ * Sample code: List DevOps audit settings of a server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listDevOpsAuditSettingsOfAServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverDevOpsAuditSettings().listByServer("devAuditTestRG", "devOpsAuditTestSvr", Context.NONE);
+ }
+}
+```
+
+### ServerDnsAliases_Acquire
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ServerDnsAliasAcquisition;
+
+/** Samples for ServerDnsAliases Acquire. */
+public final class ServerDnsAliasesAcquireSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasAcquire.json
+ */
+ /**
+ * Sample code: Acquire server DNS alias.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void acquireServerDNSAlias(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverDnsAliases()
+ .acquire(
+ "Default",
+ "dns-alias-new-server",
+ "dns-alias-name-1",
+ new ServerDnsAliasAcquisition()
+ .withOldServerDnsAliasId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1"),
+ Context.NONE);
+ }
+}
+```
+
+### ServerDnsAliases_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerDnsAliases CreateOrUpdate. */
+public final class ServerDnsAliasesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Create server DNS alias.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createServerDNSAlias(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverDnsAliases().createOrUpdate("Default", "dns-alias-server", "dns-alias-name-1", Context.NONE);
+ }
+}
+```
+
+### ServerDnsAliases_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerDnsAliases Delete. */
+public final class ServerDnsAliasesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasDelete.json
+ */
+ /**
+ * Sample code: Delete server DNS alias.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteServerDNSAlias(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverDnsAliases().delete("Default", "dns-alias-server", "dns-alias-name-1", Context.NONE);
+ }
+}
+```
+
+### ServerDnsAliases_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerDnsAliases Get. */
+public final class ServerDnsAliasesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasGet.json
+ */
+ /**
+ * Sample code: Get server DNS alias.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getServerDNSAlias(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverDnsAliases().getWithResponse("Default", "dns-alias-server", "dns-alias-name-1", Context.NONE);
+ }
+}
+```
+
+### ServerDnsAliases_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerDnsAliases ListByServer. */
+public final class ServerDnsAliasesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasList.json
+ */
+ /**
+ * Sample code: List server DNS aliases.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listServerDNSAliases(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverDnsAliases().listByServer("Default", "dns-alias-server", Context.NONE);
+ }
+}
+```
+
+### ServerKeys_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.ServerKeyType;
+
+/** Samples for ServerKeys CreateOrUpdate. */
+public final class ServerKeysCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Creates or updates a server key.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createsOrUpdatesAServerKey(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverKeys()
+ .define("someVault_someKey_01234567890123456789012345678901")
+ .withExistingServer("sqlcrudtest-7398", "sqlcrudtest-4645")
+ .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT)
+ .withUri("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901")
+ .create();
+ }
+}
+```
+
+### ServerKeys_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerKeys Delete. */
+public final class ServerKeysDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyDelete.json
+ */
+ /**
+ * Sample code: Delete the server key.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteTheServerKey(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverKeys()
+ .delete(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ "someVault_someKey_01234567890123456789012345678901",
+ Context.NONE);
+ }
+}
+```
+
+### ServerKeys_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerKeys Get. */
+public final class ServerKeysGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyGet.json
+ */
+ /**
+ * Sample code: Get the server key.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheServerKey(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverKeys()
+ .getWithResponse(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ "someVault_someKey_01234567890123456789012345678901",
+ Context.NONE);
+ }
+}
+```
+
+### ServerKeys_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerKeys ListByServer. */
+public final class ServerKeysListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyList.json
+ */
+ /**
+ * Sample code: List the server keys by server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listTheServerKeysByServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverKeys().listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE);
+ }
+}
+```
+
+### ServerOperations_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerOperations ListByServer. */
+public final class ServerOperationsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListServerOperations.json
+ */
+ /**
+ * Sample code: List the server management operations.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listTheServerManagementOperations(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverOperations().listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE);
+ }
+}
+```
+
+### ServerSecurityAlertPolicies_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertPolicyName;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertsPolicyState;
+import com.azure.resourcemanager.sql.generated.models.ServerSecurityAlertPolicy;
+import java.util.Arrays;
+
+/** Samples for ServerSecurityAlertPolicies CreateOrUpdate. */
+public final class ServerSecurityAlertPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsCreateMin.json
+ */
+ /**
+ * Sample code: Update a server's threat detection policy with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAServerSThreatDetectionPolicyWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ServerSecurityAlertPolicy resource =
+ manager
+ .serverSecurityAlertPolicies()
+ .getWithResponse(
+ "securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource.update().withState(SecurityAlertsPolicyState.ENABLED).apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsCreateMax.json
+ */
+ /**
+ * Sample code: Update a server's threat detection policy with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAServerSThreatDetectionPolicyWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ ServerSecurityAlertPolicy resource =
+ manager
+ .serverSecurityAlertPolicies()
+ .getWithResponse(
+ "securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withState(SecurityAlertsPolicyState.ENABLED)
+ .withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly"))
+ .withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com"))
+ .withEmailAccountAdmins(true)
+ .withStorageEndpoint("https://mystorage.blob.core.windows.net")
+ .withStorageAccountAccessKey(
+ "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
+ .withRetentionDays(5)
+ .apply();
+ }
+}
+```
+
+### ServerSecurityAlertPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertPolicyName;
+
+/** Samples for ServerSecurityAlertPolicies Get. */
+public final class ServerSecurityAlertPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsGet.json
+ */
+ /**
+ * Sample code: Get a server's threat detection policy.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAServerSThreatDetectionPolicy(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverSecurityAlertPolicies()
+ .getWithResponse("securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### ServerSecurityAlertPolicies_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerSecurityAlertPolicies ListByServer. */
+public final class ServerSecurityAlertPoliciesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsListByServer.json
+ */
+ /**
+ * Sample code: List the server's threat detection policies.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listTheServerSThreatDetectionPolicies(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverSecurityAlertPolicies().listByServer("securityalert-4799", "securityalert-6440", Context.NONE);
+ }
+}
+```
+
+### ServerTrustGroups_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.ServerInfo;
+import com.azure.resourcemanager.sql.generated.models.ServerTrustGroupPropertiesTrustScopesItem;
+import java.util.Arrays;
+
+/** Samples for ServerTrustGroups CreateOrUpdate. */
+public final class ServerTrustGroupsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupCreate.json
+ */
+ /**
+ * Sample code: Create server trust group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createServerTrustGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverTrustGroups()
+ .define("server-trust-group-test")
+ .withExistingLocation("Default", "Japan East")
+ .withGroupMembers(
+ Arrays
+ .asList(
+ new ServerInfo()
+ .withServerId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"),
+ new ServerInfo()
+ .withServerId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2")))
+ .withTrustScopes(
+ Arrays
+ .asList(
+ ServerTrustGroupPropertiesTrustScopesItem.GLOBAL_TRANSACTIONS,
+ ServerTrustGroupPropertiesTrustScopesItem.SERVICE_BROKER))
+ .create();
+ }
+}
+```
+
+### ServerTrustGroups_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerTrustGroups Delete. */
+public final class ServerTrustGroupsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupDelete.json
+ */
+ /**
+ * Sample code: Drop server trust group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void dropServerTrustGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverTrustGroups().delete("Default", "Japan East", "server-trust-group-test", Context.NONE);
+ }
+}
+```
+
+### ServerTrustGroups_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerTrustGroups Get. */
+public final class ServerTrustGroupsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupGet.json
+ */
+ /**
+ * Sample code: Get server trust group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getServerTrustGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverTrustGroups().getWithResponse("Default", "Japan East", "server-trust-group-test", Context.NONE);
+ }
+}
+```
+
+### ServerTrustGroups_ListByInstance
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerTrustGroups ListByInstance. */
+public final class ServerTrustGroupsListByInstanceSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupListByManagedInstance.json
+ */
+ /**
+ * Sample code: List server trust groups by managed instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listServerTrustGroupsByManagedInstance(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverTrustGroups().listByInstance("Default-SQL-SouthEastAsia", "managedInstance-1", Context.NONE);
+ }
+}
+```
+
+### ServerTrustGroups_ListByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerTrustGroups ListByLocation. */
+public final class ServerTrustGroupsListByLocationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupList.json
+ */
+ /**
+ * Sample code: List server trust groups.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listServerTrustGroups(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverTrustGroups().listByLocation("Default", "Japan East", Context.NONE);
+ }
+}
+```
+
+### ServerUsages_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerUsages ListByServer. */
+public final class ServerUsagesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ServerUsageMetricsList.json
+ */
+ /**
+ * Sample code: List servers usages.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listServersUsages(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serverUsages().listByServer("sqlcrudtest-6730", "sqlcrudtest-9007", Context.NONE);
+ }
+}
+```
+
+### ServerVulnerabilityAssessments_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentRecurringScansProperties;
+import java.util.Arrays;
+
+/** Samples for ServerVulnerabilityAssessments CreateOrUpdate. */
+public final class ServerVulnerabilityAssessmentsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json
+ */
+ /**
+ * Sample code: Create a server's vulnerability assessment with all parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAServerSVulnerabilityAssessmentWithAllParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverVulnerabilityAssessments()
+ .define(VulnerabilityAssessmentName.DEFAULT)
+ .withExistingServer("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440")
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .withRecurringScans(
+ new VulnerabilityAssessmentRecurringScansProperties()
+ .withIsEnabled(true)
+ .withEmailSubscriptionAdmins(true)
+ .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com")))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json
+ */
+ /**
+ * Sample code: Create a server's vulnerability assessment with minimal parameters, when storageAccountAccessKey is
+ * specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverVulnerabilityAssessments()
+ .define(VulnerabilityAssessmentName.DEFAULT)
+ .withExistingServer("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440")
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json
+ */
+ /**
+ * Sample code: Create a server's vulnerability assessment with minimal parameters, when storageContainerSasKey is
+ * specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverVulnerabilityAssessments()
+ .define(VulnerabilityAssessmentName.DEFAULT)
+ .withExistingServer("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440")
+ .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/")
+ .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ .create();
+ }
+}
+```
+
+### ServerVulnerabilityAssessments_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for ServerVulnerabilityAssessments Delete. */
+public final class ServerVulnerabilityAssessmentsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentDelete.json
+ */
+ /**
+ * Sample code: Remove a server's vulnerability assessment.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void removeAServerSVulnerabilityAssessment(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverVulnerabilityAssessments()
+ .deleteWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ VulnerabilityAssessmentName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ServerVulnerabilityAssessments_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/** Samples for ServerVulnerabilityAssessments Get. */
+public final class ServerVulnerabilityAssessmentsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentGet.json
+ */
+ /**
+ * Sample code: Get a server's vulnerability assessment.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAServerSVulnerabilityAssessment(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverVulnerabilityAssessments()
+ .getWithResponse(
+ "vulnerabilityaseessmenttest-4799",
+ "vulnerabilityaseessmenttest-6440",
+ VulnerabilityAssessmentName.DEFAULT,
+ Context.NONE);
+ }
+}
+```
+
+### ServerVulnerabilityAssessments_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServerVulnerabilityAssessments ListByServer. */
+public final class ServerVulnerabilityAssessmentsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json
+ */
+ /**
+ * Sample code: Get a server's vulnerability assessment policies.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAServerSVulnerabilityAssessmentPolicies(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serverVulnerabilityAssessments()
+ .listByServer("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", Context.NONE);
+ }
+}
+```
+
+### Servers_CheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.CheckNameAvailabilityRequest;
+
+/** Samples for Servers CheckNameAvailability. */
+public final class ServersCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAvailable.json
+ */
+ /**
+ * Sample code: Check for a server name that is available.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void checkForAServerNameThatIsAvailable(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .servers()
+ .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("server1"), Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json
+ */
+ /**
+ * Sample code: Check for a server name that already exists.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void checkForAServerNameThatAlreadyExists(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .servers()
+ .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("server1"), Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerInvalid.json
+ */
+ /**
+ * Sample code: Check for a server name that is invalid.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void checkForAServerNameThatIsInvalid(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .servers()
+ .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("SERVER1"), Context.NONE);
+ }
+}
+```
+
+### Servers_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.PrincipalType;
+import com.azure.resourcemanager.sql.generated.models.ServerExternalAdministrator;
+import com.azure.resourcemanager.sql.generated.models.ServerNetworkAccessFlag;
+import java.util.UUID;
+
+/** Samples for Servers CreateOrUpdate. */
+public final class ServersCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerCreate.json
+ */
+ /**
+ * Sample code: Create server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .servers()
+ .define("sqlcrudtest-4645")
+ .withRegion("Japan East")
+ .withExistingResourceGroup("sqlcrudtest-7398")
+ .withAdministratorLogin("dummylogin")
+ .withAdministratorLoginPassword("PLACEHOLDER")
+ .withPublicNetworkAccess(ServerNetworkAccessFlag.ENABLED)
+ .withAdministrators(
+ new ServerExternalAdministrator()
+ .withPrincipalType(PrincipalType.USER)
+ .withLogin("bob@contoso.com")
+ .withSid(UUID.fromString("00000011-1111-2222-2222-123456789111"))
+ .withTenantId(UUID.fromString("00000011-1111-2222-2222-123456789111"))
+ .withAzureADOnlyAuthentication(true))
+ .withRestrictOutboundNetworkAccess(ServerNetworkAccessFlag.ENABLED)
+ .create();
+ }
+}
+```
+
+### Servers_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Servers Delete. */
+public final class ServersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDelete.json
+ */
+ /**
+ * Sample code: Delete server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.servers().delete("sqlcrudtest-7398", "sqlcrudtest-6661", Context.NONE);
+ }
+}
+```
+
+### Servers_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Servers GetByResourceGroup. */
+public final class ServersGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json
+ */
+ /**
+ * Sample code: Get server with $expand=administrators.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getServerWithExpandAdministrators(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.servers().getByResourceGroupWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGet.json
+ */
+ /**
+ * Sample code: Get server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.servers().getByResourceGroupWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", null, Context.NONE);
+ }
+}
+```
+
+### Servers_ImportDatabase
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.ImportNewDatabaseDefinition;
+import com.azure.resourcemanager.sql.generated.models.NetworkIsolationSettings;
+import com.azure.resourcemanager.sql.generated.models.StorageKeyType;
+
+/** Samples for Servers ImportDatabase. */
+public final class ServersImportDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json
+ */
+ /**
+ * Sample code: Imports to a new database, using private link for the SQL server and storage account.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void importsToANewDatabaseUsingPrivateLinkForTheSQLServerAndStorageAccount(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .servers()
+ .importDatabase(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ new ImportNewDatabaseDefinition()
+ .withDatabaseName("testdb")
+ .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY)
+ .withStorageKey(
+ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==")
+ .withStorageUri("https://test.blob.core.windows.net/test.bacpac")
+ .withAdministratorLogin("login")
+ .withAdministratorLoginPassword("password")
+ .withAuthenticationType("Sql")
+ .withNetworkIsolation(
+ new NetworkIsolationSettings()
+ .withStorageAccountResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink")
+ .withSqlServerResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabase.json
+ */
+ /**
+ * Sample code: Imports to a new database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void importsToANewDatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .servers()
+ .importDatabase(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ new ImportNewDatabaseDefinition()
+ .withDatabaseName("testdb")
+ .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY)
+ .withStorageKey(
+ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==")
+ .withStorageUri("https://test.blob.core.windows.net/test.bacpac")
+ .withAdministratorLogin("login")
+ .withAdministratorLoginPassword("password")
+ .withAuthenticationType("Sql"),
+ Context.NONE);
+ }
+}
+```
+
+### Servers_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Servers List. */
+public final class ServersListSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerList.json
+ */
+ /**
+ * Sample code: List servers.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listServers(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.servers().list(null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListWithExpandEqualsAdministrators.json
+ */
+ /**
+ * Sample code: List servers with expand equals administrators.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listServersWithExpandEqualsAdministrators(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.servers().list(null, Context.NONE);
+ }
+}
+```
+
+### Servers_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Servers ListByResourceGroup. */
+public final class ServersListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroup.json
+ */
+ /**
+ * Sample code: List servers by resource group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listServersByResourceGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.servers().listByResourceGroup("sqlcrudtest-7398", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json
+ */
+ /**
+ * Sample code: List servers by resource group with $expand=administrators.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listServersByResourceGroupWithExpandAdministrators(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.servers().listByResourceGroup("sqlcrudtest-7398", null, Context.NONE);
+ }
+}
+```
+
+### Servers_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.Server;
+import com.azure.resourcemanager.sql.generated.models.ServerNetworkAccessFlag;
+
+/** Samples for Servers Update. */
+public final class ServersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerUpdate.json
+ */
+ /**
+ * Sample code: Update a server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ Server resource =
+ manager
+ .servers()
+ .getByResourceGroupWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", null, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withAdministratorLoginPassword("placeholder")
+ .withPublicNetworkAccess(ServerNetworkAccessFlag.DISABLED)
+ .withRestrictOutboundNetworkAccess(ServerNetworkAccessFlag.ENABLED)
+ .apply();
+ }
+}
+```
+
+### ServiceObjectives_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceObjectives Get. */
+public final class ServiceObjectivesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServiceObjectiveGet.json
+ */
+ /**
+ * Sample code: Get a service objective.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAServiceObjective(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .serviceObjectives()
+ .getWithResponse("group1", "sqlcrudtest", "29dd7459-4a7c-4e56-be22-f0adda49440d", Context.NONE);
+ }
+}
+```
+
+### ServiceObjectives_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceObjectives ListByServer. */
+public final class ServiceObjectivesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServiceObjectiveList.json
+ */
+ /**
+ * Sample code: List service objectives.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listServiceObjectives(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.serviceObjectives().listByServer("group1", "sqlcrudtest", Context.NONE);
+ }
+}
+```
+
+### SqlAgent_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.SqlAgentConfigurationInner;
+import com.azure.resourcemanager.sql.generated.models.SqlAgentConfigurationPropertiesState;
+
+/** Samples for SqlAgent CreateOrUpdate. */
+public final class SqlAgentCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlAgentConfigurationPut.json
+ */
+ /**
+ * Sample code: Puts new sql agent configuration to instance.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void putsNewSqlAgentConfigurationToInstance(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .sqlAgents()
+ .createOrUpdateWithResponse(
+ "sqlcrudtest-7398",
+ "sqlcrudtest-4645",
+ new SqlAgentConfigurationInner().withState(SqlAgentConfigurationPropertiesState.ENABLED),
+ Context.NONE);
+ }
+}
+```
+
+### SqlAgent_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlAgent Get. */
+public final class SqlAgentGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlAgentConfigurationGet.json
+ */
+ /**
+ * Sample code: Gets current instance sql agent configuration.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsCurrentInstanceSqlAgentConfiguration(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.sqlAgents().getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE);
+ }
+}
+```
+
+### SubscriptionUsages_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SubscriptionUsages Get. */
+public final class SubscriptionUsagesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SubscriptionUsageGet.json
+ */
+ /**
+ * Sample code: Get specific subscription usage in the given location.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getSpecificSubscriptionUsageInTheGivenLocation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.subscriptionUsages().getWithResponse("WestUS", "ServerQuota", Context.NONE);
+ }
+}
+```
+
+### SubscriptionUsages_ListByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SubscriptionUsages ListByLocation. */
+public final class SubscriptionUsagesListByLocationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SubscriptionUsageListByLocation.json
+ */
+ /**
+ * Sample code: List subscription usages in the given location.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listSubscriptionUsagesInTheGivenLocation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.subscriptionUsages().listByLocation("WestUS", Context.NONE);
+ }
+}
+```
+
+### SyncAgents_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SyncAgent;
+
+/** Samples for SyncAgents CreateOrUpdate. */
+public final class SyncAgentsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentCreate.json
+ */
+ /**
+ * Sample code: Create a new sync agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createANewSyncAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncAgents()
+ .define("syncagentcrud-3187")
+ .withExistingServer("syncagentcrud-65440", "syncagentcrud-8475")
+ .withSyncDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentUpdate.json
+ */
+ /**
+ * Sample code: Update a sync agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateASyncAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ SyncAgent resource =
+ manager
+ .syncAgents()
+ .getWithResponse("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withSyncDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync")
+ .apply();
+ }
+}
+```
+
+### SyncAgents_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncAgents Delete. */
+public final class SyncAgentsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentDelete.json
+ */
+ /**
+ * Sample code: Delete a sync agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteASyncAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.syncAgents().delete("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncAgents_GenerateKey
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncAgents GenerateKey. */
+public final class SyncAgentsGenerateKeySamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGenerateKey.json
+ */
+ /**
+ * Sample code: Generate a sync agent key.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void generateASyncAgentKey(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncAgents()
+ .generateKeyWithResponse("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncAgents_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncAgents Get. */
+public final class SyncAgentsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGet.json
+ */
+ /**
+ * Sample code: Get a sync agent.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getASyncAgent(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncAgents()
+ .getWithResponse("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncAgents_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncAgents ListByServer. */
+public final class SyncAgentsListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentListByServer.json
+ */
+ /**
+ * Sample code: Get sync agents under a server.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getSyncAgentsUnderAServer(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.syncAgents().listByServer("syncagentcrud-65440", "syncagentcrud-8475", Context.NONE);
+ }
+}
+```
+
+### SyncAgents_ListLinkedDatabases
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncAgents ListLinkedDatabases. */
+public final class SyncAgentsListLinkedDatabasesSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGetLinkedDatabases.json
+ */
+ /**
+ * Sample code: Get sync agent linked databases.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getSyncAgentLinkedDatabases(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncAgents()
+ .listLinkedDatabases("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncGroups_CancelSync
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncGroups CancelSync. */
+public final class SyncGroupsCancelSyncSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupCancelSync.json
+ */
+ /**
+ * Sample code: Cancel a sync group synchronization.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void cancelASyncGroupSynchronization(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncGroups()
+ .cancelSyncWithResponse(
+ "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncGroups_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.SyncConflictResolutionPolicy;
+
+/** Samples for SyncGroups CreateOrUpdate. */
+public final class SyncGroupsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupUpdate.json
+ */
+ /**
+ * Sample code: Update a sync group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateASyncGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncGroups()
+ .define("syncgroupcrud-3187")
+ .withExistingDatabase("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328")
+ .withInterval(-1)
+ .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN)
+ .withSyncDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328")
+ .withHubDatabaseUsername("hubUser")
+ .withUsePrivateLinkConnection(true)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupCreate.json
+ */
+ /**
+ * Sample code: Create a sync group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createASyncGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncGroups()
+ .define("syncgroupcrud-3187")
+ .withExistingDatabase("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328")
+ .withInterval(-1)
+ .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN)
+ .withSyncDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328")
+ .withHubDatabaseUsername("hubUser")
+ .withUsePrivateLinkConnection(true)
+ .create();
+ }
+}
+```
+
+### SyncGroups_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncGroups Delete. */
+public final class SyncGroupsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupDelete.json
+ */
+ /**
+ * Sample code: Delete a sync group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteASyncGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncGroups()
+ .delete(
+ "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncGroups_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncGroups Get. */
+public final class SyncGroupsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGet.json
+ */
+ /**
+ * Sample code: Get a sync group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getASyncGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncGroups()
+ .getWithResponse(
+ "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncGroups_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncGroups ListByDatabase. */
+public final class SyncGroupsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupListByDatabase.json
+ */
+ /**
+ * Sample code: List sync groups under a given database.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listSyncGroupsUnderAGivenDatabase(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncGroups()
+ .listByDatabase("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", Context.NONE);
+ }
+}
+```
+
+### SyncGroups_ListHubSchemas
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncGroups ListHubSchemas. */
+public final class SyncGroupsListHubSchemasSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetHubSchema.json
+ */
+ /**
+ * Sample code: Get a hub database schema.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAHubDatabaseSchema(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncGroups()
+ .listHubSchemas(
+ "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncGroups_ListLogs
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SyncGroupsType;
+
+/** Samples for SyncGroups ListLogs. */
+public final class SyncGroupsListLogsSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetLog.json
+ */
+ /**
+ * Sample code: Get sync group logs.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getSyncGroupLogs(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncGroups()
+ .listLogs(
+ "syncgroupcrud-65440",
+ "syncgroupcrud-8475",
+ "syncgroupcrud-4328",
+ "syncgroupcrud-3187",
+ "2017-01-01T00:00:00",
+ "2017-12-31T00:00:00",
+ SyncGroupsType.ALL,
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### SyncGroups_ListSyncDatabaseIds
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncGroups ListSyncDatabaseIds. */
+public final class SyncGroupsListSyncDatabaseIdsSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetSyncDatabaseId.json
+ */
+ /**
+ * Sample code: Get a sync database ID.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getASyncDatabaseID(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.syncGroups().listSyncDatabaseIds("westus", Context.NONE);
+ }
+}
+```
+
+### SyncGroups_RefreshHubSchema
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncGroups RefreshHubSchema. */
+public final class SyncGroupsRefreshHubSchemaSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupRefreshHubSchema.json
+ */
+ /**
+ * Sample code: Refresh a hub database schema.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void refreshAHubDatabaseSchema(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncGroups()
+ .refreshHubSchema(
+ "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncGroups_TriggerSync
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncGroups TriggerSync. */
+public final class SyncGroupsTriggerSyncSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupTriggerSync.json
+ */
+ /**
+ * Sample code: Trigger a sync group synchronization.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void triggerASyncGroupSynchronization(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncGroups()
+ .triggerSyncWithResponse(
+ "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncGroups_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SyncConflictResolutionPolicy;
+import com.azure.resourcemanager.sql.generated.models.SyncGroup;
+
+/** Samples for SyncGroups Update. */
+public final class SyncGroupsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupPatch.json
+ */
+ /**
+ * Sample code: Update a sync group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateASyncGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ SyncGroup resource =
+ manager
+ .syncGroups()
+ .getWithResponse(
+ "syncgroupcrud-65440",
+ "syncgroupcrud-8475",
+ "syncgroupcrud-4328",
+ "syncgroupcrud-3187",
+ Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withInterval(-1)
+ .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN)
+ .withSyncDatabaseId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328")
+ .withHubDatabaseUsername("hubUser")
+ .withHubDatabasePassword("hubPassword")
+ .withUsePrivateLinkConnection(true)
+ .apply();
+ }
+}
+```
+
+### SyncMembers_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sql.generated.models.SyncDirection;
+import com.azure.resourcemanager.sql.generated.models.SyncMemberDbType;
+
+/** Samples for SyncMembers CreateOrUpdate. */
+public final class SyncMembersCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberCreate.json
+ */
+ /**
+ * Sample code: Create a new sync member.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createANewSyncMember(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncMembers()
+ .define("syncmembercrud-4879")
+ .withExistingSyncGroup(
+ "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187")
+ .withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE)
+ .withSyncMemberAzureDatabaseResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328")
+ .withUsePrivateLinkConnection(true)
+ .withServerName("syncgroupcrud-3379.database.windows.net")
+ .withDatabaseName("syncgroupcrud-7421")
+ .withUsername("myUser")
+ .withSyncDirection(SyncDirection.BIDIRECTIONAL)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberUpdate.json
+ */
+ /**
+ * Sample code: Update a sync member.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateASyncMember(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncMembers()
+ .define("syncmembercrud-4879")
+ .withExistingSyncGroup(
+ "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187")
+ .withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE)
+ .withSyncMemberAzureDatabaseResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328")
+ .withUsePrivateLinkConnection(true)
+ .withServerName("syncgroupcrud-3379.database.windows.net")
+ .withDatabaseName("syncgroupcrud-7421")
+ .withUsername("myUser")
+ .withSyncDirection(SyncDirection.BIDIRECTIONAL)
+ .create();
+ }
+}
+```
+
+### SyncMembers_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncMembers Delete. */
+public final class SyncMembersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberDelete.json
+ */
+ /**
+ * Sample code: Delete a sync member.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteASyncMember(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncMembers()
+ .delete(
+ "syncgroupcrud-65440",
+ "syncgroupcrud-8475",
+ "syncgroupcrud-4328",
+ "syncgroupcrud-3187",
+ "syncgroupcrud-4879",
+ Context.NONE);
+ }
+}
+```
+
+### SyncMembers_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncMembers Get. */
+public final class SyncMembersGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberGet.json
+ */
+ /**
+ * Sample code: Get a sync member.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getASyncMember(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncMembers()
+ .getWithResponse(
+ "syncgroupcrud-65440",
+ "syncgroupcrud-8475",
+ "syncgroupcrud-4328",
+ "syncgroupcrud-3187",
+ "syncmembercrud-4879",
+ Context.NONE);
+ }
+}
+```
+
+### SyncMembers_ListBySyncGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncMembers ListBySyncGroup. */
+public final class SyncMembersListBySyncGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberListBySyncGroup.json
+ */
+ /**
+ * Sample code: List sync members under a sync group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listSyncMembersUnderASyncGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncMembers()
+ .listBySyncGroup(
+ "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE);
+ }
+}
+```
+
+### SyncMembers_ListMemberSchemas
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncMembers ListMemberSchemas. */
+public final class SyncMembersListMemberSchemasSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberGetSchema.json
+ */
+ /**
+ * Sample code: Get a sync member schema.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getASyncMemberSchema(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncMembers()
+ .listMemberSchemas(
+ "syncgroupcrud-65440",
+ "syncgroupcrud-8475",
+ "syncgroupcrud-4328",
+ "syncgroupcrud-3187",
+ "syncgroupcrud-4879",
+ Context.NONE);
+ }
+}
+```
+
+### SyncMembers_RefreshMemberSchema
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SyncMembers RefreshMemberSchema. */
+public final class SyncMembersRefreshMemberSchemaSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberRefreshSchema.json
+ */
+ /**
+ * Sample code: Refresh a sync member database schema.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void refreshASyncMemberDatabaseSchema(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .syncMembers()
+ .refreshMemberSchema(
+ "syncgroupcrud-65440",
+ "syncgroupcrud-8475",
+ "syncgroupcrud-4328",
+ "syncgroupcrud-3187",
+ "syncgroupcrud-4879",
+ Context.NONE);
+ }
+}
+```
+
+### SyncMembers_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.SyncDirection;
+import com.azure.resourcemanager.sql.generated.models.SyncMember;
+import com.azure.resourcemanager.sql.generated.models.SyncMemberDbType;
+
+/** Samples for SyncMembers Update. */
+public final class SyncMembersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberPatch.json
+ */
+ /**
+ * Sample code: Update an existing sync member.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateAnExistingSyncMember(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ SyncMember resource =
+ manager
+ .syncMembers()
+ .getWithResponse(
+ "syncgroupcrud-65440",
+ "syncgroupcrud-8475",
+ "syncgroupcrud-4328",
+ "syncgroupcrud-3187",
+ "syncmembercrud-4879",
+ Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE)
+ .withSyncMemberAzureDatabaseResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328")
+ .withUsePrivateLinkConnection(true)
+ .withServerName("syncgroupcrud-3379.database.windows.net")
+ .withDatabaseName("syncgroupcrud-7421")
+ .withUsername("myUser")
+ .withSyncDirection(SyncDirection.BIDIRECTIONAL)
+ .apply();
+ }
+}
+```
+
+### TdeCertificates_Create
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.TdeCertificate;
+
+/** Samples for TdeCertificates Create. */
+public final class TdeCertificatesCreateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlTdeCertificateCreate.json
+ */
+ /**
+ * Sample code: Upload a TDE certificate.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void uploadATDECertificate(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .tdeCertificates()
+ .create("testtdecert", "testtdecert", new TdeCertificate().withPrivateBlob("MIIXXXXXXXX"), Context.NONE);
+ }
+}
+```
+
+### TimeZones_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TimeZones Get. */
+public final class TimeZonesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTimeZoneGet.json
+ */
+ /**
+ * Sample code: Get managed instance time zone.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getManagedInstanceTimeZone(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.timeZones().getWithResponse("canadaeast", "Haiti Standard Time", Context.NONE);
+ }
+}
+```
+
+### TimeZones_ListByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TimeZones ListByLocation. */
+public final class TimeZonesListByLocationSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json
+ */
+ /**
+ * Sample code: List managed instance time zones by location.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listManagedInstanceTimeZonesByLocation(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.timeZones().listByLocation("canadaeast", Context.NONE);
+ }
+}
+```
+
+### TransparentDataEncryptions_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.LogicalDatabaseTransparentDataEncryption;
+import com.azure.resourcemanager.sql.generated.models.TransparentDataEncryptionName;
+import com.azure.resourcemanager.sql.generated.models.TransparentDataEncryptionState;
+
+/** Samples for TransparentDataEncryptions CreateOrUpdate. */
+public final class TransparentDataEncryptionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionUpdate.json
+ */
+ /**
+ * Sample code: Update a database's Transparent Data Encryption state with minimal parameters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateADatabaseSTransparentDataEncryptionStateWithMinimalParameters(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ LogicalDatabaseTransparentDataEncryption resource =
+ manager
+ .transparentDataEncryptions()
+ .getWithResponse(
+ "securitytde-42-rg",
+ "securitytde-42",
+ "testdb",
+ TransparentDataEncryptionName.CURRENT,
+ Context.NONE)
+ .getValue();
+ resource.update().withState(TransparentDataEncryptionState.ENABLED).apply();
+ }
+}
+```
+
+### TransparentDataEncryptions_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.TransparentDataEncryptionName;
+
+/** Samples for TransparentDataEncryptions Get. */
+public final class TransparentDataEncryptionsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionGet.json
+ */
+ /**
+ * Sample code: Get a database's transparent data encryption.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getADatabaseSTransparentDataEncryption(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .transparentDataEncryptions()
+ .getWithResponse(
+ "security-tde-resourcegroup",
+ "securitytde",
+ "testdb",
+ TransparentDataEncryptionName.CURRENT,
+ Context.NONE);
+ }
+}
+```
+
+### TransparentDataEncryptions_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for TransparentDataEncryptions ListByDatabase. */
+public final class TransparentDataEncryptionsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionList.json
+ */
+ /**
+ * Sample code: Get a list of the database's transparent data encryption.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getAListOfTheDatabaseSTransparentDataEncryption(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .transparentDataEncryptions()
+ .listByDatabase("security-tde-resourcegroup", "securitytde", "testdb", Context.NONE);
+ }
+}
+```
+
+### Usages_ListByInstancePool
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Usages ListByInstancePool. */
+public final class UsagesListByInstancePoolSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsage.json
+ */
+ /**
+ * Sample code: List instance pool usages.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listInstancePoolUsages(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.usages().listByInstancePool("group1", "testIP", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsageExpanded.json
+ */
+ /**
+ * Sample code: List instance pool usages expanded with children.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listInstancePoolUsagesExpandedWithChildren(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.usages().listByInstancePool("group1", "testIP", true, Context.NONE);
+ }
+}
+```
+
+### VirtualClusters_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualClusters Delete. */
+public final class VirtualClustersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterDelete.json
+ */
+ /**
+ * Sample code: Delete virtual cluster.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteVirtualCluster(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.virtualClusters().delete("testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", Context.NONE);
+ }
+}
+```
+
+### VirtualClusters_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualClusters GetByResourceGroup. */
+public final class VirtualClustersGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterGet.json
+ */
+ /**
+ * Sample code: Get virtual cluster.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getVirtualCluster(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .virtualClusters()
+ .getByResourceGroupWithResponse("testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", Context.NONE);
+ }
+}
+```
+
+### VirtualClusters_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualClusters List. */
+public final class VirtualClustersListSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterList.json
+ */
+ /**
+ * Sample code: List virtualClusters.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listVirtualClusters(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.virtualClusters().list(Context.NONE);
+ }
+}
+```
+
+### VirtualClusters_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualClusters ListByResourceGroup. */
+public final class VirtualClustersListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterListByResourceGroup.json
+ */
+ /**
+ * Sample code: List virtual clusters by resource group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listVirtualClustersByResourceGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.virtualClusters().listByResourceGroup("testrg", Context.NONE);
+ }
+}
+```
+
+### VirtualClusters_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.models.VirtualClusterUpdate;
+
+/** Samples for VirtualClusters Update. */
+public final class VirtualClustersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterUpdate.json
+ */
+ /**
+ * Sample code: Update virtual cluster with tags.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void updateVirtualClusterWithTags(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .virtualClusters()
+ .update(
+ "testrg",
+ "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2",
+ new VirtualClusterUpdate()
+ .withMaintenanceConfigurationId(
+ "/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1"),
+ Context.NONE);
+ }
+}
+```
+
+### VirtualClusters_UpdateDnsServers
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualClusters UpdateDnsServers. */
+public final class VirtualClustersUpdateDnsServersSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedInstanceDnsServers.json
+ */
+ /**
+ * Sample code: Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void synchronizesTheDNSServerSettingsUsedByTheManagedInstancesInsideTheGivenVirtualCluster(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.virtualClusters().updateDnsServersWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE);
+ }
+}
+```
+
+### VirtualNetworkRules_CreateOrUpdate
+
+```java
+/** Samples for VirtualNetworkRules CreateOrUpdate. */
+public final class VirtualNetworkRulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json
+ */
+ /**
+ * Sample code: Create or update a virtual network rule.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createOrUpdateAVirtualNetworkRule(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .virtualNetworkRules()
+ .define("vnet-firewall-rule")
+ .withExistingServer("Default", "vnet-test-svr")
+ .withVirtualNetworkSubnetId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet")
+ .withIgnoreMissingVnetServiceEndpoint(false)
+ .create();
+ }
+}
+```
+
+### VirtualNetworkRules_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualNetworkRules Delete. */
+public final class VirtualNetworkRulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesDelete.json
+ */
+ /**
+ * Sample code: Delete a virtual network rule.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAVirtualNetworkRule(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.virtualNetworkRules().delete("Default", "vnet-test-svr", "vnet-firewall-rule", Context.NONE);
+ }
+}
+```
+
+### VirtualNetworkRules_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualNetworkRules Get. */
+public final class VirtualNetworkRulesGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesGet.json
+ */
+ /**
+ * Sample code: Gets a virtual network rule.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAVirtualNetworkRule(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.virtualNetworkRules().getWithResponse("Default", "vnet-test-svr", "vnet-firewall-rule", Context.NONE);
+ }
+}
+```
+
+### VirtualNetworkRules_ListByServer
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualNetworkRules ListByServer. */
+public final class VirtualNetworkRulesListByServerSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesList.json
+ */
+ /**
+ * Sample code: List virtual network rules.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void listVirtualNetworkRules(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.virtualNetworkRules().listByServer("Default", "vnet-test-svr", Context.NONE);
+ }
+}
+```
+
+### WorkloadClassifiers_CreateOrUpdate
+
+```java
+/** Samples for WorkloadClassifiers CreateOrUpdate. */
+public final class WorkloadClassifiersCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json
+ */
+ /**
+ * Sample code: Create a workload group with the required properties specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAWorkloadGroupWithTheRequiredPropertiesSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .workloadClassifiers()
+ .define("wlm_workloadclassifier")
+ .withExistingWorkloadGroup("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup")
+ .withMemberName("dbo")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json
+ */
+ /**
+ * Sample code: Create a workload group with all properties specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAWorkloadGroupWithAllPropertiesSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .workloadClassifiers()
+ .define("wlm_workloadclassifier")
+ .withExistingWorkloadGroup("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup")
+ .withMemberName("dbo")
+ .withLabel("test_label")
+ .withContext("test_context")
+ .withStartTime("12:00")
+ .withEndTime("14:00")
+ .withImportance("high")
+ .create();
+ }
+}
+```
+
+### WorkloadClassifiers_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkloadClassifiers Delete. */
+public final class WorkloadClassifiersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteWorkloadClassifier.json
+ */
+ /**
+ * Sample code: Delete a workload classifier.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAWorkloadClassifier(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .workloadClassifiers()
+ .delete(
+ "Default-SQL-SouthEastAsia",
+ "testsvr",
+ "testdb",
+ "wlm_workloadgroup",
+ "wlm_workloadclassifier",
+ Context.NONE);
+ }
+}
+```
+
+### WorkloadClassifiers_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkloadClassifiers Get. */
+public final class WorkloadClassifiersGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadClassifier.json
+ */
+ /**
+ * Sample code: Gets a workload classifier for a data warehouse.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAWorkloadClassifierForADataWarehouse(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .workloadClassifiers()
+ .getWithResponse(
+ "Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_classifier", Context.NONE);
+ }
+}
+```
+
+### WorkloadClassifiers_ListByWorkloadGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkloadClassifiers ListByWorkloadGroup. */
+public final class WorkloadClassifiersListByWorkloadGroupSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadClassifierList.json
+ */
+ /**
+ * Sample code: Get the list of workload classifiers for a workload group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheListOfWorkloadClassifiersForAWorkloadGroup(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .workloadClassifiers()
+ .listByWorkloadGroup("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", Context.NONE);
+ }
+}
+```
+
+### WorkloadGroups_CreateOrUpdate
+
+```java
+/** Samples for WorkloadGroups CreateOrUpdate. */
+public final class WorkloadGroupsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json
+ */
+ /**
+ * Sample code: Create a workload group with the required properties specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAWorkloadGroupWithTheRequiredPropertiesSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .workloadGroups()
+ .define("smallrc")
+ .withExistingDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb")
+ .withMinResourcePercent(0)
+ .withMaxResourcePercent(100)
+ .withMinResourcePercentPerRequest(3.0)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json
+ */
+ /**
+ * Sample code: Create a workload group with all properties specified.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void createAWorkloadGroupWithAllPropertiesSpecified(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .workloadGroups()
+ .define("smallrc")
+ .withExistingDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb")
+ .withMinResourcePercent(0)
+ .withMaxResourcePercent(100)
+ .withMinResourcePercentPerRequest(3.0)
+ .withMaxResourcePercentPerRequest(3.0)
+ .withImportance("normal")
+ .withQueryExecutionTimeout(0)
+ .create();
+ }
+}
+```
+
+### WorkloadGroups_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkloadGroups Delete. */
+public final class WorkloadGroupsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteWorkloadGroup.json
+ */
+ /**
+ * Sample code: Delete a workload group.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void deleteAWorkloadGroup(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .workloadGroups()
+ .delete("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", Context.NONE);
+ }
+}
+```
+
+### WorkloadGroups_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkloadGroups Get. */
+public final class WorkloadGroupsGetSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadGroup.json
+ */
+ /**
+ * Sample code: Gets a workload group for a data warehouse.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getsAWorkloadGroupForADataWarehouse(com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager
+ .workloadGroups()
+ .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", Context.NONE);
+ }
+}
+```
+
+### WorkloadGroups_ListByDatabase
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkloadGroups ListByDatabase. */
+public final class WorkloadGroupsListByDatabaseSamples {
+ /*
+ * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadGroupList.json
+ */
+ /**
+ * Sample code: Get the list of workload groups for a data warehouse.
+ *
+ * @param manager Entry point to SqlManager.
+ */
+ public static void getTheListOfWorkloadGroupsForADataWarehouse(
+ com.azure.resourcemanager.sql.generated.SqlManager manager) {
+ manager.workloadGroups().listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/pom.xml b/sdk/sql/azure-resourcemanager-sql-generated/pom.xml
new file mode 100644
index 0000000000000..1524728c1509d
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-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-sql-generated
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for Sql Management
+ This package contains Microsoft Azure SDK for Sql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete databases. Package tag package-composite-v5.
+ 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.23.1
+
+
+ com.azure
+ azure-core-management
+ 1.4.4
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/SqlManager.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/SqlManager.java
new file mode 100644
index 0000000000000..3eb274b50af8b
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/SqlManager.java
@@ -0,0 +1,1730 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.SqlManagementClient;
+import com.azure.resourcemanager.sql.generated.implementation.BackupShortTermRetentionPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.CapabilitiesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DataMaskingPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DataMaskingRulesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DataWarehouseUserActivitiesOperationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseAdvisorsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseAutomaticTuningsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseBlobAuditingPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseColumnsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseExtensionsOperationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseOperationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseRecommendedActionsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseSchemasImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseSecurityAlertPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseTablesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseUsagesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseVulnerabilityAssessmentRuleBaselinesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseVulnerabilityAssessmentScansImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabaseVulnerabilityAssessmentsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DatabasesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.DeletedServersImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ElasticPoolActivitiesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ElasticPoolDatabaseActivitiesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ElasticPoolOperationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ElasticPoolsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.EncryptionProtectorsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ExtendedDatabaseBlobAuditingPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ExtendedServerBlobAuditingPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.FailoverGroupsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.FirewallRulesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.GeoBackupPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.InstanceFailoverGroupsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.InstancePoolsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.JobAgentsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.JobCredentialsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.JobExecutionsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.JobStepExecutionsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.JobStepsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.JobTargetExecutionsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.JobTargetGroupsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.JobVersionsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.JobsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.LedgerDigestUploadsOperationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.LongTermRetentionBackupsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.LongTermRetentionManagedInstanceBackupsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.LongTermRetentionPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.MaintenanceWindowOptionsOperationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.MaintenanceWindowsOperationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedBackupShortTermRetentionPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseColumnsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseQueriesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseRecommendedSensitivityLabelsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseRestoreDetailsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseSchemasImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseSecurityAlertPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseSecurityEventsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseSensitivityLabelsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseTablesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseTransparentDataEncryptionsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseVulnerabilityAssessmentRuleBaselinesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseVulnerabilityAssessmentScansImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabaseVulnerabilityAssessmentsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedDatabasesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstanceAdministratorsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstanceAzureADOnlyAuthenticationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstanceEncryptionProtectorsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstanceKeysImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstanceLongTermRetentionPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstanceOperationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstancePrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstancePrivateLinkResourcesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstanceTdeCertificatesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstanceVulnerabilityAssessmentsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedInstancesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ManagedServerSecurityAlertPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.OperationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.OutboundFirewallRulesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.PrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.PrivateLinkResourcesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.RecommendedSensitivityLabelsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.RecoverableDatabasesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.RecoverableManagedDatabasesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ReplicationLinksImpl;
+import com.azure.resourcemanager.sql.generated.implementation.RestorableDroppedDatabasesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.RestorableDroppedManagedDatabasesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.RestorePointsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.SensitivityLabelsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerAdvisorsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerAutomaticTuningsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerAzureADAdministratorsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerAzureADOnlyAuthenticationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerBlobAuditingPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerCommunicationLinksImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerConnectionPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerDevOpsAuditSettingsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerDnsAliasesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerKeysImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerOperationsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerSecurityAlertPoliciesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerTrustGroupsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerUsagesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServerVulnerabilityAssessmentsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServersImpl;
+import com.azure.resourcemanager.sql.generated.implementation.ServiceObjectivesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.SqlAgentsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.SqlManagementClientBuilder;
+import com.azure.resourcemanager.sql.generated.implementation.SubscriptionUsagesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.SyncAgentsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.SyncGroupsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.SyncMembersImpl;
+import com.azure.resourcemanager.sql.generated.implementation.TdeCertificatesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.TimeZonesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.TransparentDataEncryptionsImpl;
+import com.azure.resourcemanager.sql.generated.implementation.UsagesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.VirtualClustersImpl;
+import com.azure.resourcemanager.sql.generated.implementation.VirtualNetworkRulesImpl;
+import com.azure.resourcemanager.sql.generated.implementation.WorkloadClassifiersImpl;
+import com.azure.resourcemanager.sql.generated.implementation.WorkloadGroupsImpl;
+import com.azure.resourcemanager.sql.generated.models.BackupShortTermRetentionPolicies;
+import com.azure.resourcemanager.sql.generated.models.Capabilities;
+import com.azure.resourcemanager.sql.generated.models.DataMaskingPolicies;
+import com.azure.resourcemanager.sql.generated.models.DataMaskingRules;
+import com.azure.resourcemanager.sql.generated.models.DataWarehouseUserActivitiesOperations;
+import com.azure.resourcemanager.sql.generated.models.DatabaseAdvisors;
+import com.azure.resourcemanager.sql.generated.models.DatabaseAutomaticTunings;
+import com.azure.resourcemanager.sql.generated.models.DatabaseBlobAuditingPolicies;
+import com.azure.resourcemanager.sql.generated.models.DatabaseColumns;
+import com.azure.resourcemanager.sql.generated.models.DatabaseExtensionsOperations;
+import com.azure.resourcemanager.sql.generated.models.DatabaseOperations;
+import com.azure.resourcemanager.sql.generated.models.DatabaseRecommendedActions;
+import com.azure.resourcemanager.sql.generated.models.DatabaseSchemas;
+import com.azure.resourcemanager.sql.generated.models.DatabaseSecurityAlertPolicies;
+import com.azure.resourcemanager.sql.generated.models.DatabaseTables;
+import com.azure.resourcemanager.sql.generated.models.DatabaseUsages;
+import com.azure.resourcemanager.sql.generated.models.DatabaseVulnerabilityAssessmentRuleBaselines;
+import com.azure.resourcemanager.sql.generated.models.DatabaseVulnerabilityAssessmentScans;
+import com.azure.resourcemanager.sql.generated.models.DatabaseVulnerabilityAssessments;
+import com.azure.resourcemanager.sql.generated.models.Databases;
+import com.azure.resourcemanager.sql.generated.models.DeletedServers;
+import com.azure.resourcemanager.sql.generated.models.ElasticPoolActivities;
+import com.azure.resourcemanager.sql.generated.models.ElasticPoolDatabaseActivities;
+import com.azure.resourcemanager.sql.generated.models.ElasticPoolOperations;
+import com.azure.resourcemanager.sql.generated.models.ElasticPools;
+import com.azure.resourcemanager.sql.generated.models.EncryptionProtectors;
+import com.azure.resourcemanager.sql.generated.models.ExtendedDatabaseBlobAuditingPolicies;
+import com.azure.resourcemanager.sql.generated.models.ExtendedServerBlobAuditingPolicies;
+import com.azure.resourcemanager.sql.generated.models.FailoverGroups;
+import com.azure.resourcemanager.sql.generated.models.FirewallRules;
+import com.azure.resourcemanager.sql.generated.models.GeoBackupPolicies;
+import com.azure.resourcemanager.sql.generated.models.InstanceFailoverGroups;
+import com.azure.resourcemanager.sql.generated.models.InstancePools;
+import com.azure.resourcemanager.sql.generated.models.JobAgents;
+import com.azure.resourcemanager.sql.generated.models.JobCredentials;
+import com.azure.resourcemanager.sql.generated.models.JobExecutions;
+import com.azure.resourcemanager.sql.generated.models.JobStepExecutions;
+import com.azure.resourcemanager.sql.generated.models.JobSteps;
+import com.azure.resourcemanager.sql.generated.models.JobTargetExecutions;
+import com.azure.resourcemanager.sql.generated.models.JobTargetGroups;
+import com.azure.resourcemanager.sql.generated.models.JobVersions;
+import com.azure.resourcemanager.sql.generated.models.Jobs;
+import com.azure.resourcemanager.sql.generated.models.LedgerDigestUploadsOperations;
+import com.azure.resourcemanager.sql.generated.models.LongTermRetentionBackups;
+import com.azure.resourcemanager.sql.generated.models.LongTermRetentionManagedInstanceBackups;
+import com.azure.resourcemanager.sql.generated.models.LongTermRetentionPolicies;
+import com.azure.resourcemanager.sql.generated.models.MaintenanceWindowOptionsOperations;
+import com.azure.resourcemanager.sql.generated.models.MaintenanceWindowsOperations;
+import com.azure.resourcemanager.sql.generated.models.ManagedBackupShortTermRetentionPolicies;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseColumns;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseQueries;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseRecommendedSensitivityLabels;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseRestoreDetails;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseSchemas;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseSecurityAlertPolicies;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseSecurityEvents;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseSensitivityLabels;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseTables;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseTransparentDataEncryptions;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseVulnerabilityAssessmentRuleBaselines;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseVulnerabilityAssessmentScans;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabaseVulnerabilityAssessments;
+import com.azure.resourcemanager.sql.generated.models.ManagedDatabases;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceAdministrators;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceAzureADOnlyAuthentications;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceEncryptionProtectors;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceKeys;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceLongTermRetentionPolicies;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceOperations;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstancePrivateEndpointConnections;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstancePrivateLinkResources;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceTdeCertificates;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstanceVulnerabilityAssessments;
+import com.azure.resourcemanager.sql.generated.models.ManagedInstances;
+import com.azure.resourcemanager.sql.generated.models.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies;
+import com.azure.resourcemanager.sql.generated.models.ManagedServerSecurityAlertPolicies;
+import com.azure.resourcemanager.sql.generated.models.Operations;
+import com.azure.resourcemanager.sql.generated.models.OutboundFirewallRules;
+import com.azure.resourcemanager.sql.generated.models.PrivateEndpointConnections;
+import com.azure.resourcemanager.sql.generated.models.PrivateLinkResources;
+import com.azure.resourcemanager.sql.generated.models.RecommendedSensitivityLabels;
+import com.azure.resourcemanager.sql.generated.models.RecoverableDatabases;
+import com.azure.resourcemanager.sql.generated.models.RecoverableManagedDatabases;
+import com.azure.resourcemanager.sql.generated.models.ReplicationLinks;
+import com.azure.resourcemanager.sql.generated.models.RestorableDroppedDatabases;
+import com.azure.resourcemanager.sql.generated.models.RestorableDroppedManagedDatabases;
+import com.azure.resourcemanager.sql.generated.models.RestorePoints;
+import com.azure.resourcemanager.sql.generated.models.SensitivityLabels;
+import com.azure.resourcemanager.sql.generated.models.ServerAdvisors;
+import com.azure.resourcemanager.sql.generated.models.ServerAutomaticTunings;
+import com.azure.resourcemanager.sql.generated.models.ServerAzureADAdministrators;
+import com.azure.resourcemanager.sql.generated.models.ServerAzureADOnlyAuthentications;
+import com.azure.resourcemanager.sql.generated.models.ServerBlobAuditingPolicies;
+import com.azure.resourcemanager.sql.generated.models.ServerCommunicationLinks;
+import com.azure.resourcemanager.sql.generated.models.ServerConnectionPolicies;
+import com.azure.resourcemanager.sql.generated.models.ServerDevOpsAuditSettings;
+import com.azure.resourcemanager.sql.generated.models.ServerDnsAliases;
+import com.azure.resourcemanager.sql.generated.models.ServerKeys;
+import com.azure.resourcemanager.sql.generated.models.ServerOperations;
+import com.azure.resourcemanager.sql.generated.models.ServerSecurityAlertPolicies;
+import com.azure.resourcemanager.sql.generated.models.ServerTrustGroups;
+import com.azure.resourcemanager.sql.generated.models.ServerUsages;
+import com.azure.resourcemanager.sql.generated.models.ServerVulnerabilityAssessments;
+import com.azure.resourcemanager.sql.generated.models.Servers;
+import com.azure.resourcemanager.sql.generated.models.ServiceObjectives;
+import com.azure.resourcemanager.sql.generated.models.SqlAgents;
+import com.azure.resourcemanager.sql.generated.models.SubscriptionUsages;
+import com.azure.resourcemanager.sql.generated.models.SyncAgents;
+import com.azure.resourcemanager.sql.generated.models.SyncGroups;
+import com.azure.resourcemanager.sql.generated.models.SyncMembers;
+import com.azure.resourcemanager.sql.generated.models.TdeCertificates;
+import com.azure.resourcemanager.sql.generated.models.TimeZones;
+import com.azure.resourcemanager.sql.generated.models.TransparentDataEncryptions;
+import com.azure.resourcemanager.sql.generated.models.Usages;
+import com.azure.resourcemanager.sql.generated.models.VirtualClusters;
+import com.azure.resourcemanager.sql.generated.models.VirtualNetworkRules;
+import com.azure.resourcemanager.sql.generated.models.WorkloadClassifiers;
+import com.azure.resourcemanager.sql.generated.models.WorkloadGroups;
+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 SqlManager. The Azure SQL Database management API provides a RESTful set of web services that interact
+ * with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and
+ * delete databases.
+ */
+public final class SqlManager {
+ private RecoverableDatabases recoverableDatabases;
+
+ private DataMaskingPolicies dataMaskingPolicies;
+
+ private DataMaskingRules dataMaskingRules;
+
+ private GeoBackupPolicies geoBackupPolicies;
+
+ private Databases databases;
+
+ private ElasticPools elasticPools;
+
+ private ReplicationLinks replicationLinks;
+
+ private ServerCommunicationLinks serverCommunicationLinks;
+
+ private ServiceObjectives serviceObjectives;
+
+ private ElasticPoolActivities elasticPoolActivities;
+
+ private ElasticPoolDatabaseActivities elasticPoolDatabaseActivities;
+
+ private ServerUsages serverUsages;
+
+ private ExtendedDatabaseBlobAuditingPolicies extendedDatabaseBlobAuditingPolicies;
+
+ private ExtendedServerBlobAuditingPolicies extendedServerBlobAuditingPolicies;
+
+ private ServerBlobAuditingPolicies serverBlobAuditingPolicies;
+
+ private DatabaseBlobAuditingPolicies databaseBlobAuditingPolicies;
+
+ private DatabaseAdvisors databaseAdvisors;
+
+ private DatabaseAutomaticTunings databaseAutomaticTunings;
+
+ private DatabaseColumns databaseColumns;
+
+ private DatabaseRecommendedActions databaseRecommendedActions;
+
+ private DatabaseSchemas databaseSchemas;
+
+ private DatabaseSecurityAlertPolicies databaseSecurityAlertPolicies;
+
+ private DatabaseTables databaseTables;
+
+ private DatabaseVulnerabilityAssessmentRuleBaselines databaseVulnerabilityAssessmentRuleBaselines;
+
+ private DatabaseVulnerabilityAssessments databaseVulnerabilityAssessments;
+
+ private DatabaseVulnerabilityAssessmentScans databaseVulnerabilityAssessmentScans;
+
+ private DataWarehouseUserActivitiesOperations dataWarehouseUserActivitiesOperations;
+
+ private DeletedServers deletedServers;
+
+ private ElasticPoolOperations elasticPoolOperations;
+
+ private EncryptionProtectors encryptionProtectors;
+
+ private FailoverGroups failoverGroups;
+
+ private FirewallRules firewallRules;
+
+ private InstanceFailoverGroups instanceFailoverGroups;
+
+ private InstancePools instancePools;
+
+ private JobAgents jobAgents;
+
+ private JobCredentials jobCredentials;
+
+ private JobExecutions jobExecutions;
+
+ private Jobs jobs;
+
+ private JobStepExecutions jobStepExecutions;
+
+ private JobSteps jobSteps;
+
+ private JobTargetExecutions jobTargetExecutions;
+
+ private JobTargetGroups jobTargetGroups;
+
+ private JobVersions jobVersions;
+
+ private Capabilities capabilities;
+
+ private LongTermRetentionPolicies longTermRetentionPolicies;
+
+ private MaintenanceWindowOptionsOperations maintenanceWindowOptionsOperations;
+
+ private MaintenanceWindowsOperations maintenanceWindowsOperations;
+
+ private ManagedBackupShortTermRetentionPolicies managedBackupShortTermRetentionPolicies;
+
+ private ManagedDatabaseColumns managedDatabaseColumns;
+
+ private ManagedDatabaseQueries managedDatabaseQueries;
+
+ private ManagedDatabaseRestoreDetails managedDatabaseRestoreDetails;
+
+ private ManagedDatabases managedDatabases;
+
+ private ManagedDatabaseSchemas managedDatabaseSchemas;
+
+ private ManagedDatabaseSecurityAlertPolicies managedDatabaseSecurityAlertPolicies;
+
+ private ManagedDatabaseSecurityEvents managedDatabaseSecurityEvents;
+
+ private ManagedDatabaseSensitivityLabels managedDatabaseSensitivityLabels;
+
+ private ManagedDatabaseRecommendedSensitivityLabels managedDatabaseRecommendedSensitivityLabels;
+
+ private ManagedDatabaseTables managedDatabaseTables;
+
+ private ManagedDatabaseTransparentDataEncryptions managedDatabaseTransparentDataEncryptions;
+
+ private ManagedDatabaseVulnerabilityAssessmentRuleBaselines managedDatabaseVulnerabilityAssessmentRuleBaselines;
+
+ private ManagedDatabaseVulnerabilityAssessments managedDatabaseVulnerabilityAssessments;
+
+ private ManagedDatabaseVulnerabilityAssessmentScans managedDatabaseVulnerabilityAssessmentScans;
+
+ private ManagedInstanceAdministrators managedInstanceAdministrators;
+
+ private ManagedInstanceAzureADOnlyAuthentications managedInstanceAzureADOnlyAuthentications;
+
+ private ManagedInstanceEncryptionProtectors managedInstanceEncryptionProtectors;
+
+ private ManagedInstanceKeys managedInstanceKeys;
+
+ private ManagedInstanceLongTermRetentionPolicies managedInstanceLongTermRetentionPolicies;
+
+ private ManagedInstanceOperations managedInstanceOperations;
+
+ private ManagedInstancePrivateEndpointConnections managedInstancePrivateEndpointConnections;
+
+ private ManagedInstancePrivateLinkResources managedInstancePrivateLinkResources;
+
+ private ManagedInstanceTdeCertificates managedInstanceTdeCertificates;
+
+ private ManagedInstanceVulnerabilityAssessments managedInstanceVulnerabilityAssessments;
+
+ private ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies
+ managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies;
+
+ private ManagedServerSecurityAlertPolicies managedServerSecurityAlertPolicies;
+
+ private Operations operations;
+
+ private PrivateEndpointConnections privateEndpointConnections;
+
+ private PrivateLinkResources privateLinkResources;
+
+ private RecoverableManagedDatabases recoverableManagedDatabases;
+
+ private RestorePoints restorePoints;
+
+ private SensitivityLabels sensitivityLabels;
+
+ private RecommendedSensitivityLabels recommendedSensitivityLabels;
+
+ private ServerAdvisors serverAdvisors;
+
+ private ServerAutomaticTunings serverAutomaticTunings;
+
+ private ServerAzureADAdministrators serverAzureADAdministrators;
+
+ private ServerAzureADOnlyAuthentications serverAzureADOnlyAuthentications;
+
+ private ServerDevOpsAuditSettings serverDevOpsAuditSettings;
+
+ private ServerDnsAliases serverDnsAliases;
+
+ private ServerKeys serverKeys;
+
+ private ServerOperations serverOperations;
+
+ private ServerSecurityAlertPolicies serverSecurityAlertPolicies;
+
+ private ServerTrustGroups serverTrustGroups;
+
+ private ServerVulnerabilityAssessments serverVulnerabilityAssessments;
+
+ private SqlAgents sqlAgents;
+
+ private SubscriptionUsages subscriptionUsages;
+
+ private SyncAgents syncAgents;
+
+ private SyncGroups syncGroups;
+
+ private SyncMembers syncMembers;
+
+ private TdeCertificates tdeCertificates;
+
+ private TimeZones timeZones;
+
+ private VirtualClusters virtualClusters;
+
+ private VirtualNetworkRules virtualNetworkRules;
+
+ private WorkloadClassifiers workloadClassifiers;
+
+ private WorkloadGroups workloadGroups;
+
+ private TransparentDataEncryptions transparentDataEncryptions;
+
+ private BackupShortTermRetentionPolicies backupShortTermRetentionPolicies;
+
+ private DatabaseExtensionsOperations databaseExtensionsOperations;
+
+ private DatabaseOperations databaseOperations;
+
+ private DatabaseUsages databaseUsages;
+
+ private LedgerDigestUploadsOperations ledgerDigestUploadsOperations;
+
+ private OutboundFirewallRules outboundFirewallRules;
+
+ private Servers servers;
+
+ private Usages usages;
+
+ private LongTermRetentionBackups longTermRetentionBackups;
+
+ private LongTermRetentionManagedInstanceBackups longTermRetentionManagedInstanceBackups;
+
+ private ManagedInstances managedInstances;
+
+ private RestorableDroppedDatabases restorableDroppedDatabases;
+
+ private RestorableDroppedManagedDatabases restorableDroppedManagedDatabases;
+
+ private ServerConnectionPolicies serverConnectionPolicies;
+
+ private final SqlManagementClient clientObject;
+
+ private SqlManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new SqlManagementClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of Sql service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Sql service API instance.
+ */
+ public static SqlManager 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 SqlManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new SqlManager.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 Sql service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Sql service API instance.
+ */
+ public SqlManager 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.sql.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 SqlManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of RecoverableDatabases. */
+ public RecoverableDatabases recoverableDatabases() {
+ if (this.recoverableDatabases == null) {
+ this.recoverableDatabases = new RecoverableDatabasesImpl(clientObject.getRecoverableDatabases(), this);
+ }
+ return recoverableDatabases;
+ }
+
+ /** @return Resource collection API of DataMaskingPolicies. */
+ public DataMaskingPolicies dataMaskingPolicies() {
+ if (this.dataMaskingPolicies == null) {
+ this.dataMaskingPolicies = new DataMaskingPoliciesImpl(clientObject.getDataMaskingPolicies(), this);
+ }
+ return dataMaskingPolicies;
+ }
+
+ /** @return Resource collection API of DataMaskingRules. */
+ public DataMaskingRules dataMaskingRules() {
+ if (this.dataMaskingRules == null) {
+ this.dataMaskingRules = new DataMaskingRulesImpl(clientObject.getDataMaskingRules(), this);
+ }
+ return dataMaskingRules;
+ }
+
+ /** @return Resource collection API of GeoBackupPolicies. */
+ public GeoBackupPolicies geoBackupPolicies() {
+ if (this.geoBackupPolicies == null) {
+ this.geoBackupPolicies = new GeoBackupPoliciesImpl(clientObject.getGeoBackupPolicies(), this);
+ }
+ return geoBackupPolicies;
+ }
+
+ /** @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 ElasticPools. */
+ public ElasticPools elasticPools() {
+ if (this.elasticPools == null) {
+ this.elasticPools = new ElasticPoolsImpl(clientObject.getElasticPools(), this);
+ }
+ return elasticPools;
+ }
+
+ /** @return Resource collection API of ReplicationLinks. */
+ public ReplicationLinks replicationLinks() {
+ if (this.replicationLinks == null) {
+ this.replicationLinks = new ReplicationLinksImpl(clientObject.getReplicationLinks(), this);
+ }
+ return replicationLinks;
+ }
+
+ /** @return Resource collection API of ServerCommunicationLinks. */
+ public ServerCommunicationLinks serverCommunicationLinks() {
+ if (this.serverCommunicationLinks == null) {
+ this.serverCommunicationLinks =
+ new ServerCommunicationLinksImpl(clientObject.getServerCommunicationLinks(), this);
+ }
+ return serverCommunicationLinks;
+ }
+
+ /** @return Resource collection API of ServiceObjectives. */
+ public ServiceObjectives serviceObjectives() {
+ if (this.serviceObjectives == null) {
+ this.serviceObjectives = new ServiceObjectivesImpl(clientObject.getServiceObjectives(), this);
+ }
+ return serviceObjectives;
+ }
+
+ /** @return Resource collection API of ElasticPoolActivities. */
+ public ElasticPoolActivities elasticPoolActivities() {
+ if (this.elasticPoolActivities == null) {
+ this.elasticPoolActivities = new ElasticPoolActivitiesImpl(clientObject.getElasticPoolActivities(), this);
+ }
+ return elasticPoolActivities;
+ }
+
+ /** @return Resource collection API of ElasticPoolDatabaseActivities. */
+ public ElasticPoolDatabaseActivities elasticPoolDatabaseActivities() {
+ if (this.elasticPoolDatabaseActivities == null) {
+ this.elasticPoolDatabaseActivities =
+ new ElasticPoolDatabaseActivitiesImpl(clientObject.getElasticPoolDatabaseActivities(), this);
+ }
+ return elasticPoolDatabaseActivities;
+ }
+
+ /** @return Resource collection API of ServerUsages. */
+ public ServerUsages serverUsages() {
+ if (this.serverUsages == null) {
+ this.serverUsages = new ServerUsagesImpl(clientObject.getServerUsages(), this);
+ }
+ return serverUsages;
+ }
+
+ /** @return Resource collection API of ExtendedDatabaseBlobAuditingPolicies. */
+ public ExtendedDatabaseBlobAuditingPolicies extendedDatabaseBlobAuditingPolicies() {
+ if (this.extendedDatabaseBlobAuditingPolicies == null) {
+ this.extendedDatabaseBlobAuditingPolicies =
+ new ExtendedDatabaseBlobAuditingPoliciesImpl(
+ clientObject.getExtendedDatabaseBlobAuditingPolicies(), this);
+ }
+ return extendedDatabaseBlobAuditingPolicies;
+ }
+
+ /** @return Resource collection API of ExtendedServerBlobAuditingPolicies. */
+ public ExtendedServerBlobAuditingPolicies extendedServerBlobAuditingPolicies() {
+ if (this.extendedServerBlobAuditingPolicies == null) {
+ this.extendedServerBlobAuditingPolicies =
+ new ExtendedServerBlobAuditingPoliciesImpl(clientObject.getExtendedServerBlobAuditingPolicies(), this);
+ }
+ return extendedServerBlobAuditingPolicies;
+ }
+
+ /** @return Resource collection API of ServerBlobAuditingPolicies. */
+ public ServerBlobAuditingPolicies serverBlobAuditingPolicies() {
+ if (this.serverBlobAuditingPolicies == null) {
+ this.serverBlobAuditingPolicies =
+ new ServerBlobAuditingPoliciesImpl(clientObject.getServerBlobAuditingPolicies(), this);
+ }
+ return serverBlobAuditingPolicies;
+ }
+
+ /** @return Resource collection API of DatabaseBlobAuditingPolicies. */
+ public DatabaseBlobAuditingPolicies databaseBlobAuditingPolicies() {
+ if (this.databaseBlobAuditingPolicies == null) {
+ this.databaseBlobAuditingPolicies =
+ new DatabaseBlobAuditingPoliciesImpl(clientObject.getDatabaseBlobAuditingPolicies(), this);
+ }
+ return databaseBlobAuditingPolicies;
+ }
+
+ /** @return Resource collection API of DatabaseAdvisors. */
+ public DatabaseAdvisors databaseAdvisors() {
+ if (this.databaseAdvisors == null) {
+ this.databaseAdvisors = new DatabaseAdvisorsImpl(clientObject.getDatabaseAdvisors(), this);
+ }
+ return databaseAdvisors;
+ }
+
+ /** @return Resource collection API of DatabaseAutomaticTunings. */
+ public DatabaseAutomaticTunings databaseAutomaticTunings() {
+ if (this.databaseAutomaticTunings == null) {
+ this.databaseAutomaticTunings =
+ new DatabaseAutomaticTuningsImpl(clientObject.getDatabaseAutomaticTunings(), this);
+ }
+ return databaseAutomaticTunings;
+ }
+
+ /** @return Resource collection API of DatabaseColumns. */
+ public DatabaseColumns databaseColumns() {
+ if (this.databaseColumns == null) {
+ this.databaseColumns = new DatabaseColumnsImpl(clientObject.getDatabaseColumns(), this);
+ }
+ return databaseColumns;
+ }
+
+ /** @return Resource collection API of DatabaseRecommendedActions. */
+ public DatabaseRecommendedActions databaseRecommendedActions() {
+ if (this.databaseRecommendedActions == null) {
+ this.databaseRecommendedActions =
+ new DatabaseRecommendedActionsImpl(clientObject.getDatabaseRecommendedActions(), this);
+ }
+ return databaseRecommendedActions;
+ }
+
+ /** @return Resource collection API of DatabaseSchemas. */
+ public DatabaseSchemas databaseSchemas() {
+ if (this.databaseSchemas == null) {
+ this.databaseSchemas = new DatabaseSchemasImpl(clientObject.getDatabaseSchemas(), this);
+ }
+ return databaseSchemas;
+ }
+
+ /** @return Resource collection API of DatabaseSecurityAlertPolicies. */
+ public DatabaseSecurityAlertPolicies databaseSecurityAlertPolicies() {
+ if (this.databaseSecurityAlertPolicies == null) {
+ this.databaseSecurityAlertPolicies =
+ new DatabaseSecurityAlertPoliciesImpl(clientObject.getDatabaseSecurityAlertPolicies(), this);
+ }
+ return databaseSecurityAlertPolicies;
+ }
+
+ /** @return Resource collection API of DatabaseTables. */
+ public DatabaseTables databaseTables() {
+ if (this.databaseTables == null) {
+ this.databaseTables = new DatabaseTablesImpl(clientObject.getDatabaseTables(), this);
+ }
+ return databaseTables;
+ }
+
+ /** @return Resource collection API of DatabaseVulnerabilityAssessmentRuleBaselines. */
+ public DatabaseVulnerabilityAssessmentRuleBaselines databaseVulnerabilityAssessmentRuleBaselines() {
+ if (this.databaseVulnerabilityAssessmentRuleBaselines == null) {
+ this.databaseVulnerabilityAssessmentRuleBaselines =
+ new DatabaseVulnerabilityAssessmentRuleBaselinesImpl(
+ clientObject.getDatabaseVulnerabilityAssessmentRuleBaselines(), this);
+ }
+ return databaseVulnerabilityAssessmentRuleBaselines;
+ }
+
+ /** @return Resource collection API of DatabaseVulnerabilityAssessments. */
+ public DatabaseVulnerabilityAssessments databaseVulnerabilityAssessments() {
+ if (this.databaseVulnerabilityAssessments == null) {
+ this.databaseVulnerabilityAssessments =
+ new DatabaseVulnerabilityAssessmentsImpl(clientObject.getDatabaseVulnerabilityAssessments(), this);
+ }
+ return databaseVulnerabilityAssessments;
+ }
+
+ /** @return Resource collection API of DatabaseVulnerabilityAssessmentScans. */
+ public DatabaseVulnerabilityAssessmentScans databaseVulnerabilityAssessmentScans() {
+ if (this.databaseVulnerabilityAssessmentScans == null) {
+ this.databaseVulnerabilityAssessmentScans =
+ new DatabaseVulnerabilityAssessmentScansImpl(
+ clientObject.getDatabaseVulnerabilityAssessmentScans(), this);
+ }
+ return databaseVulnerabilityAssessmentScans;
+ }
+
+ /** @return Resource collection API of DataWarehouseUserActivitiesOperations. */
+ public DataWarehouseUserActivitiesOperations dataWarehouseUserActivitiesOperations() {
+ if (this.dataWarehouseUserActivitiesOperations == null) {
+ this.dataWarehouseUserActivitiesOperations =
+ new DataWarehouseUserActivitiesOperationsImpl(
+ clientObject.getDataWarehouseUserActivitiesOperations(), this);
+ }
+ return dataWarehouseUserActivitiesOperations;
+ }
+
+ /** @return Resource collection API of DeletedServers. */
+ public DeletedServers deletedServers() {
+ if (this.deletedServers == null) {
+ this.deletedServers = new DeletedServersImpl(clientObject.getDeletedServers(), this);
+ }
+ return deletedServers;
+ }
+
+ /** @return Resource collection API of ElasticPoolOperations. */
+ public ElasticPoolOperations elasticPoolOperations() {
+ if (this.elasticPoolOperations == null) {
+ this.elasticPoolOperations = new ElasticPoolOperationsImpl(clientObject.getElasticPoolOperations(), this);
+ }
+ return elasticPoolOperations;
+ }
+
+ /** @return Resource collection API of EncryptionProtectors. */
+ public EncryptionProtectors encryptionProtectors() {
+ if (this.encryptionProtectors == null) {
+ this.encryptionProtectors = new EncryptionProtectorsImpl(clientObject.getEncryptionProtectors(), this);
+ }
+ return encryptionProtectors;
+ }
+
+ /** @return Resource collection API of FailoverGroups. */
+ public FailoverGroups failoverGroups() {
+ if (this.failoverGroups == null) {
+ this.failoverGroups = new FailoverGroupsImpl(clientObject.getFailoverGroups(), this);
+ }
+ return failoverGroups;
+ }
+
+ /** @return Resource collection API of FirewallRules. */
+ public FirewallRules firewallRules() {
+ if (this.firewallRules == null) {
+ this.firewallRules = new FirewallRulesImpl(clientObject.getFirewallRules(), this);
+ }
+ return firewallRules;
+ }
+
+ /** @return Resource collection API of InstanceFailoverGroups. */
+ public InstanceFailoverGroups instanceFailoverGroups() {
+ if (this.instanceFailoverGroups == null) {
+ this.instanceFailoverGroups =
+ new InstanceFailoverGroupsImpl(clientObject.getInstanceFailoverGroups(), this);
+ }
+ return instanceFailoverGroups;
+ }
+
+ /** @return Resource collection API of InstancePools. */
+ public InstancePools instancePools() {
+ if (this.instancePools == null) {
+ this.instancePools = new InstancePoolsImpl(clientObject.getInstancePools(), this);
+ }
+ return instancePools;
+ }
+
+ /** @return Resource collection API of JobAgents. */
+ public JobAgents jobAgents() {
+ if (this.jobAgents == null) {
+ this.jobAgents = new JobAgentsImpl(clientObject.getJobAgents(), this);
+ }
+ return jobAgents;
+ }
+
+ /** @return Resource collection API of JobCredentials. */
+ public JobCredentials jobCredentials() {
+ if (this.jobCredentials == null) {
+ this.jobCredentials = new JobCredentialsImpl(clientObject.getJobCredentials(), this);
+ }
+ return jobCredentials;
+ }
+
+ /** @return Resource collection API of JobExecutions. */
+ public JobExecutions jobExecutions() {
+ if (this.jobExecutions == null) {
+ this.jobExecutions = new JobExecutionsImpl(clientObject.getJobExecutions(), this);
+ }
+ return jobExecutions;
+ }
+
+ /** @return Resource collection API of Jobs. */
+ public Jobs jobs() {
+ if (this.jobs == null) {
+ this.jobs = new JobsImpl(clientObject.getJobs(), this);
+ }
+ return jobs;
+ }
+
+ /** @return Resource collection API of JobStepExecutions. */
+ public JobStepExecutions jobStepExecutions() {
+ if (this.jobStepExecutions == null) {
+ this.jobStepExecutions = new JobStepExecutionsImpl(clientObject.getJobStepExecutions(), this);
+ }
+ return jobStepExecutions;
+ }
+
+ /** @return Resource collection API of JobSteps. */
+ public JobSteps jobSteps() {
+ if (this.jobSteps == null) {
+ this.jobSteps = new JobStepsImpl(clientObject.getJobSteps(), this);
+ }
+ return jobSteps;
+ }
+
+ /** @return Resource collection API of JobTargetExecutions. */
+ public JobTargetExecutions jobTargetExecutions() {
+ if (this.jobTargetExecutions == null) {
+ this.jobTargetExecutions = new JobTargetExecutionsImpl(clientObject.getJobTargetExecutions(), this);
+ }
+ return jobTargetExecutions;
+ }
+
+ /** @return Resource collection API of JobTargetGroups. */
+ public JobTargetGroups jobTargetGroups() {
+ if (this.jobTargetGroups == null) {
+ this.jobTargetGroups = new JobTargetGroupsImpl(clientObject.getJobTargetGroups(), this);
+ }
+ return jobTargetGroups;
+ }
+
+ /** @return Resource collection API of JobVersions. */
+ public JobVersions jobVersions() {
+ if (this.jobVersions == null) {
+ this.jobVersions = new JobVersionsImpl(clientObject.getJobVersions(), this);
+ }
+ return jobVersions;
+ }
+
+ /** @return Resource collection API of Capabilities. */
+ public Capabilities capabilities() {
+ if (this.capabilities == null) {
+ this.capabilities = new CapabilitiesImpl(clientObject.getCapabilities(), this);
+ }
+ return capabilities;
+ }
+
+ /** @return Resource collection API of LongTermRetentionPolicies. */
+ public LongTermRetentionPolicies longTermRetentionPolicies() {
+ if (this.longTermRetentionPolicies == null) {
+ this.longTermRetentionPolicies =
+ new LongTermRetentionPoliciesImpl(clientObject.getLongTermRetentionPolicies(), this);
+ }
+ return longTermRetentionPolicies;
+ }
+
+ /** @return Resource collection API of MaintenanceWindowOptionsOperations. */
+ public MaintenanceWindowOptionsOperations maintenanceWindowOptionsOperations() {
+ if (this.maintenanceWindowOptionsOperations == null) {
+ this.maintenanceWindowOptionsOperations =
+ new MaintenanceWindowOptionsOperationsImpl(clientObject.getMaintenanceWindowOptionsOperations(), this);
+ }
+ return maintenanceWindowOptionsOperations;
+ }
+
+ /** @return Resource collection API of MaintenanceWindowsOperations. */
+ public MaintenanceWindowsOperations maintenanceWindowsOperations() {
+ if (this.maintenanceWindowsOperations == null) {
+ this.maintenanceWindowsOperations =
+ new MaintenanceWindowsOperationsImpl(clientObject.getMaintenanceWindowsOperations(), this);
+ }
+ return maintenanceWindowsOperations;
+ }
+
+ /** @return Resource collection API of ManagedBackupShortTermRetentionPolicies. */
+ public ManagedBackupShortTermRetentionPolicies managedBackupShortTermRetentionPolicies() {
+ if (this.managedBackupShortTermRetentionPolicies == null) {
+ this.managedBackupShortTermRetentionPolicies =
+ new ManagedBackupShortTermRetentionPoliciesImpl(
+ clientObject.getManagedBackupShortTermRetentionPolicies(), this);
+ }
+ return managedBackupShortTermRetentionPolicies;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseColumns. */
+ public ManagedDatabaseColumns managedDatabaseColumns() {
+ if (this.managedDatabaseColumns == null) {
+ this.managedDatabaseColumns =
+ new ManagedDatabaseColumnsImpl(clientObject.getManagedDatabaseColumns(), this);
+ }
+ return managedDatabaseColumns;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseQueries. */
+ public ManagedDatabaseQueries managedDatabaseQueries() {
+ if (this.managedDatabaseQueries == null) {
+ this.managedDatabaseQueries =
+ new ManagedDatabaseQueriesImpl(clientObject.getManagedDatabaseQueries(), this);
+ }
+ return managedDatabaseQueries;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseRestoreDetails. */
+ public ManagedDatabaseRestoreDetails managedDatabaseRestoreDetails() {
+ if (this.managedDatabaseRestoreDetails == null) {
+ this.managedDatabaseRestoreDetails =
+ new ManagedDatabaseRestoreDetailsImpl(clientObject.getManagedDatabaseRestoreDetails(), this);
+ }
+ return managedDatabaseRestoreDetails;
+ }
+
+ /** @return Resource collection API of ManagedDatabases. */
+ public ManagedDatabases managedDatabases() {
+ if (this.managedDatabases == null) {
+ this.managedDatabases = new ManagedDatabasesImpl(clientObject.getManagedDatabases(), this);
+ }
+ return managedDatabases;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseSchemas. */
+ public ManagedDatabaseSchemas managedDatabaseSchemas() {
+ if (this.managedDatabaseSchemas == null) {
+ this.managedDatabaseSchemas =
+ new ManagedDatabaseSchemasImpl(clientObject.getManagedDatabaseSchemas(), this);
+ }
+ return managedDatabaseSchemas;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseSecurityAlertPolicies. */
+ public ManagedDatabaseSecurityAlertPolicies managedDatabaseSecurityAlertPolicies() {
+ if (this.managedDatabaseSecurityAlertPolicies == null) {
+ this.managedDatabaseSecurityAlertPolicies =
+ new ManagedDatabaseSecurityAlertPoliciesImpl(
+ clientObject.getManagedDatabaseSecurityAlertPolicies(), this);
+ }
+ return managedDatabaseSecurityAlertPolicies;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseSecurityEvents. */
+ public ManagedDatabaseSecurityEvents managedDatabaseSecurityEvents() {
+ if (this.managedDatabaseSecurityEvents == null) {
+ this.managedDatabaseSecurityEvents =
+ new ManagedDatabaseSecurityEventsImpl(clientObject.getManagedDatabaseSecurityEvents(), this);
+ }
+ return managedDatabaseSecurityEvents;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseSensitivityLabels. */
+ public ManagedDatabaseSensitivityLabels managedDatabaseSensitivityLabels() {
+ if (this.managedDatabaseSensitivityLabels == null) {
+ this.managedDatabaseSensitivityLabels =
+ new ManagedDatabaseSensitivityLabelsImpl(clientObject.getManagedDatabaseSensitivityLabels(), this);
+ }
+ return managedDatabaseSensitivityLabels;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseRecommendedSensitivityLabels. */
+ public ManagedDatabaseRecommendedSensitivityLabels managedDatabaseRecommendedSensitivityLabels() {
+ if (this.managedDatabaseRecommendedSensitivityLabels == null) {
+ this.managedDatabaseRecommendedSensitivityLabels =
+ new ManagedDatabaseRecommendedSensitivityLabelsImpl(
+ clientObject.getManagedDatabaseRecommendedSensitivityLabels(), this);
+ }
+ return managedDatabaseRecommendedSensitivityLabels;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseTables. */
+ public ManagedDatabaseTables managedDatabaseTables() {
+ if (this.managedDatabaseTables == null) {
+ this.managedDatabaseTables = new ManagedDatabaseTablesImpl(clientObject.getManagedDatabaseTables(), this);
+ }
+ return managedDatabaseTables;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseTransparentDataEncryptions. */
+ public ManagedDatabaseTransparentDataEncryptions managedDatabaseTransparentDataEncryptions() {
+ if (this.managedDatabaseTransparentDataEncryptions == null) {
+ this.managedDatabaseTransparentDataEncryptions =
+ new ManagedDatabaseTransparentDataEncryptionsImpl(
+ clientObject.getManagedDatabaseTransparentDataEncryptions(), this);
+ }
+ return managedDatabaseTransparentDataEncryptions;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseVulnerabilityAssessmentRuleBaselines. */
+ public ManagedDatabaseVulnerabilityAssessmentRuleBaselines managedDatabaseVulnerabilityAssessmentRuleBaselines() {
+ if (this.managedDatabaseVulnerabilityAssessmentRuleBaselines == null) {
+ this.managedDatabaseVulnerabilityAssessmentRuleBaselines =
+ new ManagedDatabaseVulnerabilityAssessmentRuleBaselinesImpl(
+ clientObject.getManagedDatabaseVulnerabilityAssessmentRuleBaselines(), this);
+ }
+ return managedDatabaseVulnerabilityAssessmentRuleBaselines;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseVulnerabilityAssessments. */
+ public ManagedDatabaseVulnerabilityAssessments managedDatabaseVulnerabilityAssessments() {
+ if (this.managedDatabaseVulnerabilityAssessments == null) {
+ this.managedDatabaseVulnerabilityAssessments =
+ new ManagedDatabaseVulnerabilityAssessmentsImpl(
+ clientObject.getManagedDatabaseVulnerabilityAssessments(), this);
+ }
+ return managedDatabaseVulnerabilityAssessments;
+ }
+
+ /** @return Resource collection API of ManagedDatabaseVulnerabilityAssessmentScans. */
+ public ManagedDatabaseVulnerabilityAssessmentScans managedDatabaseVulnerabilityAssessmentScans() {
+ if (this.managedDatabaseVulnerabilityAssessmentScans == null) {
+ this.managedDatabaseVulnerabilityAssessmentScans =
+ new ManagedDatabaseVulnerabilityAssessmentScansImpl(
+ clientObject.getManagedDatabaseVulnerabilityAssessmentScans(), this);
+ }
+ return managedDatabaseVulnerabilityAssessmentScans;
+ }
+
+ /** @return Resource collection API of ManagedInstanceAdministrators. */
+ public ManagedInstanceAdministrators managedInstanceAdministrators() {
+ if (this.managedInstanceAdministrators == null) {
+ this.managedInstanceAdministrators =
+ new ManagedInstanceAdministratorsImpl(clientObject.getManagedInstanceAdministrators(), this);
+ }
+ return managedInstanceAdministrators;
+ }
+
+ /** @return Resource collection API of ManagedInstanceAzureADOnlyAuthentications. */
+ public ManagedInstanceAzureADOnlyAuthentications managedInstanceAzureADOnlyAuthentications() {
+ if (this.managedInstanceAzureADOnlyAuthentications == null) {
+ this.managedInstanceAzureADOnlyAuthentications =
+ new ManagedInstanceAzureADOnlyAuthenticationsImpl(
+ clientObject.getManagedInstanceAzureADOnlyAuthentications(), this);
+ }
+ return managedInstanceAzureADOnlyAuthentications;
+ }
+
+ /** @return Resource collection API of ManagedInstanceEncryptionProtectors. */
+ public ManagedInstanceEncryptionProtectors managedInstanceEncryptionProtectors() {
+ if (this.managedInstanceEncryptionProtectors == null) {
+ this.managedInstanceEncryptionProtectors =
+ new ManagedInstanceEncryptionProtectorsImpl(
+ clientObject.getManagedInstanceEncryptionProtectors(), this);
+ }
+ return managedInstanceEncryptionProtectors;
+ }
+
+ /** @return Resource collection API of ManagedInstanceKeys. */
+ public ManagedInstanceKeys managedInstanceKeys() {
+ if (this.managedInstanceKeys == null) {
+ this.managedInstanceKeys = new ManagedInstanceKeysImpl(clientObject.getManagedInstanceKeys(), this);
+ }
+ return managedInstanceKeys;
+ }
+
+ /** @return Resource collection API of ManagedInstanceLongTermRetentionPolicies. */
+ public ManagedInstanceLongTermRetentionPolicies managedInstanceLongTermRetentionPolicies() {
+ if (this.managedInstanceLongTermRetentionPolicies == null) {
+ this.managedInstanceLongTermRetentionPolicies =
+ new ManagedInstanceLongTermRetentionPoliciesImpl(
+ clientObject.getManagedInstanceLongTermRetentionPolicies(), this);
+ }
+ return managedInstanceLongTermRetentionPolicies;
+ }
+
+ /** @return Resource collection API of ManagedInstanceOperations. */
+ public ManagedInstanceOperations managedInstanceOperations() {
+ if (this.managedInstanceOperations == null) {
+ this.managedInstanceOperations =
+ new ManagedInstanceOperationsImpl(clientObject.getManagedInstanceOperations(), this);
+ }
+ return managedInstanceOperations;
+ }
+
+ /** @return Resource collection API of ManagedInstancePrivateEndpointConnections. */
+ public ManagedInstancePrivateEndpointConnections managedInstancePrivateEndpointConnections() {
+ if (this.managedInstancePrivateEndpointConnections == null) {
+ this.managedInstancePrivateEndpointConnections =
+ new ManagedInstancePrivateEndpointConnectionsImpl(
+ clientObject.getManagedInstancePrivateEndpointConnections(), this);
+ }
+ return managedInstancePrivateEndpointConnections;
+ }
+
+ /** @return Resource collection API of ManagedInstancePrivateLinkResources. */
+ public ManagedInstancePrivateLinkResources managedInstancePrivateLinkResources() {
+ if (this.managedInstancePrivateLinkResources == null) {
+ this.managedInstancePrivateLinkResources =
+ new ManagedInstancePrivateLinkResourcesImpl(
+ clientObject.getManagedInstancePrivateLinkResources(), this);
+ }
+ return managedInstancePrivateLinkResources;
+ }
+
+ /** @return Resource collection API of ManagedInstanceTdeCertificates. */
+ public ManagedInstanceTdeCertificates managedInstanceTdeCertificates() {
+ if (this.managedInstanceTdeCertificates == null) {
+ this.managedInstanceTdeCertificates =
+ new ManagedInstanceTdeCertificatesImpl(clientObject.getManagedInstanceTdeCertificates(), this);
+ }
+ return managedInstanceTdeCertificates;
+ }
+
+ /** @return Resource collection API of ManagedInstanceVulnerabilityAssessments. */
+ public ManagedInstanceVulnerabilityAssessments managedInstanceVulnerabilityAssessments() {
+ if (this.managedInstanceVulnerabilityAssessments == null) {
+ this.managedInstanceVulnerabilityAssessments =
+ new ManagedInstanceVulnerabilityAssessmentsImpl(
+ clientObject.getManagedInstanceVulnerabilityAssessments(), this);
+ }
+ return managedInstanceVulnerabilityAssessments;
+ }
+
+ /** @return Resource collection API of ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies. */
+ public ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies
+ managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() {
+ if (this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies == null) {
+ this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies =
+ new ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesImpl(
+ clientObject.getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies(), this);
+ }
+ return managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies;
+ }
+
+ /** @return Resource collection API of ManagedServerSecurityAlertPolicies. */
+ public ManagedServerSecurityAlertPolicies managedServerSecurityAlertPolicies() {
+ if (this.managedServerSecurityAlertPolicies == null) {
+ this.managedServerSecurityAlertPolicies =
+ new ManagedServerSecurityAlertPoliciesImpl(clientObject.getManagedServerSecurityAlertPolicies(), this);
+ }
+ return managedServerSecurityAlertPolicies;
+ }
+
+ /** @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 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 RecoverableManagedDatabases. */
+ public RecoverableManagedDatabases recoverableManagedDatabases() {
+ if (this.recoverableManagedDatabases == null) {
+ this.recoverableManagedDatabases =
+ new RecoverableManagedDatabasesImpl(clientObject.getRecoverableManagedDatabases(), this);
+ }
+ return recoverableManagedDatabases;
+ }
+
+ /** @return Resource collection API of RestorePoints. */
+ public RestorePoints restorePoints() {
+ if (this.restorePoints == null) {
+ this.restorePoints = new RestorePointsImpl(clientObject.getRestorePoints(), this);
+ }
+ return restorePoints;
+ }
+
+ /** @return Resource collection API of SensitivityLabels. */
+ public SensitivityLabels sensitivityLabels() {
+ if (this.sensitivityLabels == null) {
+ this.sensitivityLabels = new SensitivityLabelsImpl(clientObject.getSensitivityLabels(), this);
+ }
+ return sensitivityLabels;
+ }
+
+ /** @return Resource collection API of RecommendedSensitivityLabels. */
+ public RecommendedSensitivityLabels recommendedSensitivityLabels() {
+ if (this.recommendedSensitivityLabels == null) {
+ this.recommendedSensitivityLabels =
+ new RecommendedSensitivityLabelsImpl(clientObject.getRecommendedSensitivityLabels(), this);
+ }
+ return recommendedSensitivityLabels;
+ }
+
+ /** @return Resource collection API of ServerAdvisors. */
+ public ServerAdvisors serverAdvisors() {
+ if (this.serverAdvisors == null) {
+ this.serverAdvisors = new ServerAdvisorsImpl(clientObject.getServerAdvisors(), this);
+ }
+ return serverAdvisors;
+ }
+
+ /** @return Resource collection API of ServerAutomaticTunings. */
+ public ServerAutomaticTunings serverAutomaticTunings() {
+ if (this.serverAutomaticTunings == null) {
+ this.serverAutomaticTunings =
+ new ServerAutomaticTuningsImpl(clientObject.getServerAutomaticTunings(), this);
+ }
+ return serverAutomaticTunings;
+ }
+
+ /** @return Resource collection API of ServerAzureADAdministrators. */
+ public ServerAzureADAdministrators serverAzureADAdministrators() {
+ if (this.serverAzureADAdministrators == null) {
+ this.serverAzureADAdministrators =
+ new ServerAzureADAdministratorsImpl(clientObject.getServerAzureADAdministrators(), this);
+ }
+ return serverAzureADAdministrators;
+ }
+
+ /** @return Resource collection API of ServerAzureADOnlyAuthentications. */
+ public ServerAzureADOnlyAuthentications serverAzureADOnlyAuthentications() {
+ if (this.serverAzureADOnlyAuthentications == null) {
+ this.serverAzureADOnlyAuthentications =
+ new ServerAzureADOnlyAuthenticationsImpl(clientObject.getServerAzureADOnlyAuthentications(), this);
+ }
+ return serverAzureADOnlyAuthentications;
+ }
+
+ /** @return Resource collection API of ServerDevOpsAuditSettings. */
+ public ServerDevOpsAuditSettings serverDevOpsAuditSettings() {
+ if (this.serverDevOpsAuditSettings == null) {
+ this.serverDevOpsAuditSettings =
+ new ServerDevOpsAuditSettingsImpl(clientObject.getServerDevOpsAuditSettings(), this);
+ }
+ return serverDevOpsAuditSettings;
+ }
+
+ /** @return Resource collection API of ServerDnsAliases. */
+ public ServerDnsAliases serverDnsAliases() {
+ if (this.serverDnsAliases == null) {
+ this.serverDnsAliases = new ServerDnsAliasesImpl(clientObject.getServerDnsAliases(), this);
+ }
+ return serverDnsAliases;
+ }
+
+ /** @return Resource collection API of ServerKeys. */
+ public ServerKeys serverKeys() {
+ if (this.serverKeys == null) {
+ this.serverKeys = new ServerKeysImpl(clientObject.getServerKeys(), this);
+ }
+ return serverKeys;
+ }
+
+ /** @return Resource collection API of ServerOperations. */
+ public ServerOperations serverOperations() {
+ if (this.serverOperations == null) {
+ this.serverOperations = new ServerOperationsImpl(clientObject.getServerOperations(), this);
+ }
+ return serverOperations;
+ }
+
+ /** @return Resource collection API of ServerSecurityAlertPolicies. */
+ public ServerSecurityAlertPolicies serverSecurityAlertPolicies() {
+ if (this.serverSecurityAlertPolicies == null) {
+ this.serverSecurityAlertPolicies =
+ new ServerSecurityAlertPoliciesImpl(clientObject.getServerSecurityAlertPolicies(), this);
+ }
+ return serverSecurityAlertPolicies;
+ }
+
+ /** @return Resource collection API of ServerTrustGroups. */
+ public ServerTrustGroups serverTrustGroups() {
+ if (this.serverTrustGroups == null) {
+ this.serverTrustGroups = new ServerTrustGroupsImpl(clientObject.getServerTrustGroups(), this);
+ }
+ return serverTrustGroups;
+ }
+
+ /** @return Resource collection API of ServerVulnerabilityAssessments. */
+ public ServerVulnerabilityAssessments serverVulnerabilityAssessments() {
+ if (this.serverVulnerabilityAssessments == null) {
+ this.serverVulnerabilityAssessments =
+ new ServerVulnerabilityAssessmentsImpl(clientObject.getServerVulnerabilityAssessments(), this);
+ }
+ return serverVulnerabilityAssessments;
+ }
+
+ /** @return Resource collection API of SqlAgents. */
+ public SqlAgents sqlAgents() {
+ if (this.sqlAgents == null) {
+ this.sqlAgents = new SqlAgentsImpl(clientObject.getSqlAgents(), this);
+ }
+ return sqlAgents;
+ }
+
+ /** @return Resource collection API of SubscriptionUsages. */
+ public SubscriptionUsages subscriptionUsages() {
+ if (this.subscriptionUsages == null) {
+ this.subscriptionUsages = new SubscriptionUsagesImpl(clientObject.getSubscriptionUsages(), this);
+ }
+ return subscriptionUsages;
+ }
+
+ /** @return Resource collection API of SyncAgents. */
+ public SyncAgents syncAgents() {
+ if (this.syncAgents == null) {
+ this.syncAgents = new SyncAgentsImpl(clientObject.getSyncAgents(), this);
+ }
+ return syncAgents;
+ }
+
+ /** @return Resource collection API of SyncGroups. */
+ public SyncGroups syncGroups() {
+ if (this.syncGroups == null) {
+ this.syncGroups = new SyncGroupsImpl(clientObject.getSyncGroups(), this);
+ }
+ return syncGroups;
+ }
+
+ /** @return Resource collection API of SyncMembers. */
+ public SyncMembers syncMembers() {
+ if (this.syncMembers == null) {
+ this.syncMembers = new SyncMembersImpl(clientObject.getSyncMembers(), this);
+ }
+ return syncMembers;
+ }
+
+ /** @return Resource collection API of TdeCertificates. */
+ public TdeCertificates tdeCertificates() {
+ if (this.tdeCertificates == null) {
+ this.tdeCertificates = new TdeCertificatesImpl(clientObject.getTdeCertificates(), this);
+ }
+ return tdeCertificates;
+ }
+
+ /** @return Resource collection API of TimeZones. */
+ public TimeZones timeZones() {
+ if (this.timeZones == null) {
+ this.timeZones = new TimeZonesImpl(clientObject.getTimeZones(), this);
+ }
+ return timeZones;
+ }
+
+ /** @return Resource collection API of VirtualClusters. */
+ public VirtualClusters virtualClusters() {
+ if (this.virtualClusters == null) {
+ this.virtualClusters = new VirtualClustersImpl(clientObject.getVirtualClusters(), this);
+ }
+ return virtualClusters;
+ }
+
+ /** @return Resource collection API of VirtualNetworkRules. */
+ public VirtualNetworkRules virtualNetworkRules() {
+ if (this.virtualNetworkRules == null) {
+ this.virtualNetworkRules = new VirtualNetworkRulesImpl(clientObject.getVirtualNetworkRules(), this);
+ }
+ return virtualNetworkRules;
+ }
+
+ /** @return Resource collection API of WorkloadClassifiers. */
+ public WorkloadClassifiers workloadClassifiers() {
+ if (this.workloadClassifiers == null) {
+ this.workloadClassifiers = new WorkloadClassifiersImpl(clientObject.getWorkloadClassifiers(), this);
+ }
+ return workloadClassifiers;
+ }
+
+ /** @return Resource collection API of WorkloadGroups. */
+ public WorkloadGroups workloadGroups() {
+ if (this.workloadGroups == null) {
+ this.workloadGroups = new WorkloadGroupsImpl(clientObject.getWorkloadGroups(), this);
+ }
+ return workloadGroups;
+ }
+
+ /** @return Resource collection API of TransparentDataEncryptions. */
+ public TransparentDataEncryptions transparentDataEncryptions() {
+ if (this.transparentDataEncryptions == null) {
+ this.transparentDataEncryptions =
+ new TransparentDataEncryptionsImpl(clientObject.getTransparentDataEncryptions(), this);
+ }
+ return transparentDataEncryptions;
+ }
+
+ /** @return Resource collection API of BackupShortTermRetentionPolicies. */
+ public BackupShortTermRetentionPolicies backupShortTermRetentionPolicies() {
+ if (this.backupShortTermRetentionPolicies == null) {
+ this.backupShortTermRetentionPolicies =
+ new BackupShortTermRetentionPoliciesImpl(clientObject.getBackupShortTermRetentionPolicies(), this);
+ }
+ return backupShortTermRetentionPolicies;
+ }
+
+ /** @return Resource collection API of DatabaseExtensionsOperations. */
+ public DatabaseExtensionsOperations databaseExtensionsOperations() {
+ if (this.databaseExtensionsOperations == null) {
+ this.databaseExtensionsOperations =
+ new DatabaseExtensionsOperationsImpl(clientObject.getDatabaseExtensionsOperations(), this);
+ }
+ return databaseExtensionsOperations;
+ }
+
+ /** @return Resource collection API of DatabaseOperations. */
+ public DatabaseOperations databaseOperations() {
+ if (this.databaseOperations == null) {
+ this.databaseOperations = new DatabaseOperationsImpl(clientObject.getDatabaseOperations(), this);
+ }
+ return databaseOperations;
+ }
+
+ /** @return Resource collection API of DatabaseUsages. */
+ public DatabaseUsages databaseUsages() {
+ if (this.databaseUsages == null) {
+ this.databaseUsages = new DatabaseUsagesImpl(clientObject.getDatabaseUsages(), this);
+ }
+ return databaseUsages;
+ }
+
+ /** @return Resource collection API of LedgerDigestUploadsOperations. */
+ public LedgerDigestUploadsOperations ledgerDigestUploadsOperations() {
+ if (this.ledgerDigestUploadsOperations == null) {
+ this.ledgerDigestUploadsOperations =
+ new LedgerDigestUploadsOperationsImpl(clientObject.getLedgerDigestUploadsOperations(), this);
+ }
+ return ledgerDigestUploadsOperations;
+ }
+
+ /** @return Resource collection API of OutboundFirewallRules. */
+ public OutboundFirewallRules outboundFirewallRules() {
+ if (this.outboundFirewallRules == null) {
+ this.outboundFirewallRules = new OutboundFirewallRulesImpl(clientObject.getOutboundFirewallRules(), this);
+ }
+ return outboundFirewallRules;
+ }
+
+ /** @return Resource collection API of Servers. */
+ public Servers servers() {
+ if (this.servers == null) {
+ this.servers = new ServersImpl(clientObject.getServers(), this);
+ }
+ return servers;
+ }
+
+ /** @return Resource collection API of Usages. */
+ public Usages usages() {
+ if (this.usages == null) {
+ this.usages = new UsagesImpl(clientObject.getUsages(), this);
+ }
+ return usages;
+ }
+
+ /** @return Resource collection API of LongTermRetentionBackups. */
+ public LongTermRetentionBackups longTermRetentionBackups() {
+ if (this.longTermRetentionBackups == null) {
+ this.longTermRetentionBackups =
+ new LongTermRetentionBackupsImpl(clientObject.getLongTermRetentionBackups(), this);
+ }
+ return longTermRetentionBackups;
+ }
+
+ /** @return Resource collection API of LongTermRetentionManagedInstanceBackups. */
+ public LongTermRetentionManagedInstanceBackups longTermRetentionManagedInstanceBackups() {
+ if (this.longTermRetentionManagedInstanceBackups == null) {
+ this.longTermRetentionManagedInstanceBackups =
+ new LongTermRetentionManagedInstanceBackupsImpl(
+ clientObject.getLongTermRetentionManagedInstanceBackups(), this);
+ }
+ return longTermRetentionManagedInstanceBackups;
+ }
+
+ /** @return Resource collection API of ManagedInstances. */
+ public ManagedInstances managedInstances() {
+ if (this.managedInstances == null) {
+ this.managedInstances = new ManagedInstancesImpl(clientObject.getManagedInstances(), this);
+ }
+ return managedInstances;
+ }
+
+ /** @return Resource collection API of RestorableDroppedDatabases. */
+ public RestorableDroppedDatabases restorableDroppedDatabases() {
+ if (this.restorableDroppedDatabases == null) {
+ this.restorableDroppedDatabases =
+ new RestorableDroppedDatabasesImpl(clientObject.getRestorableDroppedDatabases(), this);
+ }
+ return restorableDroppedDatabases;
+ }
+
+ /** @return Resource collection API of RestorableDroppedManagedDatabases. */
+ public RestorableDroppedManagedDatabases restorableDroppedManagedDatabases() {
+ if (this.restorableDroppedManagedDatabases == null) {
+ this.restorableDroppedManagedDatabases =
+ new RestorableDroppedManagedDatabasesImpl(clientObject.getRestorableDroppedManagedDatabases(), this);
+ }
+ return restorableDroppedManagedDatabases;
+ }
+
+ /** @return Resource collection API of ServerConnectionPolicies. */
+ public ServerConnectionPolicies serverConnectionPolicies() {
+ if (this.serverConnectionPolicies == null) {
+ this.serverConnectionPolicies =
+ new ServerConnectionPoliciesImpl(clientObject.getServerConnectionPolicies(), this);
+ }
+ return serverConnectionPolicies;
+ }
+
+ /**
+ * @return Wrapped service client SqlManagementClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public SqlManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/BackupShortTermRetentionPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/BackupShortTermRetentionPoliciesClient.java
new file mode 100644
index 0000000000000..7b0f43ec7d627
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/BackupShortTermRetentionPoliciesClient.java
@@ -0,0 +1,278 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.BackupShortTermRetentionPolicyInner;
+import com.azure.resourcemanager.sql.generated.models.ShortTermRetentionPolicyName;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupShortTermRetentionPoliciesClient.
+ */
+public interface BackupShortTermRetentionPoliciesClient {
+ /**
+ * Gets a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param policyName The policy name. Should always be "default".
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database's short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupShortTermRetentionPolicyInner get(
+ String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName);
+
+ /**
+ * Gets a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param policyName The policy name. Should always be "default".
+ * @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 database's short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ShortTermRetentionPolicyName policyName,
+ Context context);
+
+ /**
+ * Updates a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param policyName The policy name. Should always be "default".
+ * @param parameters The short term retention policy info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BackupShortTermRetentionPolicyInner>
+ beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ShortTermRetentionPolicyName policyName,
+ BackupShortTermRetentionPolicyInner parameters);
+
+ /**
+ * Updates a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param policyName The policy name. Should always be "default".
+ * @param parameters The short term retention policy info.
+ * @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 short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BackupShortTermRetentionPolicyInner>
+ beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ShortTermRetentionPolicyName policyName,
+ BackupShortTermRetentionPolicyInner parameters,
+ Context context);
+
+ /**
+ * Updates a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param policyName The policy name. Should always be "default".
+ * @param parameters The short term retention policy info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupShortTermRetentionPolicyInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ShortTermRetentionPolicyName policyName,
+ BackupShortTermRetentionPolicyInner parameters);
+
+ /**
+ * Updates a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param policyName The policy name. Should always be "default".
+ * @param parameters The short term retention policy info.
+ * @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 short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupShortTermRetentionPolicyInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ShortTermRetentionPolicyName policyName,
+ BackupShortTermRetentionPolicyInner parameters,
+ Context context);
+
+ /**
+ * Updates a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param policyName The policy name. Should always be "default".
+ * @param parameters The short term retention policy info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BackupShortTermRetentionPolicyInner> beginUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ShortTermRetentionPolicyName policyName,
+ BackupShortTermRetentionPolicyInner parameters);
+
+ /**
+ * Updates a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param policyName The policy name. Should always be "default".
+ * @param parameters The short term retention policy info.
+ * @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 short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BackupShortTermRetentionPolicyInner> beginUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ShortTermRetentionPolicyName policyName,
+ BackupShortTermRetentionPolicyInner parameters,
+ Context context);
+
+ /**
+ * Updates a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param policyName The policy name. Should always be "default".
+ * @param parameters The short term retention policy info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupShortTermRetentionPolicyInner update(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ShortTermRetentionPolicyName policyName,
+ BackupShortTermRetentionPolicyInner parameters);
+
+ /**
+ * Updates a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param policyName The policy name. Should always be "default".
+ * @param parameters The short term retention policy info.
+ * @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 short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupShortTermRetentionPolicyInner update(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ShortTermRetentionPolicyName policyName,
+ BackupShortTermRetentionPolicyInner parameters,
+ Context context);
+
+ /**
+ * Gets a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database's short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets a database's short term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database's short term retention policy.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/CapabilitiesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/CapabilitiesClient.java
new file mode 100644
index 0000000000000..6bf4b18d0a3d5
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/CapabilitiesClient.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.LocationCapabilitiesInner;
+import com.azure.resourcemanager.sql.generated.models.CapabilityGroup;
+
+/** An instance of this class provides access to all the operations defined in CapabilitiesClient. */
+public interface CapabilitiesClient {
+ /**
+ * Gets the subscription capabilities available for the specified location.
+ *
+ * @param locationName The location name whose capabilities are retrieved.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 subscription capabilities available for the specified location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LocationCapabilitiesInner listByLocation(String locationName);
+
+ /**
+ * Gets the subscription capabilities available for the specified location.
+ *
+ * @param locationName The location name whose capabilities are retrieved.
+ * @param include If specified, restricts the response to only include the selected item.
+ * @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 subscription capabilities available for the specified location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listByLocationWithResponse(
+ String locationName, CapabilityGroup include, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DataMaskingPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DataMaskingPoliciesClient.java
new file mode 100644
index 0000000000000..92445c9500760
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DataMaskingPoliciesClient.java
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DataMaskingPolicyInner;
+
+/** An instance of this class provides access to all the operations defined in DataMaskingPoliciesClient. */
+public interface DataMaskingPoliciesClient {
+ /**
+ * Creates or updates a database data masking policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters for creating or updating a data masking policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a database data masking policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataMaskingPolicyInner createOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyInner parameters);
+
+ /**
+ * Creates or updates a database data masking policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters for creating or updating a data masking policy.
+ * @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 represents a database data masking policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ DataMaskingPolicyInner parameters,
+ Context context);
+
+ /**
+ * Gets a database data masking policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database data masking policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataMaskingPolicyInner get(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets a database data masking policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database data masking policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DataMaskingRulesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DataMaskingRulesClient.java
new file mode 100644
index 0000000000000..bcb930f2c7316
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DataMaskingRulesClient.java
@@ -0,0 +1,94 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DataMaskingRuleInner;
+
+/** An instance of this class provides access to all the operations defined in DataMaskingRulesClient. */
+public interface DataMaskingRulesClient {
+ /**
+ * Creates or updates a database data masking rule.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param dataMaskingRuleName The name of the data masking rule.
+ * @param parameters The required parameters for creating or updating a data masking rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a database data masking rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataMaskingRuleInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String dataMaskingRuleName,
+ DataMaskingRuleInner parameters);
+
+ /**
+ * Creates or updates a database data masking rule.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param dataMaskingRuleName The name of the data masking rule.
+ * @param parameters The required parameters for creating or updating a data masking rule.
+ * @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 represents a database data masking rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String dataMaskingRuleName,
+ DataMaskingRuleInner parameters,
+ Context context);
+
+ /**
+ * Gets a list of database data masking rules.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database data masking rules.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets a list of database data masking rules.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database data masking rules.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DataWarehouseUserActivitiesOperationsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DataWarehouseUserActivitiesOperationsClient.java
new file mode 100644
index 0000000000000..5dd473aac3763
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DataWarehouseUserActivitiesOperationsClient.java
@@ -0,0 +1,94 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DataWarehouseUserActivitiesInner;
+import com.azure.resourcemanager.sql.generated.models.DataWarehouseUserActivityName;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * DataWarehouseUserActivitiesOperationsClient.
+ */
+public interface DataWarehouseUserActivitiesOperationsClient {
+ /**
+ * Gets the user activities of a data warehouse which includes running and suspended queries.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param dataWarehouseUserActivityName The activity name of the data warehouse.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 user activities of a data warehouse which includes running and suspended queries.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DataWarehouseUserActivitiesInner get(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ DataWarehouseUserActivityName dataWarehouseUserActivityName);
+
+ /**
+ * Gets the user activities of a data warehouse which includes running and suspended queries.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param dataWarehouseUserActivityName The activity name of the data warehouse.
+ * @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 user activities of a data warehouse which includes running and suspended queries.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ DataWarehouseUserActivityName dataWarehouseUserActivityName,
+ Context context);
+
+ /**
+ * List the user activities of a data warehouse which includes running and suspended queries.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return user activities of a data warehouse.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * List the user activities of a data warehouse which includes running and suspended queries.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return user activities of a data warehouse.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseAdvisorsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseAdvisorsClient.java
new file mode 100644
index 0000000000000..da1246ed282d7
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseAdvisorsClient.java
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.AdvisorInner;
+import java.util.List;
+
+/** An instance of this class provides access to all the operations defined in DatabaseAdvisorsClient. */
+public interface DatabaseAdvisorsClient {
+ /**
+ * Gets a list of database advisors.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database advisors.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ List listByDatabase(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets a list of database advisors.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param expand The child resources to include in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database advisors.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response> listByDatabaseWithResponse(
+ String resourceGroupName, String serverName, String databaseName, String expand, Context context);
+
+ /**
+ * Gets a database advisor.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param advisorName The name of the Database Advisor.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AdvisorInner get(String resourceGroupName, String serverName, String databaseName, String advisorName);
+
+ /**
+ * Gets a database advisor.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param advisorName The name of the Database Advisor.
+ * @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 database advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, String advisorName, Context context);
+
+ /**
+ * Updates a database advisor.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param advisorName The name of the Database Advisor.
+ * @param parameters The requested advisor resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return database, Server or Elastic Pool Advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AdvisorInner update(
+ String resourceGroupName, String serverName, String databaseName, String advisorName, AdvisorInner parameters);
+
+ /**
+ * Updates a database advisor.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param advisorName The name of the Database Advisor.
+ * @param parameters The requested advisor resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return database, Server or Elastic Pool Advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String advisorName,
+ AdvisorInner parameters,
+ Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseAutomaticTuningsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseAutomaticTuningsClient.java
new file mode 100644
index 0000000000000..f5a7bedd72e30
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseAutomaticTuningsClient.java
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseAutomaticTuningInner;
+
+/** An instance of this class provides access to all the operations defined in DatabaseAutomaticTuningsClient. */
+public interface DatabaseAutomaticTuningsClient {
+ /**
+ * Gets a database's automatic tuning.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database's automatic tuning.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAutomaticTuningInner get(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets a database's automatic tuning.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database's automatic tuning.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Update automatic tuning properties for target database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The requested automatic tuning resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return database-level Automatic Tuning.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseAutomaticTuningInner update(
+ String resourceGroupName, String serverName, String databaseName, DatabaseAutomaticTuningInner parameters);
+
+ /**
+ * Update automatic tuning properties for target database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The requested automatic tuning resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return database-level Automatic Tuning.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ DatabaseAutomaticTuningInner parameters,
+ Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseBlobAuditingPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseBlobAuditingPoliciesClient.java
new file mode 100644
index 0000000000000..2e963196db63d
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseBlobAuditingPoliciesClient.java
@@ -0,0 +1,119 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseBlobAuditingPolicyInner;
+
+/** An instance of this class provides access to all the operations defined in DatabaseBlobAuditingPoliciesClient. */
+public interface DatabaseBlobAuditingPoliciesClient {
+ /**
+ * Gets a database's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database's blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets a database's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database's blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Creates or updates a database's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The database blob auditing policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseBlobAuditingPolicyInner createOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters);
+
+ /**
+ * Creates or updates a database's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The database blob auditing policy.
+ * @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 database blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ DatabaseBlobAuditingPolicyInner parameters,
+ Context context);
+
+ /**
+ * Lists auditing settings of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database auditing settings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Lists auditing settings of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database auditing settings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseColumnsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseColumnsClient.java
new file mode 100644
index 0000000000000..01feaf55db561
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseColumnsClient.java
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseColumnInner;
+import java.util.List;
+
+/** An instance of this class provides access to all the operations defined in DatabaseColumnsClient. */
+public interface DatabaseColumnsClient {
+ /**
+ * List database columns.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database columns.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * List database columns.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schema Array of Get3ItemsItem.
+ * @param table Array of Get4ItemsItem.
+ * @param column Array of Get5ItemsItem.
+ * @param orderBy Array of Get6ItemsItem.
+ * @param skiptoken An opaque token that identifies a starting point in the 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 a list of database columns.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ List schema,
+ List table,
+ List column,
+ List orderBy,
+ String skiptoken,
+ Context context);
+
+ /**
+ * List database columns.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param tableName The name of the 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 a list of database columns.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByTable(
+ String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName);
+
+ /**
+ * List database columns.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param tableName The name of the table.
+ * @param filter An OData filter expression that filters elements in the 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 a list of database columns.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByTable(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String schemaName,
+ String tableName,
+ String filter,
+ Context context);
+
+ /**
+ * Get database column.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param tableName The name of the table.
+ * @param columnName The name of the column.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return database column.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseColumnInner get(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String schemaName,
+ String tableName,
+ String columnName);
+
+ /**
+ * Get database column.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param tableName The name of the table.
+ * @param columnName The name of the column.
+ * @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 database column.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String schemaName,
+ String tableName,
+ String columnName,
+ Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseExtensionsOperationsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseExtensionsOperationsClient.java
new file mode 100644
index 0000000000000..fc79657cbd88e
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseExtensionsOperationsClient.java
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.ImportExportExtensionsOperationResultInner;
+import com.azure.resourcemanager.sql.generated.models.DatabaseExtensions;
+
+/** An instance of this class provides access to all the operations defined in DatabaseExtensionsOperationsClient. */
+public interface DatabaseExtensionsOperationsClient {
+ /**
+ * Gets a database extension. This will return resource not found as it is not supported.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param extensionName The extensionName parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void get(String resourceGroupName, String serverName, String databaseName, String extensionName);
+
+ /**
+ * Gets a database extension. This will return resource not found as it is not supported.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param extensionName The extensionName parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database extension.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, String extensionName, Context context);
+
+ /**
+ * Perform a database extension operation, like polybase import.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param extensionName The extensionName parameter.
+ * @param parameters The database import request parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 Extension operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ImportExportExtensionsOperationResultInner>
+ beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String extensionName,
+ DatabaseExtensions parameters);
+
+ /**
+ * Perform a database extension operation, like polybase import.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param extensionName The extensionName parameter.
+ * @param parameters The database import request parameters.
+ * @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 Extension operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ImportExportExtensionsOperationResultInner>
+ beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String extensionName,
+ DatabaseExtensions parameters,
+ Context context);
+
+ /**
+ * Perform a database extension operation, like polybase import.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param extensionName The extensionName parameter.
+ * @param parameters The database import request parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 Extension operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ImportExportExtensionsOperationResultInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String extensionName,
+ DatabaseExtensions parameters);
+
+ /**
+ * Perform a database extension operation, like polybase import.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param extensionName The extensionName parameter.
+ * @param parameters The database import request parameters.
+ * @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 Extension operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ImportExportExtensionsOperationResultInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String extensionName,
+ DatabaseExtensions parameters,
+ Context context);
+
+ /**
+ * List database extension. This will return an empty list as it is not supported.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return import export operation extensions list.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * List database extension. This will return an empty list as it is not supported.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return import export operation extensions list.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseOperationsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseOperationsClient.java
new file mode 100644
index 0000000000000..395ffaed5a486
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseOperationsClient.java
@@ -0,0 +1,82 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseOperationInner;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in DatabaseOperationsClient. */
+public interface DatabaseOperationsClient {
+ /**
+ * Cancels the asynchronous operation on the database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param operationId The operation identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 cancel(String resourceGroupName, String serverName, String databaseName, UUID operationId);
+
+ /**
+ * Cancels the asynchronous operation on the database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param operationId The operation identifier.
+ * @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 cancelWithResponse(
+ String resourceGroupName, String serverName, String databaseName, UUID operationId, Context context);
+
+ /**
+ * Gets a list of operations performed on the database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of operations performed on the database.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets a list of operations performed on the database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of operations performed on the database.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseRecommendedActionsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseRecommendedActionsClient.java
new file mode 100644
index 0000000000000..a5697c3876531
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseRecommendedActionsClient.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.RecommendedActionInner;
+import java.util.List;
+
+/** An instance of this class provides access to all the operations defined in DatabaseRecommendedActionsClient. */
+public interface DatabaseRecommendedActionsClient {
+ /**
+ * Gets list of Database Recommended Actions.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param advisorName The name of the Database Advisor.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 Database Recommended Actions.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ List listByDatabaseAdvisor(
+ String resourceGroupName, String serverName, String databaseName, String advisorName);
+
+ /**
+ * Gets list of Database Recommended Actions.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param advisorName The name of the Database Advisor.
+ * @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 Database Recommended Actions.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response> listByDatabaseAdvisorWithResponse(
+ String resourceGroupName, String serverName, String databaseName, String advisorName, Context context);
+
+ /**
+ * Gets a database recommended action.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param advisorName The name of the Database Advisor.
+ * @param recommendedActionName The name of Database Recommended Action.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database recommended action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RecommendedActionInner get(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String advisorName,
+ String recommendedActionName);
+
+ /**
+ * Gets a database recommended action.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param advisorName The name of the Database Advisor.
+ * @param recommendedActionName The name of Database Recommended Action.
+ * @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 database recommended action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String advisorName,
+ String recommendedActionName,
+ Context context);
+
+ /**
+ * Updates a database recommended action.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param advisorName The name of the Database Advisor.
+ * @param recommendedActionName The name of Database Recommended Action.
+ * @param parameters The requested recommended action resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return database, Server or Elastic Pool Recommended Action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RecommendedActionInner update(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String advisorName,
+ String recommendedActionName,
+ RecommendedActionInner parameters);
+
+ /**
+ * Updates a database recommended action.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param advisorName The name of the Database Advisor.
+ * @param recommendedActionName The name of Database Recommended Action.
+ * @param parameters The requested recommended action resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return database, Server or Elastic Pool Recommended Action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String advisorName,
+ String recommendedActionName,
+ RecommendedActionInner parameters,
+ Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseSchemasClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseSchemasClient.java
new file mode 100644
index 0000000000000..81e18e71ed3ba
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseSchemasClient.java
@@ -0,0 +1,82 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseSchemaInner;
+
+/** An instance of this class provides access to all the operations defined in DatabaseSchemasClient. */
+public interface DatabaseSchemasClient {
+ /**
+ * List database schemas.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database schemas.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * List database schemas.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param filter An OData filter expression that filters elements in the 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 a list of database schemas.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, String filter, Context context);
+
+ /**
+ * Get database schema.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return database schema.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseSchemaInner get(String resourceGroupName, String serverName, String databaseName, String schemaName);
+
+ /**
+ * Get database schema.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @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 database schema.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, String schemaName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseSecurityAlertPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseSecurityAlertPoliciesClient.java
new file mode 100644
index 0000000000000..cbc38f22b883a
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseSecurityAlertPoliciesClient.java
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseSecurityAlertPolicyInner;
+import com.azure.resourcemanager.sql.generated.models.SecurityAlertPolicyName;
+
+/** An instance of this class provides access to all the operations defined in DatabaseSecurityAlertPoliciesClient. */
+public interface DatabaseSecurityAlertPoliciesClient {
+ /**
+ * Gets a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param securityAlertPolicyName The name of the security alert policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database's security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseSecurityAlertPolicyInner get(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ SecurityAlertPolicyName securityAlertPolicyName);
+
+ /**
+ * Gets a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param securityAlertPolicyName The name of the security alert policy.
+ * @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 database's security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ Context context);
+
+ /**
+ * Creates or updates a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param securityAlertPolicyName The name of the security alert policy.
+ * @param parameters The database security alert policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseSecurityAlertPolicyInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ DatabaseSecurityAlertPolicyInner parameters);
+
+ /**
+ * Creates or updates a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param securityAlertPolicyName The name of the security alert policy.
+ * @param parameters The database security alert policy.
+ * @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 database security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ DatabaseSecurityAlertPolicyInner parameters,
+ Context context);
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database's security alert policies.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database's security alert policies.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseTablesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseTablesClient.java
new file mode 100644
index 0000000000000..e248493d5055c
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseTablesClient.java
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseTableInner;
+
+/** An instance of this class provides access to all the operations defined in DatabaseTablesClient. */
+public interface DatabaseTablesClient {
+ /**
+ * List database tables.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database tables.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySchema(
+ String resourceGroupName, String serverName, String databaseName, String schemaName);
+
+ /**
+ * List database tables.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param filter An OData filter expression that filters elements in the 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 a list of database tables.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySchema(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String schemaName,
+ String filter,
+ Context context);
+
+ /**
+ * Get database table.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param tableName The name of the 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 database table.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseTableInner get(
+ String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName);
+
+ /**
+ * Get database table.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param tableName The name of the 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 database table.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ String schemaName,
+ String tableName,
+ Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseUsagesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseUsagesClient.java
new file mode 100644
index 0000000000000..3a31d64a2bf8e
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseUsagesClient.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.DatabaseUsageInner;
+
+/** An instance of this class provides access to all the operations defined in DatabaseUsagesClient. */
+public interface DatabaseUsagesClient {
+ /**
+ * Gets database usages.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return database usages.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets database usages.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return database usages.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java
new file mode 100644
index 0000000000000..1c6776cbc9743
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.generated.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseVulnerabilityAssessmentRuleBaselineInner;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentPolicyBaselineName;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * DatabaseVulnerabilityAssessmentRuleBaselinesClient.
+ */
+public interface DatabaseVulnerabilityAssessmentRuleBaselinesClient {
+ /**
+ * Gets a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a
+ * database level rule and master for server level rule).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database's vulnerability assessment rule baseline.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseVulnerabilityAssessmentRuleBaselineInner get(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String ruleId,
+ VulnerabilityAssessmentPolicyBaselineName baselineName);
+
+ /**
+ * Gets a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a
+ * database level rule and master for server level rule).
+ * @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 database's vulnerability assessment rule baseline.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String ruleId,
+ VulnerabilityAssessmentPolicyBaselineName baselineName,
+ Context context);
+
+ /**
+ * Creates or updates a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a
+ * database level rule and master for server level rule).
+ * @param parameters The requested rule baseline resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database vulnerability assessment rule baseline.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String ruleId,
+ VulnerabilityAssessmentPolicyBaselineName baselineName,
+ DatabaseVulnerabilityAssessmentRuleBaselineInner parameters);
+
+ /**
+ * Creates or updates a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a
+ * database level rule and master for server level rule).
+ * @param parameters The requested rule baseline resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database vulnerability assessment rule baseline.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String ruleId,
+ VulnerabilityAssessmentPolicyBaselineName baselineName,
+ DatabaseVulnerabilityAssessmentRuleBaselineInner parameters,
+ Context context);
+
+ /**
+ * Removes the database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a
+ * database level rule and master for server level rule).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String ruleId,
+ VulnerabilityAssessmentPolicyBaselineName baselineName);
+
+ /**
+ * Removes the database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a
+ * database level rule and master for server level rule).
+ * @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 deleteWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String ruleId,
+ VulnerabilityAssessmentPolicyBaselineName baselineName,
+ Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseVulnerabilityAssessmentScansClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseVulnerabilityAssessmentScansClient.java
new file mode 100644
index 0000000000000..d33fa438c9da8
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseVulnerabilityAssessmentScansClient.java
@@ -0,0 +1,246 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.DatabaseVulnerabilityAssessmentScansExportInner;
+import com.azure.resourcemanager.sql.generated.fluent.models.VulnerabilityAssessmentScanRecordInner;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * DatabaseVulnerabilityAssessmentScansClient.
+ */
+public interface DatabaseVulnerabilityAssessmentScansClient {
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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> beginInitiateScan(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String scanId);
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @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> beginInitiateScan(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String scanId,
+ Context context);
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 initiateScan(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String scanId);
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @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 initiateScan(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String scanId,
+ Context context);
+
+ /**
+ * Lists the vulnerability assessment scans of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of vulnerability assessment scan records.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName);
+
+ /**
+ * Lists the vulnerability assessment scans of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of vulnerability assessment scan records.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ Context context);
+
+ /**
+ * Gets a vulnerability assessment scan record of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 vulnerability assessment scan record of a database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VulnerabilityAssessmentScanRecordInner get(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String scanId);
+
+ /**
+ * Gets a vulnerability assessment scan record of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @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 vulnerability assessment scan record of a database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String scanId,
+ Context context);
+
+ /**
+ * Convert an existing scan result to a human readable format. If already exists nothing happens.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the scanned database.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param scanId The vulnerability assessment scan Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database Vulnerability Assessment scan export resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseVulnerabilityAssessmentScansExportInner export(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String scanId);
+
+ /**
+ * Convert an existing scan result to a human readable format. If already exists nothing happens.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the scanned database.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param scanId The vulnerability assessment scan Id.
+ * @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 database Vulnerability Assessment scan export resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response exportWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ String scanId,
+ Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseVulnerabilityAssessmentsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseVulnerabilityAssessmentsClient.java
new file mode 100644
index 0000000000000..5a3265d701691
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabaseVulnerabilityAssessmentsClient.java
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.DatabaseVulnerabilityAssessmentInner;
+import com.azure.resourcemanager.sql.generated.models.VulnerabilityAssessmentName;
+
+/**
+ * An instance of this class provides access to all the operations defined in DatabaseVulnerabilityAssessmentsClient.
+ */
+public interface DatabaseVulnerabilityAssessmentsClient {
+ /**
+ * Gets the database's vulnerability assessment.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database's vulnerability assessment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseVulnerabilityAssessmentInner get(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName);
+
+ /**
+ * Gets the database's vulnerability assessment.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @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 database's vulnerability assessment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ Context context);
+
+ /**
+ * Creates or updates the database's vulnerability assessment.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param parameters The requested resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database vulnerability assessment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseVulnerabilityAssessmentInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ DatabaseVulnerabilityAssessmentInner parameters);
+
+ /**
+ * Creates or updates the database's vulnerability assessment.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @param parameters The requested resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database vulnerability assessment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ DatabaseVulnerabilityAssessmentInner parameters,
+ Context context);
+
+ /**
+ * Removes the database's vulnerability assessment.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName);
+
+ /**
+ * Removes the database's vulnerability assessment.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment is defined.
+ * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
+ * @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 deleteWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ VulnerabilityAssessmentName vulnerabilityAssessmentName,
+ Context context);
+
+ /**
+ * Lists the vulnerability assessment policies associated with a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment policies are defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of the database's vulnerability assessments.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Lists the vulnerability assessment policies associated with a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the vulnerability assessment policies are defined.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of the database's vulnerability assessments.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabasesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabasesClient.java
new file mode 100644
index 0000000000000..158647ced0d21
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DatabasesClient.java
@@ -0,0 +1,881 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.DatabaseInner;
+import com.azure.resourcemanager.sql.generated.fluent.models.ImportExportOperationResultInner;
+import com.azure.resourcemanager.sql.generated.fluent.models.MetricDefinitionInner;
+import com.azure.resourcemanager.sql.generated.fluent.models.MetricInner;
+import com.azure.resourcemanager.sql.generated.models.DatabaseUpdate;
+import com.azure.resourcemanager.sql.generated.models.ExportDatabaseDefinition;
+import com.azure.resourcemanager.sql.generated.models.ImportExistingDatabaseDefinition;
+import com.azure.resourcemanager.sql.generated.models.ReplicaType;
+import com.azure.resourcemanager.sql.generated.models.ResourceMoveDefinition;
+
+/** An instance of this class provides access to all the operations defined in DatabasesClient. */
+public interface DatabasesClient {
+ /**
+ * Returns database metrics.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param filter An OData filter expression that describes a subset of metrics to return.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName, String serverName, String databaseName, String filter);
+
+ /**
+ * Returns database metrics.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param filter An OData filter expression that describes a subset of metrics to return.
+ * @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 database metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName, String serverName, String databaseName, String filter, Context context);
+
+ /**
+ * Returns database metric definitions.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a list database metric definitions request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetricDefinitions(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Returns database metric definitions.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a list database metric definitions request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetricDefinitions(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Gets a list of databases.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of databases.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of databases.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param skipToken The skipToken parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of databases.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, String skipToken, Context context);
+
+ /**
+ * Gets a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner get(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The requested database resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The requested database resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context);
+
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The requested database resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner createOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The requested database resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner createOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context);
+
+ /**
+ * Deletes the database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Deletes the database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Deletes the database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Deletes the database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The requested database resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseInner> beginUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters);
+
+ /**
+ * Updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The requested database resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseInner> beginUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, Context context);
+
+ /**
+ * Updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The requested database resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner update(String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters);
+
+ /**
+ * Updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The requested database resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a database resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner update(
+ String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, Context context);
+
+ /**
+ * Gets a list of databases in an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of databases in an elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByElasticPool(String resourceGroupName, String serverName, String elasticPoolName);
+
+ /**
+ * Gets a list of databases in an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of databases in an elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByElasticPool(
+ String resourceGroupName, String serverName, String elasticPoolName, Context context);
+
+ /**
+ * Failovers a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to failover.
+ * @param replicaType The type of replica to be failed over.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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> beginFailover(
+ String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType);
+
+ /**
+ * Failovers a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to failover.
+ * @param replicaType The type of replica to be failed over.
+ * @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> beginFailover(
+ String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, Context context);
+
+ /**
+ * Failovers a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to failover.
+ * @param replicaType The type of replica to be failed over.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 failover(String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType);
+
+ /**
+ * Failovers a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to failover.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 failover(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Failovers a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to failover.
+ * @param replicaType The type of replica to be failed over.
+ * @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 failover(
+ String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, Context context);
+
+ /**
+ * Gets a list of inaccessible databases in a logical server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of inaccessible databases in a logical server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of inaccessible databases in a logical server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of inaccessible databases in a logical server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Pauses a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be paused.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseInner> beginPause(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Pauses a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be paused.
+ * @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 database resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseInner> beginPause(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Pauses a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be paused.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner pause(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Pauses a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be paused.
+ * @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 database resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner pause(String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Resumes a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be resumed.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseInner> beginResume(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Resumes a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be resumed.
+ * @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 database resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseInner> beginResume(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Resumes a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be resumed.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner resume(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Resumes a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be resumed.
+ * @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 database resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner resume(String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Upgrades a data warehouse.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be upgraded.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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> beginUpgradeDataWarehouse(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Upgrades a data warehouse.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be upgraded.
+ * @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> beginUpgradeDataWarehouse(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Upgrades a data warehouse.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be upgraded.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 upgradeDataWarehouse(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Upgrades a data warehouse.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to be upgraded.
+ * @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 upgradeDataWarehouse(String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to rename.
+ * @param parameters The resource move definition for renaming this database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void rename(String resourceGroupName, String serverName, String databaseName, ResourceMoveDefinition parameters);
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to rename.
+ * @param parameters The resource move definition for renaming this database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response renameWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ResourceMoveDefinition parameters,
+ Context context);
+
+ /**
+ * Imports a bacpac into a new database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The database import request parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 ImportExport operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ImportExportOperationResultInner> beginImportMethod(
+ String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters);
+
+ /**
+ * Imports a bacpac into a new database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The database import request parameters.
+ * @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 ImportExport operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ImportExportOperationResultInner> beginImportMethod(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ImportExistingDatabaseDefinition parameters,
+ Context context);
+
+ /**
+ * Imports a bacpac into a new database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The database import request parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 ImportExport operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ImportExportOperationResultInner importMethod(
+ String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters);
+
+ /**
+ * Imports a bacpac into a new database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The database import request parameters.
+ * @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 ImportExport operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ImportExportOperationResultInner importMethod(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ImportExistingDatabaseDefinition parameters,
+ Context context);
+
+ /**
+ * Exports a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The database export request parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 ImportExport operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ImportExportOperationResultInner> beginExport(
+ String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters);
+
+ /**
+ * Exports a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The database export request parameters.
+ * @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 ImportExport operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ImportExportOperationResultInner> beginExport(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ExportDatabaseDefinition parameters,
+ Context context);
+
+ /**
+ * Exports a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The database export request parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 ImportExport operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ImportExportOperationResultInner export(
+ String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters);
+
+ /**
+ * Exports a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The database export request parameters.
+ * @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 ImportExport operation result resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ImportExportOperationResultInner export(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ExportDatabaseDefinition parameters,
+ Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DeletedServersClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DeletedServersClient.java
new file mode 100644
index 0000000000000..cf1f801a920d8
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/DeletedServersClient.java
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.DeletedServerInner;
+
+/** An instance of this class provides access to all the operations defined in DeletedServersClient. */
+public interface DeletedServersClient {
+ /**
+ * Gets a list of all deleted servers in a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all deleted servers in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets a list of all deleted servers in a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all deleted servers in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Gets a deleted server.
+ *
+ * @param locationName The name of the region where the resource is located.
+ * @param deletedServerName The name of the deleted server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 deleted server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeletedServerInner get(String locationName, String deletedServerName);
+
+ /**
+ * Gets a deleted server.
+ *
+ * @param locationName The name of the region where the resource is located.
+ * @param deletedServerName The name of the deleted server.
+ * @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 deleted server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String locationName, String deletedServerName, Context context);
+
+ /**
+ * Gets a list of deleted servers for a location.
+ *
+ * @param locationName The name of the region where the resource is located.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of deleted servers for a location.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByLocation(String locationName);
+
+ /**
+ * Gets a list of deleted servers for a location.
+ *
+ * @param locationName The name of the region where the resource is located.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of deleted servers for a location.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByLocation(String locationName, Context context);
+
+ /**
+ * Recovers a deleted server.
+ *
+ * @param locationName The name of the region where the resource is located.
+ * @param deletedServerName The name of the deleted server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 deleted server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeletedServerInner> beginRecover(
+ String locationName, String deletedServerName);
+
+ /**
+ * Recovers a deleted server.
+ *
+ * @param locationName The name of the region where the resource is located.
+ * @param deletedServerName The name of the deleted server.
+ * @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 deleted server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeletedServerInner> beginRecover(
+ String locationName, String deletedServerName, Context context);
+
+ /**
+ * Recovers a deleted server.
+ *
+ * @param locationName The name of the region where the resource is located.
+ * @param deletedServerName The name of the deleted server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 deleted server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeletedServerInner recover(String locationName, String deletedServerName);
+
+ /**
+ * Recovers a deleted server.
+ *
+ * @param locationName The name of the region where the resource is located.
+ * @param deletedServerName The name of the deleted server.
+ * @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 deleted server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeletedServerInner recover(String locationName, String deletedServerName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolActivitiesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolActivitiesClient.java
new file mode 100644
index 0000000000000..acee0633e1e37
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolActivitiesClient.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.ElasticPoolActivityInner;
+
+/** An instance of this class provides access to all the operations defined in ElasticPoolActivitiesClient. */
+public interface ElasticPoolActivitiesClient {
+ /**
+ * Returns elastic pool activities.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool for which to get the current activity.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the response to a list elastic pool activity request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByElasticPool(
+ String resourceGroupName, String serverName, String elasticPoolName);
+
+ /**
+ * Returns elastic pool activities.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool for which to get the current activity.
+ * @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 represents the response to a list elastic pool activity request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByElasticPool(
+ String resourceGroupName, String serverName, String elasticPoolName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolDatabaseActivitiesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolDatabaseActivitiesClient.java
new file mode 100644
index 0000000000000..9c7d33d6e77b7
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolDatabaseActivitiesClient.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.ElasticPoolDatabaseActivityInner;
+
+/** An instance of this class provides access to all the operations defined in ElasticPoolDatabaseActivitiesClient. */
+public interface ElasticPoolDatabaseActivitiesClient {
+ /**
+ * Returns activity on databases inside of an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the response to a list elastic pool database activity request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByElasticPool(
+ String resourceGroupName, String serverName, String elasticPoolName);
+
+ /**
+ * Returns activity on databases inside of an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @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 represents the response to a list elastic pool database activity request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByElasticPool(
+ String resourceGroupName, String serverName, String elasticPoolName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolOperationsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolOperationsClient.java
new file mode 100644
index 0000000000000..e6bc24f2a58d7
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolOperationsClient.java
@@ -0,0 +1,82 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.ElasticPoolOperationInner;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in ElasticPoolOperationsClient. */
+public interface ElasticPoolOperationsClient {
+ /**
+ * Cancels the asynchronous operation on the elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The elasticPoolName parameter.
+ * @param operationId The operation identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 cancel(String resourceGroupName, String serverName, String elasticPoolName, UUID operationId);
+
+ /**
+ * Cancels the asynchronous operation on the elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The elasticPoolName parameter.
+ * @param operationId The operation identifier.
+ * @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 cancelWithResponse(
+ String resourceGroupName, String serverName, String elasticPoolName, UUID operationId, Context context);
+
+ /**
+ * Gets a list of operations performed on the elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The elasticPoolName parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of operations performed on the elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByElasticPool(
+ String resourceGroupName, String serverName, String elasticPoolName);
+
+ /**
+ * Gets a list of operations performed on the elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The elasticPoolName parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of operations performed on the elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByElasticPool(
+ String resourceGroupName, String serverName, String elasticPoolName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolsClient.java
new file mode 100644
index 0000000000000..273412acb7a09
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ElasticPoolsClient.java
@@ -0,0 +1,430 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.ElasticPoolInner;
+import com.azure.resourcemanager.sql.generated.fluent.models.MetricDefinitionInner;
+import com.azure.resourcemanager.sql.generated.fluent.models.MetricInner;
+import com.azure.resourcemanager.sql.generated.models.ElasticPoolUpdate;
+
+/** An instance of this class provides access to all the operations defined in ElasticPoolsClient. */
+public interface ElasticPoolsClient {
+ /**
+ * Returns elastic pool metrics.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param filter An OData filter expression that describes a subset of metrics to return.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName, String serverName, String elasticPoolName, String filter);
+
+ /**
+ * Returns elastic pool metrics.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param filter An OData filter expression that describes a subset of metrics to return.
+ * @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 database metrics request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetrics(
+ String resourceGroupName, String serverName, String elasticPoolName, String filter, Context context);
+
+ /**
+ * Returns elastic pool metric definitions.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database metric definitions request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetricDefinitions(
+ String resourceGroupName, String serverName, String elasticPoolName);
+
+ /**
+ * Returns elastic pool metric definitions.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @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 database metric definitions request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMetricDefinitions(
+ String resourceGroupName, String serverName, String elasticPoolName, Context context);
+
+ /**
+ * Gets all elastic pools in a server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all elastic pools in a server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets all elastic pools in a server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param skip The number of elements in the collection to skip.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all elastic pools in a server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, Integer skip, Context context);
+
+ /**
+ * Gets an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ElasticPoolInner get(String resourceGroupName, String serverName, String elasticPoolName);
+
+ /**
+ * Gets an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @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 elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String elasticPoolName, Context context);
+
+ /**
+ * Creates or updates an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param parameters The elastic pool parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ElasticPoolInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters);
+
+ /**
+ * Creates or updates an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param parameters The elastic pool parameters.
+ * @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 elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ElasticPoolInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String elasticPoolName,
+ ElasticPoolInner parameters,
+ Context context);
+
+ /**
+ * Creates or updates an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param parameters The elastic pool parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ElasticPoolInner createOrUpdate(
+ String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters);
+
+ /**
+ * Creates or updates an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param parameters The elastic pool parameters.
+ * @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 elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ElasticPoolInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String elasticPoolName,
+ ElasticPoolInner parameters,
+ Context context);
+
+ /**
+ * Deletes an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 serverName, String elasticPoolName);
+
+ /**
+ * Deletes an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @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 serverName, String elasticPoolName, Context context);
+
+ /**
+ * Deletes an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 serverName, String elasticPoolName);
+
+ /**
+ * Deletes an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @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 serverName, String elasticPoolName, Context context);
+
+ /**
+ * Updates an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param parameters The elastic pool update parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ElasticPoolInner> beginUpdate(
+ String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters);
+
+ /**
+ * Updates an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param parameters The elastic pool update parameters.
+ * @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 elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ElasticPoolInner> beginUpdate(
+ String resourceGroupName,
+ String serverName,
+ String elasticPoolName,
+ ElasticPoolUpdate parameters,
+ Context context);
+
+ /**
+ * Updates an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param parameters The elastic pool update parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ElasticPoolInner update(
+ String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters);
+
+ /**
+ * Updates an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool.
+ * @param parameters The elastic pool update parameters.
+ * @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 elastic pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ElasticPoolInner update(
+ String resourceGroupName,
+ String serverName,
+ String elasticPoolName,
+ ElasticPoolUpdate parameters,
+ Context context);
+
+ /**
+ * Failovers an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool to failover.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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> beginFailover(
+ String resourceGroupName, String serverName, String elasticPoolName);
+
+ /**
+ * Failovers an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool to failover.
+ * @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> beginFailover(
+ String resourceGroupName, String serverName, String elasticPoolName, Context context);
+
+ /**
+ * Failovers an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool to failover.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 failover(String resourceGroupName, String serverName, String elasticPoolName);
+
+ /**
+ * Failovers an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool to failover.
+ * @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 failover(String resourceGroupName, String serverName, String elasticPoolName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/EncryptionProtectorsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/EncryptionProtectorsClient.java
new file mode 100644
index 0000000000000..c1f83e152f8d5
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/EncryptionProtectorsClient.java
@@ -0,0 +1,227 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.EncryptionProtectorInner;
+import com.azure.resourcemanager.sql.generated.models.EncryptionProtectorName;
+
+/** An instance of this class provides access to all the operations defined in EncryptionProtectorsClient. */
+public interface EncryptionProtectorsClient {
+ /**
+ * Gets a list of server encryption protectors.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server encryption protectors.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of server encryption protectors.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server encryption protectors.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Gets a server encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param encryptionProtectorName The name of the encryption protector to be retrieved.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 server encryption protector.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EncryptionProtectorInner get(
+ String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName);
+
+ /**
+ * Gets a server encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param encryptionProtectorName The name of the encryption protector to be retrieved.
+ * @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 server encryption protector.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context);
+
+ /**
+ * Updates an existing encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param encryptionProtectorName The name of the encryption protector to be updated.
+ * @param parameters The requested encryption protector resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the server encryption protector.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, EncryptionProtectorInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ EncryptionProtectorName encryptionProtectorName,
+ EncryptionProtectorInner parameters);
+
+ /**
+ * Updates an existing encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param encryptionProtectorName The name of the encryption protector to be updated.
+ * @param parameters The requested encryption protector resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the server encryption protector.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, EncryptionProtectorInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ EncryptionProtectorName encryptionProtectorName,
+ EncryptionProtectorInner parameters,
+ Context context);
+
+ /**
+ * Updates an existing encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param encryptionProtectorName The name of the encryption protector to be updated.
+ * @param parameters The requested encryption protector resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the server encryption protector.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EncryptionProtectorInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ EncryptionProtectorName encryptionProtectorName,
+ EncryptionProtectorInner parameters);
+
+ /**
+ * Updates an existing encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param encryptionProtectorName The name of the encryption protector to be updated.
+ * @param parameters The requested encryption protector resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the server encryption protector.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EncryptionProtectorInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ EncryptionProtectorName encryptionProtectorName,
+ EncryptionProtectorInner parameters,
+ Context context);
+
+ /**
+ * Revalidates an existing encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param encryptionProtectorName The name of the encryption protector to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRevalidate(
+ String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName);
+
+ /**
+ * Revalidates an existing encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param encryptionProtectorName The name of the encryption protector to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRevalidate(
+ String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context);
+
+ /**
+ * Revalidates an existing encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param encryptionProtectorName The name of the encryption protector to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void revalidate(String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName);
+
+ /**
+ * Revalidates an existing encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param encryptionProtectorName The name of the encryption protector to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void revalidate(
+ String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java
new file mode 100644
index 0000000000000..a100051d1f8b3
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java
@@ -0,0 +1,125 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.ExtendedDatabaseBlobAuditingPolicyInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * ExtendedDatabaseBlobAuditingPoliciesClient.
+ */
+public interface ExtendedDatabaseBlobAuditingPoliciesClient {
+ /**
+ * Gets an extended database's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an extended database's blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtendedDatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets an extended database's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an extended database's blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Creates or updates an extended database's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The extended database blob auditing policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 extended database blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtendedDatabaseBlobAuditingPolicyInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ExtendedDatabaseBlobAuditingPolicyInner parameters);
+
+ /**
+ * Creates or updates an extended database's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The extended database blob auditing policy.
+ * @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 extended database blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ ExtendedDatabaseBlobAuditingPolicyInner parameters,
+ Context context);
+
+ /**
+ * Lists extended auditing settings of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database extended auditing settings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Lists extended auditing settings of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of database extended auditing settings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ExtendedServerBlobAuditingPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ExtendedServerBlobAuditingPoliciesClient.java
new file mode 100644
index 0000000000000..68316ec2b47d4
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/ExtendedServerBlobAuditingPoliciesClient.java
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.ExtendedServerBlobAuditingPolicyInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in ExtendedServerBlobAuditingPoliciesClient.
+ */
+public interface ExtendedServerBlobAuditingPoliciesClient {
+ /**
+ * Gets an extended server's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 extended server's blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtendedServerBlobAuditingPolicyInner get(String resourceGroupName, String serverName);
+
+ /**
+ * Gets an extended server's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @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 extended server's blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Creates or updates an extended server's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param parameters Properties of extended blob auditing policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 extended server blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ExtendedServerBlobAuditingPolicyInner>
+ beginCreateOrUpdate(
+ String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters);
+
+ /**
+ * Creates or updates an extended server's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param parameters Properties of extended blob auditing policy.
+ * @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 extended server blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ExtendedServerBlobAuditingPolicyInner>
+ beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ ExtendedServerBlobAuditingPolicyInner parameters,
+ Context context);
+
+ /**
+ * Creates or updates an extended server's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param parameters Properties of extended blob auditing policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 extended server blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtendedServerBlobAuditingPolicyInner createOrUpdate(
+ String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters);
+
+ /**
+ * Creates or updates an extended server's blob auditing policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param parameters Properties of extended blob auditing policy.
+ * @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 extended server blob auditing policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtendedServerBlobAuditingPolicyInner createOrUpdate(
+ String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters, Context context);
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server extended auditing settings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server extended auditing settings.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/FailoverGroupsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/FailoverGroupsClient.java
new file mode 100644
index 0000000000000..1e34a2b100735
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/FailoverGroupsClient.java
@@ -0,0 +1,427 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.FailoverGroupInner;
+import com.azure.resourcemanager.sql.generated.models.FailoverGroupUpdate;
+
+/** An instance of this class provides access to all the operations defined in FailoverGroupsClient. */
+public interface FailoverGroupsClient {
+ /**
+ * Gets a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverGroupInner get(String resourceGroupName, String serverName, String failoverGroupName);
+
+ /**
+ * Gets a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String failoverGroupName, Context context);
+
+ /**
+ * Creates or updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverGroupInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters);
+
+ /**
+ * Creates or updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @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 failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverGroupInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String failoverGroupName,
+ FailoverGroupInner parameters,
+ Context context);
+
+ /**
+ * Creates or updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverGroupInner createOrUpdate(
+ String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters);
+
+ /**
+ * Creates or updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @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 failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverGroupInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String failoverGroupName,
+ FailoverGroupInner parameters,
+ Context context);
+
+ /**
+ * Deletes a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String failoverGroupName);
+
+ /**
+ * Deletes a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String failoverGroupName, Context context);
+
+ /**
+ * Deletes a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String failoverGroupName);
+
+ /**
+ * Deletes a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String failoverGroupName, Context context);
+
+ /**
+ * Updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverGroupInner> beginUpdate(
+ String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters);
+
+ /**
+ * Updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @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 failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverGroupInner> beginUpdate(
+ String resourceGroupName,
+ String serverName,
+ String failoverGroupName,
+ FailoverGroupUpdate parameters,
+ Context context);
+
+ /**
+ * Updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverGroupInner update(
+ String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters);
+
+ /**
+ * Updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @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 failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverGroupInner update(
+ String resourceGroupName,
+ String serverName,
+ String failoverGroupName,
+ FailoverGroupUpdate parameters,
+ Context context);
+
+ /**
+ * Lists the failover groups in a server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of failover groups.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Lists the failover groups in a server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of failover groups.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Fails over from the current primary server to this server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverGroupInner> beginFailover(
+ String resourceGroupName, String serverName, String failoverGroupName);
+
+ /**
+ * Fails over from the current primary server to this server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverGroupInner> beginFailover(
+ String resourceGroupName, String serverName, String failoverGroupName, Context context);
+
+ /**
+ * Fails over from the current primary server to this server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverGroupInner failover(String resourceGroupName, String serverName, String failoverGroupName);
+
+ /**
+ * Fails over from the current primary server to this server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverGroupInner failover(String resourceGroupName, String serverName, String failoverGroupName, Context context);
+
+ /**
+ * Fails over from the current primary server to this server. This operation might result in data loss.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverGroupInner> beginForceFailoverAllowDataLoss(
+ String resourceGroupName, String serverName, String failoverGroupName);
+
+ /**
+ * Fails over from the current primary server to this server. This operation might result in data loss.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverGroupInner> beginForceFailoverAllowDataLoss(
+ String resourceGroupName, String serverName, String failoverGroupName, Context context);
+
+ /**
+ * Fails over from the current primary server to this server. This operation might result in data loss.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverGroupInner forceFailoverAllowDataLoss(
+ String resourceGroupName, String serverName, String failoverGroupName);
+
+ /**
+ * Fails over from the current primary server to this server. This operation might result in data loss.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server containing the failover group.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverGroupInner forceFailoverAllowDataLoss(
+ String resourceGroupName, String serverName, String failoverGroupName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/FirewallRulesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/FirewallRulesClient.java
new file mode 100644
index 0000000000000..31facde7db366
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/FirewallRulesClient.java
@@ -0,0 +1,179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.FirewallRuleInner;
+import com.azure.resourcemanager.sql.generated.models.FirewallRuleList;
+
+/** An instance of this class provides access to all the operations defined in FirewallRulesClient. */
+public interface FirewallRulesClient {
+ /**
+ * Gets a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * Gets a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the firewall rule.
+ * @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 firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String firewallRuleName, Context context);
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the firewall rule.
+ * @param parameters The required parameters for creating or updating a firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner createOrUpdate(
+ String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters);
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the firewall rule.
+ * @param parameters The required parameters for creating or updating a firewall rule.
+ * @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 server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String firewallRuleName,
+ FirewallRuleInner parameters,
+ Context context);
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 serverName, String firewallRuleName);
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the firewall rule.
+ * @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 deleteWithResponse(
+ String resourceGroupName, String serverName, String firewallRuleName, Context context);
+
+ /**
+ * Gets a list of firewall rules.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of firewall rules.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of firewall rules.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of firewall rules.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Replaces all firewall rules on the server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param parameters A list of server firewall rules.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner replace(String resourceGroupName, String serverName, FirewallRuleList parameters);
+
+ /**
+ * Replaces all firewall rules on the server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param parameters A list of server firewall rules.
+ * @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 server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response replaceWithResponse(
+ String resourceGroupName, String serverName, FirewallRuleList parameters, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/GeoBackupPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/GeoBackupPoliciesClient.java
new file mode 100644
index 0000000000000..abe8572107c1a
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/GeoBackupPoliciesClient.java
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.GeoBackupPolicyInner;
+import com.azure.resourcemanager.sql.generated.models.GeoBackupPolicyName;
+
+/** An instance of this class provides access to all the operations defined in GeoBackupPoliciesClient. */
+public interface GeoBackupPoliciesClient {
+ /**
+ * Updates a database geo backup policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param geoBackupPolicyName The name of the geo backup policy.
+ * @param parameters The required parameters for creating or updating the geo backup policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 database geo backup policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GeoBackupPolicyInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ GeoBackupPolicyName geoBackupPolicyName,
+ GeoBackupPolicyInner parameters);
+
+ /**
+ * Updates a database geo backup policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param geoBackupPolicyName The name of the geo backup policy.
+ * @param parameters The required parameters for creating or updating the geo backup policy.
+ * @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 database geo backup policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ GeoBackupPolicyName geoBackupPolicyName,
+ GeoBackupPolicyInner parameters,
+ Context context);
+
+ /**
+ * Gets a geo backup policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param geoBackupPolicyName The name of the geo backup policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 geo backup policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GeoBackupPolicyInner get(
+ String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName);
+
+ /**
+ * Gets a geo backup policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param geoBackupPolicyName The name of the geo backup policy.
+ * @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 geo backup policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String databaseName,
+ GeoBackupPolicyName geoBackupPolicyName,
+ Context context);
+
+ /**
+ * Returns a list of geo backup policies.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a list geo backup policies request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Returns a list of geo backup policies.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a list geo backup policies request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDatabase(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/InstanceFailoverGroupsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/InstanceFailoverGroupsClient.java
new file mode 100644
index 0000000000000..43e17d358429a
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/InstanceFailoverGroupsClient.java
@@ -0,0 +1,354 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.InstanceFailoverGroupInner;
+
+/** An instance of this class provides access to all the operations defined in InstanceFailoverGroupsClient. */
+public interface InstanceFailoverGroupsClient {
+ /**
+ * Gets a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstanceFailoverGroupInner get(String resourceGroupName, String locationName, String failoverGroupName);
+
+ /**
+ * Gets a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String locationName, String failoverGroupName, Context context);
+
+ /**
+ * Creates or updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, InstanceFailoverGroupInner> beginCreateOrUpdate(
+ String resourceGroupName, String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters);
+
+ /**
+ * Creates or updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @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 instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, InstanceFailoverGroupInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String locationName,
+ String failoverGroupName,
+ InstanceFailoverGroupInner parameters,
+ Context context);
+
+ /**
+ * Creates or updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstanceFailoverGroupInner createOrUpdate(
+ String resourceGroupName, String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters);
+
+ /**
+ * Creates or updates a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param parameters The failover group parameters.
+ * @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 instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstanceFailoverGroupInner createOrUpdate(
+ String resourceGroupName,
+ String locationName,
+ String failoverGroupName,
+ InstanceFailoverGroupInner parameters,
+ Context context);
+
+ /**
+ * Deletes a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String locationName, String failoverGroupName);
+
+ /**
+ * Deletes a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String locationName, String failoverGroupName, Context context);
+
+ /**
+ * Deletes a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String locationName, String failoverGroupName);
+
+ /**
+ * Deletes a failover group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String locationName, String failoverGroupName, Context context);
+
+ /**
+ * Lists the failover groups in a location.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of instance failover groups.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByLocation(String resourceGroupName, String locationName);
+
+ /**
+ * Lists the failover groups in a location.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of instance failover groups.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByLocation(
+ String resourceGroupName, String locationName, Context context);
+
+ /**
+ * Fails over from the current primary managed instance to this managed instance.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, InstanceFailoverGroupInner> beginFailover(
+ String resourceGroupName, String locationName, String failoverGroupName);
+
+ /**
+ * Fails over from the current primary managed instance to this managed instance.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, InstanceFailoverGroupInner> beginFailover(
+ String resourceGroupName, String locationName, String failoverGroupName, Context context);
+
+ /**
+ * Fails over from the current primary managed instance to this managed instance.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstanceFailoverGroupInner failover(String resourceGroupName, String locationName, String failoverGroupName);
+
+ /**
+ * Fails over from the current primary managed instance to this managed instance.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstanceFailoverGroupInner failover(
+ String resourceGroupName, String locationName, String failoverGroupName, Context context);
+
+ /**
+ * Fails over from the current primary managed instance to this managed instance. This operation might result in
+ * data loss.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, InstanceFailoverGroupInner> beginForceFailoverAllowDataLoss(
+ String resourceGroupName, String locationName, String failoverGroupName);
+
+ /**
+ * Fails over from the current primary managed instance to this managed instance. This operation might result in
+ * data loss.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, InstanceFailoverGroupInner> beginForceFailoverAllowDataLoss(
+ String resourceGroupName, String locationName, String failoverGroupName, Context context);
+
+ /**
+ * Fails over from the current primary managed instance to this managed instance. This operation might result in
+ * data loss.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstanceFailoverGroupInner forceFailoverAllowDataLoss(
+ String resourceGroupName, String locationName, String failoverGroupName);
+
+ /**
+ * Fails over from the current primary managed instance to this managed instance. This operation might result in
+ * data loss.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param locationName The name of the region where the resource is located.
+ * @param failoverGroupName The name of the failover group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an instance failover group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstanceFailoverGroupInner forceFailoverAllowDataLoss(
+ String resourceGroupName, String locationName, String failoverGroupName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/InstancePoolsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/InstancePoolsClient.java
new file mode 100644
index 0000000000000..2fec49e102f83
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/InstancePoolsClient.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.sql.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.sql.generated.fluent.models.InstancePoolInner;
+import com.azure.resourcemanager.sql.generated.models.InstancePoolUpdate;
+
+/** An instance of this class provides access to all the operations defined in InstancePoolsClient. */
+public interface InstancePoolsClient {
+ /**
+ * Gets an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be retrieved.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 instance pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstancePoolInner getByResourceGroup(String resourceGroupName, String instancePoolName);
+
+ /**
+ * Gets an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be retrieved.
+ * @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 instance pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String instancePoolName, Context context);
+
+ /**
+ * Creates or updates an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be created or updated.
+ * @param parameters The requested instance pool resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL instance pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, InstancePoolInner> beginCreateOrUpdate(
+ String resourceGroupName, String instancePoolName, InstancePoolInner parameters);
+
+ /**
+ * Creates or updates an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be created or updated.
+ * @param parameters The requested instance pool resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL instance pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, InstancePoolInner> beginCreateOrUpdate(
+ String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context);
+
+ /**
+ * Creates or updates an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be created or updated.
+ * @param parameters The requested instance pool resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL instance pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, InstancePoolInner parameters);
+
+ /**
+ * Creates or updates an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be created or updated.
+ * @param parameters The requested instance pool resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL instance pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstancePoolInner createOrUpdate(
+ String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context);
+
+ /**
+ * Deletes an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be deleted.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 instancePoolName);
+
+ /**
+ * Deletes an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be deleted.
+ * @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 instancePoolName, Context context);
+
+ /**
+ * Deletes an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be deleted.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 instancePoolName);
+
+ /**
+ * Deletes an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be deleted.
+ * @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 instancePoolName, Context context);
+
+ /**
+ * Updates an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be updated.
+ * @param parameters The requested instance pool resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL instance pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, InstancePoolInner> beginUpdate(
+ String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters);
+
+ /**
+ * Updates an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be updated.
+ * @param parameters The requested instance pool resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL instance pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, InstancePoolInner> beginUpdate(
+ String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, Context context);
+
+ /**
+ * Updates an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be updated.
+ * @param parameters The requested instance pool resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL instance pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters);
+
+ /**
+ * Updates an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be updated.
+ * @param parameters The requested instance pool resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL instance pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ InstancePoolInner update(
+ String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, Context context);
+
+ /**
+ * Gets a list of instance pools in the resource group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of instance pools in the resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Gets a list of instance pools in the resource group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of instance pools in the resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Gets a list of all instance pools in the subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all instance pools in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets a list of all instance pools in the subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all instance pools in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobAgentsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobAgentsClient.java
new file mode 100644
index 0000000000000..8867b75420ec7
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobAgentsClient.java
@@ -0,0 +1,279 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.JobAgentInner;
+import com.azure.resourcemanager.sql.generated.models.JobAgentUpdate;
+
+/** An instance of this class provides access to all the operations defined in JobAgentsClient. */
+public interface JobAgentsClient {
+ /**
+ * Gets a list of job agents in a server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of job agents in a server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of job agents in a server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of job agents in a server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Gets a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be retrieved.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 job agent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobAgentInner get(String resourceGroupName, String serverName, String jobAgentName);
+
+ /**
+ * Gets a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be retrieved.
+ * @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 job agent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String jobAgentName, Context context);
+
+ /**
+ * Creates or updates a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be created or updated.
+ * @param parameters The requested job agent resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL job agent.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, JobAgentInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters);
+
+ /**
+ * Creates or updates a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be created or updated.
+ * @param parameters The requested job agent resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL job agent.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, JobAgentInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters, Context context);
+
+ /**
+ * Creates or updates a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be created or updated.
+ * @param parameters The requested job agent resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL job agent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobAgentInner createOrUpdate(
+ String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters);
+
+ /**
+ * Creates or updates a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be created or updated.
+ * @param parameters The requested job agent resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure SQL job agent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobAgentInner createOrUpdate(
+ String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters, Context context);
+
+ /**
+ * Deletes a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be deleted.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 serverName, String jobAgentName);
+
+ /**
+ * Deletes a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be deleted.
+ * @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 serverName, String jobAgentName, Context context);
+
+ /**
+ * Deletes a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be deleted.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 serverName, String jobAgentName);
+
+ /**
+ * Deletes a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be deleted.
+ * @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 serverName, String jobAgentName, Context context);
+
+ /**
+ * Updates a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be updated.
+ * @param parameters The update to the job agent.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 SQL job agent.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, JobAgentInner> beginUpdate(
+ String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters);
+
+ /**
+ * Updates a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be updated.
+ * @param parameters The update to the job agent.
+ * @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 SQL job agent.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, JobAgentInner> beginUpdate(
+ String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, Context context);
+
+ /**
+ * Updates a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be updated.
+ * @param parameters The update to the job agent.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 SQL job agent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters);
+
+ /**
+ * Updates a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent to be updated.
+ * @param parameters The update to the job agent.
+ * @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 SQL job agent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobAgentInner update(
+ String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobCredentialsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobCredentialsClient.java
new file mode 100644
index 0000000000000..95558b0913cad
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobCredentialsClient.java
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.JobCredentialInner;
+
+/** An instance of this class provides access to all the operations defined in JobCredentialsClient. */
+public interface JobCredentialsClient {
+ /**
+ * Gets a list of jobs credentials.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of jobs credentials.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName);
+
+ /**
+ * Gets a list of jobs credentials.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of jobs credentials.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByAgent(
+ String resourceGroupName, String serverName, String jobAgentName, Context context);
+
+ /**
+ * Gets a jobs credential.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param credentialName The name of the credential.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 jobs credential.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobCredentialInner get(String resourceGroupName, String serverName, String jobAgentName, String credentialName);
+
+ /**
+ * Gets a jobs credential.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param credentialName The name of the credential.
+ * @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 jobs credential.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String jobAgentName, String credentialName, Context context);
+
+ /**
+ * Creates or updates a job credential.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param credentialName The name of the credential.
+ * @param parameters The requested job credential state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a stored credential that can be used by a job to connect to target databases.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobCredentialInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String credentialName,
+ JobCredentialInner parameters);
+
+ /**
+ * Creates or updates a job credential.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param credentialName The name of the credential.
+ * @param parameters The requested job credential state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a stored credential that can be used by a job to connect to target databases.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String credentialName,
+ JobCredentialInner parameters,
+ Context context);
+
+ /**
+ * Deletes a job credential.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param credentialName The name of the credential.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 serverName, String jobAgentName, String credentialName);
+
+ /**
+ * Deletes a job credential.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param credentialName The name of the credential.
+ * @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 deleteWithResponse(
+ String resourceGroupName, String serverName, String jobAgentName, String credentialName, Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobExecutionsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobExecutionsClient.java
new file mode 100644
index 0000000000000..032b9cb030f6b
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobExecutionsClient.java
@@ -0,0 +1,356 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.sql.generated.fluent.models.JobExecutionInner;
+import java.time.OffsetDateTime;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in JobExecutionsClient. */
+public interface JobExecutionsClient {
+ /**
+ * Lists all executions in a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of job executions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName);
+
+ /**
+ * Lists all executions in a job agent.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param createTimeMin If specified, only job executions created at or after the specified time are included.
+ * @param createTimeMax If specified, only job executions created before the specified time are included.
+ * @param endTimeMin If specified, only job executions completed at or after the specified time are included.
+ * @param endTimeMax If specified, only job executions completed before the specified time are included.
+ * @param isActive If specified, only active or only completed job executions are included.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the 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 a list of job executions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByAgent(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ OffsetDateTime createTimeMin,
+ OffsetDateTime createTimeMax,
+ OffsetDateTime endTimeMin,
+ OffsetDateTime endTimeMax,
+ Boolean isActive,
+ Integer skip,
+ Integer top,
+ Context context);
+
+ /**
+ * Requests cancellation of a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job.
+ * @param jobExecutionId The id of the job execution to cancel.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 cancel(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId);
+
+ /**
+ * Requests cancellation of a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job.
+ * @param jobExecutionId The id of the job execution to cancel.
+ * @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 cancelWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ UUID jobExecutionId,
+ Context context);
+
+ /**
+ * Starts an elastic job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 execution of a job.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, JobExecutionInner> beginCreate(
+ String resourceGroupName, String serverName, String jobAgentName, String jobName);
+
+ /**
+ * Starts an elastic job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @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 execution of a job.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, JobExecutionInner> beginCreate(
+ String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context);
+
+ /**
+ * Starts an elastic job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 execution of a job.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobExecutionInner create(String resourceGroupName, String serverName, String jobAgentName, String jobName);
+
+ /**
+ * Starts an elastic job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @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 execution of a job.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobExecutionInner create(
+ String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context);
+
+ /**
+ * Lists a job's executions.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of job executions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByJob(
+ String resourceGroupName, String serverName, String jobAgentName, String jobName);
+
+ /**
+ * Lists a job's executions.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param createTimeMin If specified, only job executions created at or after the specified time are included.
+ * @param createTimeMax If specified, only job executions created before the specified time are included.
+ * @param endTimeMin If specified, only job executions completed at or after the specified time are included.
+ * @param endTimeMax If specified, only job executions completed before the specified time are included.
+ * @param isActive If specified, only active or only completed job executions are included.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the 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 a list of job executions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByJob(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ OffsetDateTime createTimeMin,
+ OffsetDateTime createTimeMax,
+ OffsetDateTime endTimeMin,
+ OffsetDateTime endTimeMax,
+ Boolean isActive,
+ Integer skip,
+ Integer top,
+ Context context);
+
+ /**
+ * Gets a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job.
+ * @param jobExecutionId The id of the job execution.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 job execution.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobExecutionInner get(
+ String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId);
+
+ /**
+ * Gets a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job.
+ * @param jobExecutionId The id of the job execution.
+ * @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 job execution.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ UUID jobExecutionId,
+ Context context);
+
+ /**
+ * Creates or updates a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param jobExecutionId The job execution id to create the job execution under.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 execution of a job.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, JobExecutionInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId);
+
+ /**
+ * Creates or updates a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param jobExecutionId The job execution id to create the job execution under.
+ * @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 execution of a job.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, JobExecutionInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ UUID jobExecutionId,
+ Context context);
+
+ /**
+ * Creates or updates a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param jobExecutionId The job execution id to create the job execution under.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 execution of a job.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobExecutionInner createOrUpdate(
+ String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId);
+
+ /**
+ * Creates or updates a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param jobExecutionId The job execution id to create the job execution under.
+ * @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 execution of a job.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobExecutionInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ UUID jobExecutionId,
+ Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobStepExecutionsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobStepExecutionsClient.java
new file mode 100644
index 0000000000000..831546d230e8d
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobStepExecutionsClient.java
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.JobExecutionInner;
+import java.time.OffsetDateTime;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in JobStepExecutionsClient. */
+public interface JobStepExecutionsClient {
+ /**
+ * Lists the step executions of a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param jobExecutionId The id of the job execution.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of job executions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByJobExecution(
+ String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId);
+
+ /**
+ * Lists the step executions of a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param jobExecutionId The id of the job execution.
+ * @param createTimeMin If specified, only job executions created at or after the specified time are included.
+ * @param createTimeMax If specified, only job executions created before the specified time are included.
+ * @param endTimeMin If specified, only job executions completed at or after the specified time are included.
+ * @param endTimeMax If specified, only job executions completed before the specified time are included.
+ * @param isActive If specified, only active or only completed job executions are included.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the 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 a list of job executions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByJobExecution(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ UUID jobExecutionId,
+ OffsetDateTime createTimeMin,
+ OffsetDateTime createTimeMax,
+ OffsetDateTime endTimeMin,
+ OffsetDateTime endTimeMax,
+ Boolean isActive,
+ Integer skip,
+ Integer top,
+ Context context);
+
+ /**
+ * Gets a step execution of a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param jobExecutionId The unique id of the job execution.
+ * @param stepName The name of the step.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 step execution of a job execution.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobExecutionInner get(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ UUID jobExecutionId,
+ String stepName);
+
+ /**
+ * Gets a step execution of a job execution.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param jobExecutionId The unique id of the job execution.
+ * @param stepName The name of the step.
+ * @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 step execution of a job execution.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ UUID jobExecutionId,
+ String stepName,
+ Context context);
+}
diff --git a/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobStepsClient.java b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobStepsClient.java
new file mode 100644
index 0000000000000..d9b780fbd67c1
--- /dev/null
+++ b/sdk/sql/azure-resourcemanager-sql-generated/src/main/java/com/azure/resourcemanager/sql/generated/fluent/JobStepsClient.java
@@ -0,0 +1,273 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sql.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.util.Context;
+import com.azure.resourcemanager.sql.generated.fluent.models.JobStepInner;
+
+/** An instance of this class provides access to all the operations defined in JobStepsClient. */
+public interface JobStepsClient {
+ /**
+ * Gets all job steps in the specified job version.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param jobVersion The version of the job to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all job steps in the specified job version.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByVersion(
+ String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion);
+
+ /**
+ * Gets all job steps in the specified job version.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @param jobVersion The version of the job to get.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all job steps in the specified job version.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByVersion(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ int jobVersion,
+ Context context);
+
+ /**
+ * Gets the specified version of a job step.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job.
+ * @param jobVersion The version of the job to get.
+ * @param stepName The name of the job step.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 specified version of a job step.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobStepInner getByVersion(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ int jobVersion,
+ String stepName);
+
+ /**
+ * Gets the specified version of a job step.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job.
+ * @param jobVersion The version of the job to get.
+ * @param stepName The name of the job step.
+ * @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 specified version of a job step.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByVersionWithResponse(
+ String resourceGroupName,
+ String serverName,
+ String jobAgentName,
+ String jobName,
+ int jobVersion,
+ String stepName,
+ Context context);
+
+ /**
+ * Gets all job steps for a job's current version.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param jobAgentName The name of the job agent.
+ * @param jobName The name of the job to get.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all job steps for a job's current version.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable