From a9bba35673e7a6e9d3f9331f9e8856830a071d3b Mon Sep 17 00:00:00 2001 From: Ji Wang Date: Mon, 10 May 2021 03:08:03 -0700 Subject: [PATCH] Release microsoft.sql 2021 02 01 preview (#14339) * Adds base for updating Microsoft.Sql from version preview/2020-11-01-preview to version 2021-02-01-preview * Updates readme * Updates API version in new specs and examples * Fix Integer format: S360 swagger lint issues in 2021-02-01 (#13855) * Update integer format * update typo * Swagger Documentation for Outbound Firewall Rules (#13820) * Swagger Documentation for Outbound Firewall Rules * Add the new file to v5 Co-authored-by: Vineet Mahadik * Swagger Documentation For Database Resource With Ledger (#13916) * adding database swagger files * modifying example * Fixing to be boolean * adding database extensions and database operations * adding other database examples * removing database_legacy, adding usages * removing usages * removing databases_legacy from readme * Swagger Documentation For Ledger Digest Upload (#13871) * adding ledger api * Fixes from validation * removing required endpoint parameter, adding ledgerName (current) to id * removing 201 response from resource, renaming ledgerName * adding location to 202 results * fixing 202 response location * renaming files * updating files with new controller name + correct entity name * fixing readme * Dev brandong getrestorabledropped (#14129) * Update RestorableDroppedDatabases API to add BackupStorageAccountType property * Update readme.md * Re-add elasticPoolId as a deprecated property * Update elasticPoolId description and remove trailing comma causing failures * Remove the unsupported deprecated property * Add 2021-02-01-preview minor changes (#13942) * add 2021-02-01-preview for test * update with 2021-04-19 latest * update readme.md * update with latest master in DSMainDev * Carry IsInfraEncryptionEnabled to Database.json (#14322) * carry latest minor changes. * re-format readme.md * remove 2020 11 01 RestorableDroppedManagedDatabases in V5 * Update readme file in 2021 02 01 dev branch to match the master branch (#14336) * Carry IsInfraEncryptionEnabled to Database.json (#14322) * carry latest minor changes. * re-format readme.md * remove 2020 11 01 RestorableDroppedManagedDatabases in V5 * update to match master branch readme.md Co-authored-by: Vineet Mahadik <44247873+VMMicrosoft@users.noreply.github.com> Co-authored-by: Vineet Mahadik Co-authored-by: rewongmicrosoft <57964114+rewongmicrosoft@users.noreply.github.com> Co-authored-by: brandong-ms <44618010+brandong-ms@users.noreply.github.com> Co-authored-by: Arthur Ning <57385816+akning-ms@users.noreply.github.com> --- .../BackupShortTermRetentionPolicies.json | 332 ++ .../2021-02-01-preview/BlobAuditing.json | 1067 ++++++ .../DataWarehouseUserActivities.json | 199 ++ .../2021-02-01-preview/DatabaseAdvisors.json | 663 ++++ .../DatabaseAutomaticTuning.json | 259 ++ .../2021-02-01-preview/DatabaseColumns.json | 382 ++ .../DatabaseExtensions.json | 348 ++ .../DatabaseOperations.json | 271 ++ .../DatabaseRecommendedActions.json | 576 +++ .../2021-02-01-preview/DatabaseSchemas.json | 182 + .../DatabaseSecurityAlertPolicies.json | 329 ++ .../2021-02-01-preview/DatabaseTables.json | 225 ++ .../2021-02-01-preview/DatabaseUsages.json | 159 + ...eVulnerabilityAssessmentRuleBaselines.json | 339 ++ .../DatabaseVulnerabilityAssessmentScans.json | 458 +++ .../DatabaseVulnerabilityAssessments.json | 377 ++ .../preview/2021-02-01-preview/Databases.json | 1466 ++++++++ .../2021-02-01-preview/DeletedServers.json | 273 ++ .../ElasticPoolOperations.json | 257 ++ .../2021-02-01-preview/ElasticPools.json | 543 +++ .../EncryptionProtectors.json | 348 ++ .../2021-02-01-preview/FailoverGroups.json | 633 ++++ .../2021-02-01-preview/FirewallRules.json | 377 ++ .../InstanceFailoverGroups.json | 528 +++ .../2021-02-01-preview/InstancePools.json | 413 +++ .../preview/2021-02-01-preview/JobAgents.json | 387 ++ .../2021-02-01-preview/JobCredentials.json | 319 ++ .../2021-02-01-preview/JobExecutions.json | 678 ++++ .../2021-02-01-preview/JobStepExecutions.json | 402 +++ .../preview/2021-02-01-preview/JobSteps.json | 623 ++++ .../JobTargetExecutions.json | 536 +++ .../2021-02-01-preview/JobTargetGroups.json | 373 ++ .../2021-02-01-preview/JobVersions.json | 189 + .../preview/2021-02-01-preview/Jobs.json | 360 ++ .../LedgerDigestUploads.json | 331 ++ .../LocationCapabilities.json | 1273 +++++++ .../LongTermRetentionBackups.json | 1305 +++++++ ...ngTermRetentionManagedInstanceBackups.json | 818 +++++ .../LongTermRetentionPolicies.json | 277 ++ .../MaintenanceWindowOptions.json | 184 + .../MaintenanceWindows.json | 211 ++ ...nagedBackupShortTermRetentionPolicies.json | 332 ++ .../ManagedDatabaseColumns.json | 390 ++ .../ManagedDatabaseQueries.json | 382 ++ .../ManagedDatabaseRestoreDetails.json | 186 + .../ManagedDatabaseSchemas.json | 182 + .../ManagedDatabaseSecurityAlertPolicies.json | 325 ++ .../ManagedDatabaseSecurityEvents.json | 282 ++ .../ManagedDatabaseSensitivityLabels.json | 904 +++++ .../ManagedDatabaseTables.json | 225 ++ ...agedDatabaseTransparentDataEncryption.json | 284 ++ ...eVulnerabilityAssessmentRuleBaselines.json | 342 ++ ...dDatabaseVulnerabilityAssessmentScans.json | 466 +++ ...nagedDatabaseVulnerabilityAssessments.json | 381 ++ .../2021-02-01-preview/ManagedDatabases.json | 624 ++++ .../ManagedInstanceAdministrators.json | 331 ++ ...gedInstanceAzureADOnlyAuthentications.json | 311 ++ .../ManagedInstanceEncryptionProtectors.json | 338 ++ .../ManagedInstanceKeys.json | 336 ++ ...agedInstanceLongTermRetentionPolicies.json | 277 ++ .../ManagedInstanceOperations.json | 390 ++ ...gedInstancePrivateEndpointConnections.json | 318 ++ .../ManagedInstancePrivateLinkResources.json | 185 + .../ManagedInstanceTdeCertificates.json | 133 + ...nagedInstanceVulnerabilityAssessments.json | 359 ++ .../2021-02-01-preview/ManagedInstances.json | 1254 +++++++ ...abaseBackupShortTermRetentionPolicies.json | 336 ++ .../ManagedServerSecurityAlertPolicies.json | 303 ++ .../2021-02-01-preview/Operations.json | 145 + .../2021-02-01-preview/OperationsHealth.json | 133 + .../OutboundFirewallRules.json | 284 ++ .../PrivateEndpointConnections.json | 347 ++ .../PrivateLinkResources.json | 193 + .../RecoverableManagedDatabases.json | 176 + .../2021-02-01-preview/ReplicationLinks.json | 288 ++ .../RestorableDroppedDatabases.json | 234 ++ .../RestorableDroppedManagedDatabases.json | 197 + .../2021-02-01-preview/RestorePoints.json | 343 ++ .../2021-02-01-preview/SensitivityLabels.json | 884 +++++ .../2021-02-01-preview/ServerAdvisors.json | 646 ++++ .../ServerAutomaticTuning.json | 239 ++ .../ServerAzureADAdministrators.json | 339 ++ .../ServerAzureADOnlyAuthentications.json | 311 ++ .../2021-02-01-preview/ServerDevOpsAudit.json | 277 ++ .../2021-02-01-preview/ServerDnsAliases.json | 361 ++ .../2021-02-01-preview/ServerKeys.json | 339 ++ .../2021-02-01-preview/ServerOperations.json | 208 ++ .../ServerSecurityAlertPolicies.json | 303 ++ .../2021-02-01-preview/ServerTrustGroups.json | 376 ++ .../ServerVulnerabilityAssessments.json | 364 ++ .../preview/2021-02-01-preview/Servers.json | 1087 ++++++ .../preview/2021-02-01-preview/SqlAgent.json | 157 + .../SubscriptionUsages.json | 187 + .../2021-02-01-preview/SyncAgents.json | 531 +++ .../2021-02-01-preview/SyncGroups.json | 1065 ++++++ .../2021-02-01-preview/SyncMembers.json | 747 ++++ .../2021-02-01-preview/TdeCertificates.json | 133 + .../preview/2021-02-01-preview/TimeZones.json | 172 + .../TransparentDataEncryptions.json | 287 ++ .../preview/2021-02-01-preview/Usages.json | 167 + .../2021-02-01-preview/VirtualClusters.json | 405 +++ .../VirtualNetworkRules.json | 311 ++ .../WorkloadClassifiers.json | 361 ++ .../2021-02-01-preview/WorkloadGroups.json | 340 ++ .../examples/AdministratorCreateOrUpdate.json | 49 + .../examples/AdministratorDelete.json | 14 + .../examples/AdministratorGet.json | 25 + .../examples/AdministratorList.json | 29 + .../AzureADOnlyAuthCreateOrUpdate.json | 38 + .../examples/AzureADOnlyAuthDelete.json | 14 + .../examples/AzureADOnlyAuthGet.json | 21 + .../examples/AzureADOnlyAuthList.json | 25 + .../examples/CancelDatabaseOperation.json | 13 + .../examples/CancelElasticPoolOperation.json | 13 + .../examples/CancelJobExecution.json | 14 + .../CancelManagedInstanceOperation.json | 12 + ...ckNameAvailabilityServerAlreadyExists.json | 20 + .../CheckNameAvailabilityServerAvailable.json | 18 + .../CheckNameAvailabilityServerInvalid.json | 20 + .../ColumnSensitivityLabelCreateMax.json | 55 + .../ColumnSensitivityLabelDelete.json | 16 + .../examples/ColumnSensitivityLabelGet.json | 32 + .../examples/ColumnsListByDatabaseMax.json | 45 + .../examples/ColumnsListByDatabaseMin.json | 39 + ...baseConfiguredBackupStorageRedundancy.json | 92 + .../examples/CreateDatabaseCopyMode.json | 97 + .../examples/CreateDatabaseDefaultMode.json | 98 + .../examples/CreateDatabaseLedger.json | 90 + ...reateDatabaseMaintenanceConfiguration.json | 97 + .../examples/CreateDatabaseMin.json | 89 + .../examples/CreateDatabaseNamedReplica.json | 109 + .../examples/CreateDatabasePITRMode.json | 94 + .../examples/CreateDatabaseSecondaryMode.json | 100 + .../examples/CreateJobExecution.json | 29 + .../CreateOrUpdateDatabaseExtensions.json | 36 + .../CreateOrUpdateInstancePoolMax.json | 69 + .../CreateOrUpdateInstancePoolMin.json | 62 + .../examples/CreateOrUpdateJobAgent.json | 48 + .../examples/CreateOrUpdateJobCredential.json | 38 + .../examples/CreateOrUpdateJobExecution.json | 46 + .../examples/CreateOrUpdateJobMax.json | 60 + .../examples/CreateOrUpdateJobMin.json | 47 + .../examples/CreateOrUpdateJobStepMax.json | 110 + .../examples/CreateOrUpdateJobStepMin.json | 70 + .../CreateOrUpdateJobTargetGroupMax.json | 118 + .../CreateOrUpdateJobTargetGroupMin.json | 37 + .../CreateOrUpdateMaintenanceWindows.json | 24 + .../CreateOrUpdateWorkloadClassifierMax.json | 54 + .../CreateOrUpdateWorkloadClassifierMin.json | 49 + .../CreateOrUpdateWorkloadGroupMax.json | 53 + .../CreateOrUpdateWorkloadGroupMin.json | 50 + ...CreateVCoreDatabaseByServiceObjective.json | 98 + .../CreateVCoreDatabaseBySkuNameCapacity.json | 97 + .../DataWarehouseRestorePointsGet.json | 26 + ...aWarehouseRestorePointsListByDatabase.json | 50 + .../examples/DatabaseAdvisorGet.json | 25 + .../examples/DatabaseAdvisorList.json | 83 + .../examples/DatabaseAdvisorUpdate.json | 30 + .../DatabaseAuditingSettingsList.json | 32 + .../examples/DatabaseAutomaticTuningGet.json | 48 + .../DatabaseAutomaticTuningUpdateMax.json | 60 + .../DatabaseAutomaticTuningUpdateMin.json | 53 + ...DatabaseAzureMonitorAuditingCreateMin.json | 56 + .../DatabaseBlobAuditingCreateMax.json | 73 + .../DatabaseBlobAuditingCreateMin.json | 61 + .../examples/DatabaseBlobAuditingGet.json | 29 + .../examples/DatabaseColumnGet.json | 27 + .../examples/DatabaseColumnListByTable.json | 41 + .../DatabaseExtendedAuditingSettingsList.json | 32 + .../DatabaseRecommendedActionGet.json | 62 + .../DatabaseRecommendedActionList.json | 197 + .../DatabaseRecommendedActionListExpand.json | 625 ++++ .../DatabaseRecommendedActionUpdate.json | 72 + .../examples/DatabaseRestorePointsDelete.json | 14 + .../examples/DatabaseRestorePointsGet.json | 25 + .../DatabaseRestorePointsListByDatabase.json | 27 + .../examples/DatabaseRestorePointsPost.json | 42 + .../examples/DatabaseSchemaGet.json | 19 + .../DatabaseSchemaListByDatabase.json | 27 + .../DatabaseSecurityAlertCreateMax.json | 89 + .../DatabaseSecurityAlertCreateMin.json | 65 + .../examples/DatabaseSecurityAlertGet.json | 41 + .../DatabaseSecurityAlertListByDatabase.json | 45 + .../examples/DatabaseTableGet.json | 20 + .../examples/DatabaseTableListBySchema.json | 28 + ...ityAssessmentCreateContainerSasKeyMin.json | 46 + ...abaseVulnerabilityAssessmentCreateMax.json | 61 + ...tyAssessmentCreateStorageAccessKeyMin.json | 46 + ...DatabaseVulnerabilityAssessmentDelete.json | 13 + .../DatabaseVulnerabilityAssessmentGet.json | 29 + ...VulnerabilityAssessmentListByDatabase.json | 33 + ...erabilityAssessmentRuleBaselineCreate.json | 69 + ...erabilityAssessmentRuleBaselineDelete.json | 15 + ...ulnerabilityAssessmentRuleBaselineGet.json | 44 + ...baseVulnerabilityAssessmentScanExport.json | 34 + ...VulnerabilityAssessmentScanRecordsGet.json | 30 + ...tyAssessmentScanRecordsListByDatabase.json | 68 + ...seVulnerabilityAssessmentScansExecute.json | 15 + .../examples/DeleteDatabase.json | 14 + .../examples/DeleteInstancePool.json | 13 + .../examples/DeleteJob.json | 14 + .../examples/DeleteJobAgent.json | 14 + .../examples/DeleteJobCredential.json | 14 + .../examples/DeleteJobStep.json | 15 + .../examples/DeleteJobTargetGroup.json | 14 + .../examples/DeleteWorkloadClassifier.json | 16 + .../examples/DeleteWorkloadGroup.json | 15 + .../examples/DeletedServerGet.json | 23 + .../examples/DeletedServerList.json | 37 + .../DeletedServerListBySubscription.json | 36 + .../examples/DeletedServerRecover.json | 25 + .../ElasticPoolCreateOrUpdateMax.json | 72 + .../ElasticPoolCreateOrUpdateMin.json | 61 + ...teOrUpdateSetMaintenanceConfiguration.json | 66 + .../examples/ElasticPoolDelete.json | 14 + .../examples/ElasticPoolGet.json | 37 + .../examples/ElasticPoolListByServer.json | 81 + ...lUpdateAssignMaintenanceConfiguration.json | 41 + .../examples/ElasticPoolUpdateMax.json | 52 + .../examples/ElasticPoolUpdateMin.json | 36 + ...olUpdateResetMaintenanceConfiguration.json | 40 + ...yptionProtectorCreateOrUpdateKeyVault.json | 33 + ...ProtectorCreateOrUpdateServiceManaged.json | 31 + .../examples/EncryptionProtectorGet.json | 26 + .../examples/EncryptionProtectorList.json | 28 + .../EncryptionProtectorRevalidate.json | 13 + .../examples/ExportDatabase.json | 37 + .../ExportDatabaseWithNetworkIsolation.json | 41 + ...DatabaseAzureMonitorAuditingCreateMin.json | 54 + ...ExtendedDatabaseBlobAuditingCreateMax.json | 74 + ...ExtendedDatabaseBlobAuditingCreateMin.json | 59 + .../ExtendedDatabaseBlobAuditingGet.json | 29 + .../ExtendedServerBlobAuditingCreateMax.json | 55 + .../ExtendedServerBlobAuditingCreateMin.json | 42 + .../ExtendedServerBlobAuditingGet.json | 28 + .../examples/FailoverDatabase.json | 14 + .../examples/FailoverElasticPool.json | 13 + .../examples/FailoverGroupCreateOrUpdate.json | 92 + .../examples/FailoverGroupDelete.json | 14 + .../examples/FailoverGroupFailover.json | 42 + ...iloverGroupForceFailoverAllowDataLoss.json | 42 + .../examples/FailoverGroupGet.json | 38 + .../examples/FailoverGroupList.json | 66 + .../examples/FailoverGroupUpdate.json | 52 + .../examples/FailoverManagedInstance.json | 13 + .../examples/FirewallRuleCreate.json | 38 + .../examples/FirewallRuleDelete.json | 13 + .../examples/FirewallRuleGet.json | 22 + .../examples/FirewallRuleList.json | 52 + .../examples/FirewallRuleReplace.json | 33 + .../examples/FirewallRuleUpdate.json | 39 + .../GetDataWarehouseUserActivities.json | 22 + .../examples/GetDatabaseExtensions.json | 13 + .../examples/GetDatabaseUsages.json | 28 + .../examples/GetInstancePool.json | 31 + .../2021-02-01-preview/examples/GetJob.json | 29 + .../examples/GetJobAgent.json | 26 + .../examples/GetJobCredential.json | 22 + .../examples/GetJobExecution.json | 32 + .../examples/GetJobExecutionStep.json | 35 + .../examples/GetJobExecutionTarget.json | 41 + .../examples/GetJobStepByJob.json | 47 + .../examples/GetJobStepByVersion.json | 48 + .../examples/GetJobTargetGroup.json | 49 + .../examples/GetJobVersion.json | 20 + ...etListManagedShortTermRetentionPolicy.json | 25 + ...tTermRetentionPolicyRestorableDropped.json | 33 + .../examples/GetMaintenanceWindowOptions.json | 34 + .../examples/GetMaintenanceWindows.json | 28 + .../examples/GetManagedInstanceOperation.json | 58 + .../GetManagedShortTermRetentionPolicy.json | 22 + ...tTermRetentionPolicyRestorableDropped.json | 22 + .../GetRecoverableManagedDatabase.json | 21 + .../GetRestorableDroppedDatabase.json | 30 + .../GetRestorableDroppedManagedDatabase.json | 24 + .../examples/GetShortTermRetentionPolicy.json | 22 + .../examples/GetVCoreDatabase.json | 51 + .../examples/GetWorkloadClassifier.json | 28 + .../examples/GetWorkloadClassifierList.json | 57 + .../examples/GetWorkloadGroup.json | 27 + .../examples/GetWorkloadGroupList.json | 56 + .../examples/ImportDatabase.json | 37 + .../ImportDatabaseWithNetworkIsolation.json | 41 + .../examples/ImportNewDatabase.json | 37 + ...ImportNewDatabaseWithNetworkIsolation.json | 41 + ...eManagedDatabaseListByManagedInstance.json | 40 + .../InstanceFailoverGroupCreateOrUpdate.json | 94 + .../examples/InstanceFailoverGroupDelete.json | 14 + .../InstanceFailoverGroupFailover.json | 42 + ...iloverGroupForceFailoverAllowDataLoss.json | 42 + .../examples/InstanceFailoverGroupGet.json | 41 + .../examples/InstanceFailoverGroupList.json | 72 + .../examples/LedgerDigestUploadsDisable.json | 27 + .../examples/LedgerDigestUploadsEnable.json | 33 + .../examples/LedgerDigestUploadsGet.json | 23 + .../examples/LedgerDigestUploadsList.json | 27 + .../ListDataWarehouseUserActivities.json | 24 + .../examples/ListDatabaseExtensions.json | 16 + .../examples/ListDatabaseOperations.json | 45 + .../examples/ListDatabasesByElasticPool.json | 61 + .../examples/ListElasticPoolOperations.json | 45 + .../examples/ListInstancePoolUsage.json | 52 + .../ListInstancePoolUsageExpanded.json | 125 + .../ListInstancePoolsByResourceGroup.json | 53 + .../ListInstancePoolsBySubscriptionId.json | 52 + .../examples/ListJobAgentsByServer.json | 42 + .../examples/ListJobCredentialsByAgent.json | 33 + .../examples/ListJobExecutionSteps.json | 38 + .../ListJobExecutionTargetsByExecution.json | 43 + .../ListJobExecutionTargetsByStep.json | 44 + .../examples/ListJobExecutionsByAgent.json | 51 + .../ListJobExecutionsByAgentWithFilter.json | 56 + .../examples/ListJobExecutionsByJob.json | 52 + .../examples/ListJobStepsByJob.json | 82 + .../examples/ListJobStepsByVersion.json | 83 + .../examples/ListJobTargetGroups.json | 52 + .../examples/ListJobVersions.json | 28 + .../examples/ListJobsByAgent.json | 63 + .../ListManagedInstanceOperations.json | 121 + ...stRecoverableManagedDatabasesByServer.json | 32 + ...istRestorableDroppedDatabasesByServer.json | 50 + .../examples/ListServerOperations.json | 42 + ...tShortTermRetentionPoliciesByDatabase.json | 26 + .../examples/ListVCoreDatabasesByServer.json | 87 + ...istVCoreInaccessibleDatabasesByServer.json | 41 + .../LocationCapabilityListByLocation.json | 3164 +++++++++++++++++ .../examples/LongTermRetentionBackupCopy.json | 35 + .../LongTermRetentionBackupDelete.json | 14 + .../examples/LongTermRetentionBackupGet.json | 27 + ...LongTermRetentionBackupListByDatabase.json | 56 + ...LongTermRetentionBackupListByLocation.json | 54 + .../LongTermRetentionBackupListByServer.json | 55 + .../LongTermRetentionBackupUpdate.json | 32 + ...LongTermRetentionPolicyCreateOrUpdate.json | 34 + .../examples/LongTermRetentionPolicyGet.json | 25 + ...LongTermRetentionPolicyListByDatabase.json | 28 + .../ManagedColumnsListByDatabaseMax.json | 45 + .../ManagedColumnsListByDatabaseMin.json | 39 + .../examples/ManagedDatabaseColumnGet.json | 24 + .../ManagedDatabaseColumnListByTable.json | 35 + ...dDatabaseColumnSensitivityLabelCreate.json | 58 + ...dDatabaseColumnSensitivityLabelDelete.json | 16 + ...agedDatabaseColumnSensitivityLabelGet.json | 32 + ...anagedDatabaseCompleteExternalRestore.json | 16 + .../examples/ManagedDatabaseCreateMax.json | 52 + .../examples/ManagedDatabaseCreateMin.json | 43 + ...nagedDatabaseCreatePointInTimeRestore.json | 54 + .../ManagedDatabaseCreateRecovery.json | 51 + ...edDatabaseCreateRestoreExternalBackup.json | 57 + ...ManagedDatabaseCreateRestoreLtrBackup.json | 55 + .../examples/ManagedDatabaseDelete.json | 14 + .../examples/ManagedDatabaseGet.json | 25 + .../ManagedDatabaseListByManagedInstance.json | 41 + ...ommendedColumnSensitivityLabelDisable.json | 16 + ...commendedColumnSensitivityLabelEnable.json | 16 + .../ManagedDatabaseRestoreDetails.json | 33 + .../examples/ManagedDatabaseSchemaGet.json | 19 + .../ManagedDatabaseSchemaListByDatabase.json | 27 + ...ManagedDatabaseSecurityAlertCreateMax.json | 73 + ...ManagedDatabaseSecurityAlertCreateMin.json | 49 + .../ManagedDatabaseSecurityAlertGet.json | 33 + ...edDatabaseSecurityAlertListByDatabase.json | 36 + .../ManagedDatabaseSecurityEventsGetMax.json | 46 + .../ManagedDatabaseSecurityEventsGetMin.json | 89 + ...atabaseSensitivityLabelsCurrentUpdate.json | 56 + ...ensitivityLabelsListByDatabaseCurrent.json | 48 + ...tivityLabelsListByDatabaseRecommended.json | 46 + ...aseSensitivityLabelsRecommendedUpdate.json | 40 + .../examples/ManagedDatabaseTableGet.json | 20 + .../ManagedDatabaseTableListBySchema.json | 28 + .../examples/ManagedDatabaseUpdateMax.json | 34 + .../examples/ManagedDatabaseUpdateMin.json | 34 + ...abaseVulnerabilityAssessmentCreateMax.json | 60 + ...abaseVulnerabilityAssessmentCreateMin.json | 46 + ...DatabaseVulnerabilityAssessmentDelete.json | 13 + ...gedDatabaseVulnerabilityAssessmentGet.json | 29 + ...VulnerabilityAssessmentListByDatabase.json | 33 + ...erabilityAssessmentRuleBaselineCreate.json | 69 + ...erabilityAssessmentRuleBaselineDelete.json | 15 + ...ulnerabilityAssessmentRuleBaselineGet.json | 44 + ...baseVulnerabilityAssessmentScanExport.json | 34 + ...VulnerabilityAssessmentScanRecordsGet.json | 30 + ...tyAssessmentScanRecordsListByDatabase.json | 68 + ...seVulnerabilityAssessmentScansExecute.json | 15 + .../ManagedInstanceAdministratorCreate.json | 46 + .../ManagedInstanceAdministratorDelete.json | 13 + .../ManagedInstanceAdministratorGet.json | 24 + ...edInstanceAdministratorListByInstance.json | 27 + .../ManagedInstanceAdministratorUpdate.json | 46 + ...InstanceAzureADOnlyAuthCreateOrUpdate.json | 37 + .../ManagedInstanceAzureADOnlyAuthDelete.json | 14 + .../ManagedInstanceAzureADOnlyAuthGet.json | 21 + ...InstanceAzureADOnlyAuthListByInstance.json | 25 + .../examples/ManagedInstanceCreateMax.json | 131 + .../examples/ManagedInstanceCreateMin.json | 84 + .../examples/ManagedInstanceDelete.json | 13 + ...yptionProtectorCreateOrUpdateKeyVault.json | 32 + ...ProtectorCreateOrUpdateServiceManaged.json | 30 + ...ManagedInstanceEncryptionProtectorGet.json | 24 + ...anagedInstanceEncryptionProtectorList.json | 27 + ...InstanceEncryptionProtectorRevalidate.json | 13 + .../examples/ManagedInstanceGet.json | 45 + ...anceGetWithExpandEqualsAdministrators.json | 52 + .../ManagedInstanceKeyCreateOrUpdate.json | 44 + .../examples/ManagedInstanceKeyDelete.json | 14 + .../examples/ManagedInstanceKeyGet.json | 24 + .../examples/ManagedInstanceKeyList.json | 45 + .../examples/ManagedInstanceList.json | 72 + .../ManagedInstanceListByInstancePool.json | 76 + ...ncePoolWithExpandEqualsAdministrators.json | 90 + .../ManagedInstanceListByResourceGroup.json | 73 + ...ceGroupWithExpandEqualsAdministrators.json | 87 + ...nceListWithExpandEqualsAdministrators.json | 86 + ...InstanceLongTermRetentionBackupDelete.json | 14 + ...gedInstanceLongTermRetentionBackupGet.json | 27 + ...LongTermRetentionBackupListByDatabase.json | 56 + ...LongTermRetentionBackupListByInstance.json | 55 + ...LongTermRetentionBackupListByLocation.json | 54 + ...LongTermRetentionPolicyCreateOrUpdate.json | 34 + ...gedInstanceLongTermRetentionPolicyGet.json | 25 + ...LongTermRetentionPolicyListByDatabase.json | 28 + ...stancePrivateEndpointConnectionDelete.json | 14 + ...dInstancePrivateEndpointConnectionGet.json | 29 + ...InstancePrivateEndpointConnectionList.json | 48 + ...stancePrivateEndpointConnectionUpdate.json | 38 + ...anagedInstancePrivateLinkResourcesGet.json | 24 + ...nagedInstancePrivateLinkResourcesList.json | 27 + .../examples/ManagedInstanceQueryGet.json | 21 + .../ManagedInstanceQueryStatisticsList.json | 278 ++ ...ManagedInstanceQueryStatisticsListMax.json | 95 + ...ManagedInstanceQueryStatisticsListMin.json | 93 + ...nstanceRemoveMaintenanceConfiguration.json | 46 + .../ManagedInstanceTdeCertificate.json | 17 + .../examples/ManagedInstanceTimeZoneGet.json | 21 + ...ManagedInstanceTimeZoneListByLocation.json | 1266 +++++++ .../ManagedInstanceTopQueriesList.json | 238 ++ .../ManagedInstanceTopQueriesListMax.json | 241 ++ .../ManagedInstanceTopQueriesListMin.json | 25 + .../examples/ManagedInstanceUpdateMax.json | 66 + .../examples/ManagedInstanceUpdateMin.json | 48 + ...ityAssessmentCreateContainerSasKeyMin.json | 45 + ...tanceVulnerabilityAssessmentCreateMax.json | 60 + ...tyAssessmentCreateStorageAccessKeyMin.json | 45 + ...InstanceVulnerabilityAssessmentDelete.json | 12 + ...gedInstanceVulnerabilityAssessmentGet.json | 28 + ...VulnerabilityAssessmentListByInstance.json | 31 + .../ManagedServerSecurityAlertCreateMax.json | 57 + .../ManagedServerSecurityAlertCreateMin.json | 41 + .../ManagedServerSecurityAlertGet.json | 40 + ...agedServerSecurityAlertListByInstance.json | 43 + .../ManagedTransparentDataEncryptionGet.json | 22 + .../ManagedTransparentDataEncryptionList.json | 25 + ...anagedTransparentDataEncryptionUpdate.json | 37 + .../OperationsHealthListByLocation.json | 35 + .../examples/OutboundFirewallRuleCreate.json | 33 + .../examples/OutboundFirewallRuleDelete.json | 14 + .../examples/OutboundFirewallRuleGet.json | 21 + .../examples/OutboundFirewallRuleList.json | 32 + .../examples/PatchInstancePool.json | 37 + .../examples/PatchVCoreDatabase.json | 60 + ...atabaseAssignMaintenanceConfiguration.json | 60 + ...DatabaseResetMaintenanceConfiguration.json | 59 + .../examples/PauseDatabase.json | 34 + .../PrivateEndpointConnectionDelete.json | 14 + .../PrivateEndpointConnectionGet.json | 29 + .../PrivateEndpointConnectionList.json | 48 + .../PrivateEndpointConnectionUpdate.json | 38 + .../examples/PrivateLinkResourcesGet.json | 24 + .../examples/PrivateLinkResourcesList.json | 27 + ...ommendedColumnSensitivityLabelDisable.json | 16 + ...commendedColumnSensitivityLabelEnable.json | 16 + .../examples/RenameDatabase.json | 15 + .../examples/ReplicationLinkGet.json | 31 + .../ReplicationLinkListByDatabase.json | 51 + .../examples/ReplicationLinkListByServer.json | 67 + ...GroupBasedLongTermRetentionBackupCopy.json | 36 + ...oupBasedLongTermRetentionBackupDelete.json | 15 + ...eGroupBasedLongTermRetentionBackupGet.json | 28 + ...LongTermRetentionBackupListByDatabase.json | 57 + ...LongTermRetentionBackupListByLocation.json | 55 + ...edLongTermRetentionBackupListByServer.json | 56 + ...oupBasedLongTermRetentionBackupUpdate.json | 33 + ...InstanceLongTermRetentionBackupDelete.json | 15 + ...gedInstanceLongTermRetentionBackupGet.json | 28 + ...LongTermRetentionBackupListByDatabase.json | 57 + ...LongTermRetentionBackupListByInstance.json | 56 + ...LongTermRetentionBackupListByLocation.json | 55 + ...dManagedDatabaseListByManagedInstance.json | 38 + .../examples/ResumeDatabase.json | 34 + .../SensitivityLabelsCurrentUpdate.json | 58 + ...LabelsListByDatabaseWithSourceCurrent.json | 47 + ...lsListByDatabaseWithSourceRecommended.json | 45 + .../SensitivityLabelsRecommendedUpdate.json | 40 + .../examples/ServerAdvisorGet.json | 25 + .../examples/ServerAdvisorList.json | 74 + .../examples/ServerAdvisorUpdate.json | 30 + .../examples/ServerAuditingSettingsList.json | 30 + .../examples/ServerAutomaticTuningGet.json | 47 + .../ServerAutomaticTuningUpdateMax.json | 59 + .../ServerAutomaticTuningUpdateMin.json | 52 + .../examples/ServerBlobAuditingCreateMax.json | 53 + .../examples/ServerBlobAuditingCreateMin.json | 41 + .../examples/ServerBlobAuditingGet.json | 27 + .../examples/ServerCreate.json | 107 + .../examples/ServerDelete.json | 13 + .../examples/ServerDevOpsAuditCreateMax.json | 37 + .../examples/ServerDevOpsAuditCreateMin.json | 34 + .../examples/ServerDevOpsAuditGet.json | 24 + .../ServerDevOpsAuditSettingsList.json | 27 + .../examples/ServerDnsAliasAcquire.json | 25 + .../ServerDnsAliasCreateOrUpdate.json | 33 + .../examples/ServerDnsAliasDelete.json | 14 + .../examples/ServerDnsAliasGet.json | 22 + .../examples/ServerDnsAliasList.json | 33 + .../ServerExtendedAuditingSettingsList.json | 31 + .../examples/ServerGet.json | 47 + ...rverGetWithExpandEqualsAdministrators.json | 54 + .../examples/ServerKeyCreateOrUpdate.json | 46 + .../examples/ServerKeyDelete.json | 14 + .../examples/ServerKeyGet.json | 25 + .../examples/ServerKeyList.json | 48 + .../examples/ServerList.json | 78 + .../examples/ServerListByResourceGroup.json | 79 + ...ceGroupWithExpandEqualsAdministrators.json | 93 + ...verListWithExpandEqualsAdministrators.json | 92 + .../ServerRecommendedActionListExpand.json | 626 ++++ .../ServerSecurityAlertsCreateMax.json | 57 + .../ServerSecurityAlertsCreateMin.json | 45 + .../examples/ServerSecurityAlertsGet.json | 40 + .../ServerSecurityAlertsListByServer.json | 43 + .../examples/ServerTrustGroupCreate.json | 70 + .../examples/ServerTrustGroupDelete.json | 14 + .../examples/ServerTrustGroupGet.json | 32 + .../examples/ServerTrustGroupList.json | 54 + ...ServerTrustGroupListByManagedInstance.json | 54 + .../examples/ServerUpdate.json | 55 + ...ityAssessmentCreateContainerSasKeyMin.json | 45 + ...erverVulnerabilityAssessmentCreateMax.json | 60 + ...tyAssessmentCreateStorageAccessKeyMin.json | 45 + .../ServerVulnerabilityAssessmentDelete.json | 12 + .../ServerVulnerabilityAssessmentGet.json | 28 + ...erVulnerabilityAssessmentListByServer.json | 31 + .../examples/SqlAgentConfigurationGet.json | 20 + .../examples/SqlAgentConfigurationPut.json | 25 + .../examples/SqlTdeCertificateCreate.json | 18 + .../examples/SubscriptionUsageGet.json | 23 + .../SubscriptionUsageListByLocation.json | 48 + .../examples/SyncAgentCreate.json | 45 + .../examples/SyncAgentDelete.json | 14 + .../examples/SyncAgentGenerateKey.json | 16 + .../examples/SyncAgentGet.json | 25 + .../examples/SyncAgentGetLinkedDatabases.json | 28 + .../examples/SyncAgentListByServer.json | 28 + .../examples/SyncAgentUpdate.json | 45 + .../examples/SyncGroupCancelSync.json | 13 + .../examples/SyncGroupCreate.json | 56 + .../examples/SyncGroupDelete.json | 15 + .../examples/SyncGroupGet.json | 29 + .../examples/SyncGroupGetHubSchema.json | 47 + .../examples/SyncGroupGetLog.json | 37 + .../examples/SyncGroupGetSyncDatabaseId.json | 18 + .../examples/SyncGroupListByDatabase.json | 47 + .../examples/SyncGroupPatch.json | 40 + .../examples/SyncGroupRefreshHubSchema.json | 14 + .../examples/SyncGroupTriggerSync.json | 13 + .../examples/SyncGroupUpdate.json | 56 + .../examples/SyncMemberCreate.json | 61 + .../examples/SyncMemberDelete.json | 16 + .../examples/SyncMemberGet.json | 31 + .../examples/SyncMemberGetSchema.json | 48 + .../examples/SyncMemberListBySyncGroup.json | 34 + .../examples/SyncMemberPatch.json | 43 + .../examples/SyncMemberRefreshSchema.json | 15 + .../examples/SyncMemberUpdate.json | 61 + .../TransparentDataEncryptionGet.json | 22 + .../TransparentDataEncryptionList.json | 25 + .../TransparentDataEncryptionUpdate.json | 38 + .../examples/UpdateJobAgent.json | 31 + .../UpdateManagedInstanceDnsServers.json | 18 + ...UpdateManagedShortTermRetentionPolicy.json | 28 + ...tTermRetentionPolicyRestorableDropped.json | 28 + .../UpdateShortTermRetentionPolicy.json | 28 + .../examples/UpgradeDataWarehouse.json | 13 + .../examples/VirtualClusterDelete.json | 13 + .../examples/VirtualClusterGet.json | 27 + .../examples/VirtualClusterList.json | 44 + .../VirtualClusterListByResourceGroup.json | 45 + .../examples/VirtualClusterUpdate.json | 32 + .../VirtualNetworkRulesCreateOrUpdate.json | 40 + .../examples/VirtualNetworkRulesDelete.json | 14 + .../examples/VirtualNetworkRulesGet.json | 23 + .../examples/VirtualNetworkRulesList.json | 37 + specification/sql/resource-manager/readme.md | 124 +- 593 files changed, 68599 insertions(+), 5 deletions(-) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/BackupShortTermRetentionPolicies.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/BlobAuditing.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DataWarehouseUserActivities.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseAdvisors.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseAutomaticTuning.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseColumns.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseExtensions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseOperations.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseRecommendedActions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseSchemas.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseSecurityAlertPolicies.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseTables.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseUsages.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentRuleBaselines.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentScans.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessments.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Databases.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DeletedServers.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ElasticPoolOperations.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ElasticPools.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/EncryptionProtectors.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/FailoverGroups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/FirewallRules.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/InstanceFailoverGroups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/InstancePools.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobAgents.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobCredentials.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobExecutions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobStepExecutions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobSteps.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobTargetExecutions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobTargetGroups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobVersions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Jobs.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LedgerDigestUploads.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LocationCapabilities.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionBackups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionManagedInstanceBackups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionPolicies.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/MaintenanceWindowOptions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/MaintenanceWindows.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedBackupShortTermRetentionPolicies.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseColumns.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseQueries.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseRestoreDetails.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSchemas.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSecurityAlertPolicies.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSecurityEvents.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSensitivityLabels.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseTables.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseTransparentDataEncryption.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessmentScans.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessments.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabases.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceAdministrators.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceAzureADOnlyAuthentications.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceEncryptionProtectors.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceKeys.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceLongTermRetentionPolicies.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceOperations.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstancePrivateEndpointConnections.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstancePrivateLinkResources.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceTdeCertificates.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceVulnerabilityAssessments.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstances.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedServerSecurityAlertPolicies.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Operations.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/OperationsHealth.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/OutboundFirewallRules.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/PrivateEndpointConnections.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/PrivateLinkResources.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RecoverableManagedDatabases.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ReplicationLinks.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedDatabases.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedManagedDatabases.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorePoints.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SensitivityLabels.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAdvisors.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAutomaticTuning.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAzureADAdministrators.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAzureADOnlyAuthentications.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerDevOpsAudit.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerDnsAliases.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerKeys.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerOperations.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerSecurityAlertPolicies.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerTrustGroups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerVulnerabilityAssessments.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Servers.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SqlAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SubscriptionUsages.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncAgents.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncGroups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncMembers.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TdeCertificates.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TimeZones.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TransparentDataEncryptions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Usages.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/VirtualClusters.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/VirtualNetworkRules.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/WorkloadClassifiers.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/WorkloadGroups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelDatabaseOperation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelElasticPoolOperation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelJobExecution.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelManagedInstanceOperation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAvailable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerInvalid.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnsListByDatabaseMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnsListByDatabaseMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseCopyMode.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseDefaultMode.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseLedger.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseNamedReplica.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabasePITRMode.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseSecondaryMode.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateJobExecution.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateDatabaseExtensions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateInstancePoolMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateInstancePoolMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobCredential.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobExecution.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobStepMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobStepMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateMaintenanceWindows.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DataWarehouseRestorePointsGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAuditingSettingsList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseColumnGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseColumnListByTable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseExtendedAuditingSettingsList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionListExpand.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsPost.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSchemaGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSchemaListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseTableGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseTableListBySchema.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteInstancePool.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJob.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobCredential.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobStep.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobTargetGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteWorkloadClassifier.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteWorkloadGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerListBySubscription.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerRecover.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolListByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorRevalidate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExportDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExportDatabaseWithNetworkIsolation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverElasticPool.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupFailover.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverManagedInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleReplace.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDataWarehouseUserActivities.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseExtensions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseUsages.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetInstancePool.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJob.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobCredential.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecution.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecutionStep.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecutionTarget.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobStepByJob.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobStepByVersion.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobTargetGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobVersion.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetListManagedShortTermRetentionPolicy.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetMaintenanceWindowOptions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetMaintenanceWindows.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedInstanceOperation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedShortTermRetentionPolicy.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRecoverableManagedDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRestorableDroppedDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRestorableDroppedManagedDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetShortTermRetentionPolicy.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetVCoreDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadClassifier.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadClassifierList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadGroupList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportDatabaseWithNetworkIsolation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupFailover.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsDisable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsEnable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDataWarehouseUserActivities.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseExtensions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseOperations.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabasesByElasticPool.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListElasticPoolOperations.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsage.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsageExpanded.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolsByResourceGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolsBySubscriptionId.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobAgentsByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobCredentialsByAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionSteps.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionTargetsByExecution.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionTargetsByStep.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByAgentWithFilter.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByJob.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobStepsByJob.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobStepsByVersion.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobTargetGroups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobVersions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobsByAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListManagedInstanceOperations.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListRecoverableManagedDatabasesByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListRestorableDroppedDatabasesByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListServerOperations.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListVCoreDatabasesByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LocationCapabilityListByLocation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupCopy.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByLocation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedColumnsListByDatabaseMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedColumnsListByDatabaseMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnListByTable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRecovery.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseListByManagedInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRestoreDetails.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSchemaGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityEventsGetMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseTableGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseTableListBySchema.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseUpdateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseUpdateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorListByInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByInstancePool.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByResourceGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTdeCertificate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTimeZoneGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesListMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesListMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceUpdateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceUpdateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertListByInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OperationsHealthListByLocation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchInstancePool.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PauseDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateLinkResourcesGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateLinkResourcesList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RenameDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkListByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResumeDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsCurrentUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsRecommendedUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAuditingSettingsList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningUpdateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningUpdateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditSettingsList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasAcquire.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerExtendedAuditingSettingsList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListWithExpandEqualsAdministrators.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerRecommendedActionListExpand.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsListByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupListByManagedInstance.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlAgentConfigurationGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlAgentConfigurationPut.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlTdeCertificateCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SubscriptionUsageGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SubscriptionUsageListByLocation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGenerateKey.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGetLinkedDatabases.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentListByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupCancelSync.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetHubSchema.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetLog.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetSyncDatabaseId.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupPatch.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupRefreshHubSchema.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupTriggerSync.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberGetSchema.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberListBySyncGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberPatch.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberRefreshSchema.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateJobAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedInstanceDnsServers.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateShortTermRetentionPolicy.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpgradeDataWarehouse.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterList.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterListByResourceGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesList.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/BackupShortTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/BackupShortTermRetentionPolicies.json new file mode 100644 index 000000000000..5e6a3238e7a2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/BackupShortTermRetentionPolicies.json @@ -0,0 +1,332 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "BackupShortTermRetentionPolicies" + ], + "description": "Gets a database's short term retention policy.", + "operationId": "BackupShortTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policy.", + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/GetShortTermRetentionPolicy.json" + } + } + }, + "put": { + "tags": [ + "BackupShortTermRetentionPolicies" + ], + "description": "Updates a database's short term retention policy.", + "operationId": "BackupShortTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the database.": { + "$ref": "./examples/UpdateShortTermRetentionPolicy.json" + } + } + }, + "patch": { + "tags": [ + "BackupShortTermRetentionPolicies" + ], + "description": "Updates a database's short term retention policy.", + "operationId": "BackupShortTermRetentionPolicies_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the database.": { + "$ref": "./examples/UpdateShortTermRetentionPolicy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies": { + "get": { + "tags": [ + "BackupShortTermRetentionPolicies" + ], + "description": "Gets a database's short term retention policy.", + "operationId": "BackupShortTermRetentionPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policy.", + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/ListShortTermRetentionPoliciesByDatabase.json" + } + } + } + } + }, + "definitions": { + "BackupShortTermRetentionPolicyProperties": { + "description": "Properties of a short term retention policy", + "type": "object", + "properties": { + "retentionDays": { + "format": "int32", + "description": "The backup retention period in days. This is how many days Point-in-Time Restore will be supported.", + "type": "integer" + } + } + }, + "BackupShortTermRetentionPolicy": { + "description": "A short term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/BackupShortTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "BackupShortTermRetentionPolicyListResult": { + "description": "A list of short term retention policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/BlobAuditing.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/BlobAuditing.json new file mode 100644 index 000000000000..d9a6885c1311 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/BlobAuditing.json @@ -0,0 +1,1067 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Gets an extended database's blob auditing policy.", + "operationId": "ExtendedDatabaseBlobAuditingPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the extended database blob auditing policy.", + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get an extended database's blob auditing policy": { + "$ref": "./examples/ExtendedDatabaseBlobAuditingGet.json" + } + } + }, + "put": { + "tags": [ + "BlobAuditing" + ], + "description": "Creates or updates an extended database's blob auditing policy.", + "operationId": "ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The extended database blob auditing policy.", + "required": true, + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the extended database blob auditing policy.", + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 400 BlobAuditingPredicateExpressionSyntaxError - Invalid value of parameter 'predicateExpression'.\n\n * 400 InvalidDatabaseBlobAuditingPolicyCreateRequest - The create database blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingPredicateExpressionEmpty - Invalid parameter 'predicateExpression', value can not be empty.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 BlobAuditingInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 BlobAuditingStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 BlobAuditingNoServerIdentity - The server identity is not correctly configured.\n\n * 400 BlobAuditingStorageOutboundFirewallNotAllowed - Storage account is not in the list of allowed FQDNs, and, therefore, the outbound firewall rules will block the request.\n\n * 400 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\n\n * 400 BlobAuditingAdalTokenError - The operation could not get access token for the storage account because an Azure Active Directory error was encountered.\n\n * 400 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 BlobAuditingIsNotSupportedOnGeoDr - Blob auditing can be configured on primary databases only.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created the extended database blob auditing policy.", + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + } + } + }, + "x-ms-examples": { + "Create or update an extended database's blob auditing policy with minimal parameters": { + "$ref": "./examples/ExtendedDatabaseBlobAuditingCreateMin.json" + }, + "Create or update an extended database's blob auditing policy with all parameters": { + "$ref": "./examples/ExtendedDatabaseBlobAuditingCreateMax.json" + }, + "Create or update an extended database's azure monitor auditing policy with minimal parameters": { + "$ref": "./examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists extended auditing settings of a database.", + "operationId": "ExtendedDatabaseBlobAuditingPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database extended auditing settings.", + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List extended auditing settings of a database": { + "$ref": "./examples/DatabaseExtendedAuditingSettingsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Gets an extended server's blob auditing policy.", + "operationId": "ExtendedServerBlobAuditingPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the extended server blob auditing policy.", + "schema": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get a server's blob extended auditing policy": { + "$ref": "./examples/ExtendedServerBlobAuditingGet.json" + } + } + }, + "put": { + "tags": [ + "BlobAuditing" + ], + "description": "Creates or updates an extended server's blob auditing policy.", + "operationId": "ExtendedServerBlobAuditingPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "Properties of extended blob auditing policy", + "required": true, + "schema": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the extended auditing settings.", + "schema": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerBlobAuditingPolicyCreateRequest - The create server blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingPredicateExpressionEmpty - Invalid parameter 'predicateExpression', value can not be empty.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ServerBlobAuditingPolicyInProgress - Set server blob auditing is already in progress." + }, + "202": { + "description": "Updating the extended auditing settings is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a server's extended blob auditing policy with minimal parameters": { + "$ref": "./examples/ExtendedServerBlobAuditingCreateMin.json" + }, + "Update a server's extended blob auditing policy with all parameters": { + "$ref": "./examples/ExtendedServerBlobAuditingCreateMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists extended auditing settings of a server.", + "operationId": "ExtendedServerBlobAuditingPolicies_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved extended server auditing settings.", + "schema": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List extended auditing settings of a server": { + "$ref": "./examples/ServerExtendedAuditingSettingsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Gets a server's blob auditing policy.", + "operationId": "ServerBlobAuditingPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server blob auditing policy.", + "schema": { + "$ref": "#/definitions/ServerBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get a server's blob auditing policy": { + "$ref": "./examples/ServerBlobAuditingGet.json" + } + } + }, + "put": { + "tags": [ + "BlobAuditing" + ], + "description": "Creates or updates a server's blob auditing policy.", + "operationId": "ServerBlobAuditingPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "Properties of blob auditing policy", + "required": true, + "schema": { + "$ref": "#/definitions/ServerBlobAuditingPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the auditing settings.", + "schema": { + "$ref": "#/definitions/ServerBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerBlobAuditingPolicyCreateRequest - The create server blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ServerBlobAuditingPolicyInProgress - Set server blob auditing is already in progress." + }, + "202": { + "description": "Updating the auditing settings is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a server's blob auditing policy with minimal parameters": { + "$ref": "./examples/ServerBlobAuditingCreateMin.json" + }, + "Update a server's blob auditing policy with all parameters": { + "$ref": "./examples/ServerBlobAuditingCreateMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists auditing settings of a server.", + "operationId": "ServerBlobAuditingPolicies_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved server auditing settings.", + "schema": { + "$ref": "#/definitions/ServerBlobAuditingPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List auditing settings of a server": { + "$ref": "./examples/ServerAuditingSettingsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Gets a database's blob auditing policy.", + "operationId": "DatabaseBlobAuditingPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database blob auditing policy.", + "schema": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a database's blob auditing policy": { + "$ref": "./examples/DatabaseBlobAuditingGet.json" + } + } + }, + "put": { + "tags": [ + "BlobAuditing" + ], + "description": "Creates or updates a database's blob auditing policy.", + "operationId": "DatabaseBlobAuditingPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The database blob auditing policy.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the database blob auditing policy.", + "schema": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 400 InvalidDatabaseBlobAuditingPolicyCreateRequest - The create database blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 BlobAuditingInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 BlobAuditingStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 BlobAuditingNoServerIdentity - The server identity is not correctly configured.\n\n * 400 BlobAuditingStorageOutboundFirewallNotAllowed - Storage account is not in the list of allowed FQDNs, and, therefore, the outbound firewall rules will block the request.\n\n * 400 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\n\n * 400 BlobAuditingAdalTokenError - The operation could not get access token for the storage account because an Azure Active Directory error was encountered.\n\n * 400 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 BlobAuditingIsNotSupportedOnGeoDr - Blob auditing can be configured on primary databases only.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created the database blob auditing policy.", + "schema": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + } + } + }, + "x-ms-examples": { + "Create or update a database's blob auditing policy with minimal parameters": { + "$ref": "./examples/DatabaseBlobAuditingCreateMin.json" + }, + "Create or update a database's blob auditing policy with all parameters": { + "$ref": "./examples/DatabaseBlobAuditingCreateMax.json" + }, + "Create or update a database's azure monitor auditing policy with minimal parameters": { + "$ref": "./examples/DatabaseAzureMonitorAuditingCreateMin.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists auditing settings of a database.", + "operationId": "DatabaseBlobAuditingPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database auditing settings.", + "schema": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List audit settings of a database": { + "$ref": "./examples/DatabaseAuditingSettingsList.json" + } + } + } + } + }, + "definitions": { + "ExtendedDatabaseBlobAuditingPolicyProperties": { + "description": "Properties of an extended database blob auditing policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "predicateExpression": { + "description": "Specifies condition of where clause when creating an audit.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the audit logs in the storage account.", + "type": "integer" + }, + "auditActionsAndGroups": { + "description": "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)", + "type": "array", + "items": { + "type": "string" + } + }, + "isStorageSecondaryKeyInUse": { + "description": "Specifies whether storageAccountAccessKey value is the storage's secondary key.", + "type": "boolean" + }, + "isAzureMonitorTargetEnabled": { + "description": "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "queueDelayMs": { + "format": "int32", + "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", + "type": "integer" + }, + "state": { + "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "BlobAuditingPolicyState", + "modelAsString": false + } + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountSubscriptionId": { + "format": "uuid", + "description": "Specifies the blob storage subscription Id.", + "type": "string" + } + } + }, + "ExtendedDatabaseBlobAuditingPolicy": { + "description": "An extended database blob auditing policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ExtendedDatabaseBlobAuditingPolicyListResult": { + "description": "A list of database extended auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ExtendedServerBlobAuditingPolicyProperties": { + "description": "Properties of an extended server blob auditing policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "isDevopsAuditEnabled": { + "description": "Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.\r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "predicateExpression": { + "description": "Specifies condition of where clause when creating an audit.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the audit logs in the storage account.", + "type": "integer" + }, + "auditActionsAndGroups": { + "description": "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)", + "type": "array", + "items": { + "type": "string" + } + }, + "isStorageSecondaryKeyInUse": { + "description": "Specifies whether storageAccountAccessKey value is the storage's secondary key.", + "type": "boolean" + }, + "isAzureMonitorTargetEnabled": { + "description": "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "queueDelayMs": { + "format": "int32", + "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", + "type": "integer" + }, + "state": { + "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "BlobAuditingPolicyState", + "modelAsString": false + } + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountSubscriptionId": { + "format": "uuid", + "description": "Specifies the blob storage subscription Id.", + "type": "string" + } + } + }, + "ExtendedServerBlobAuditingPolicy": { + "description": "An extended server blob auditing policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ExtendedServerBlobAuditingPolicyListResult": { + "description": "A list of server extended auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerBlobAuditingPolicyProperties": { + "description": "Properties of a server blob auditing policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "isDevopsAuditEnabled": { + "description": "Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.\r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the audit logs in the storage account.", + "type": "integer" + }, + "auditActionsAndGroups": { + "description": "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)", + "type": "array", + "items": { + "type": "string" + } + }, + "isStorageSecondaryKeyInUse": { + "description": "Specifies whether storageAccountAccessKey value is the storage's secondary key.", + "type": "boolean" + }, + "isAzureMonitorTargetEnabled": { + "description": "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "queueDelayMs": { + "format": "int32", + "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", + "type": "integer" + }, + "state": { + "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "BlobAuditingPolicyState", + "modelAsString": false + } + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountSubscriptionId": { + "format": "uuid", + "description": "Specifies the blob storage subscription Id.", + "type": "string" + } + } + }, + "ServerBlobAuditingPolicy": { + "description": "A server blob auditing policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerBlobAuditingPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerBlobAuditingPolicyListResult": { + "description": "A list of server auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseBlobAuditingPolicyProperties": { + "description": "Properties of a database blob auditing policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the audit logs in the storage account.", + "type": "integer" + }, + "auditActionsAndGroups": { + "description": "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)", + "type": "array", + "items": { + "type": "string" + } + }, + "isStorageSecondaryKeyInUse": { + "description": "Specifies whether storageAccountAccessKey value is the storage's secondary key.", + "type": "boolean" + }, + "isAzureMonitorTargetEnabled": { + "description": "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "queueDelayMs": { + "format": "int32", + "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", + "type": "integer" + }, + "state": { + "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "BlobAuditingPolicyState", + "modelAsString": false + } + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountSubscriptionId": { + "format": "uuid", + "description": "Specifies the blob storage subscription Id.", + "type": "string" + } + } + }, + "DatabaseBlobAuditingPolicy": { + "description": "A database blob auditing policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseBlobAuditingPolicyListResult": { + "description": "A list of database auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "BlobAuditingPolicyNameParameter": { + "name": "blobAuditingPolicyName", + "in": "path", + "description": "The name of the blob auditing policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DataWarehouseUserActivities.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DataWarehouseUserActivities.json new file mode 100644 index 000000000000..7a75bde80df3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DataWarehouseUserActivities.json @@ -0,0 +1,199 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}": { + "get": { + "tags": [ + "DataWarehouseUserActivities" + ], + "description": "Gets the user activities of a data warehouse which includes running and suspended queries", + "operationId": "DataWarehouseUserActivities_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "dataWarehouseUserActivityName", + "in": "path", + "description": "The activity name of the data warehouse. ", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "DataWarehouseUserActivityName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get the data warehouse user activities.", + "schema": { + "$ref": "#/definitions/DataWarehouseUserActivities" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The specified resource was not found." + } + }, + "x-ms-examples": { + "Get the list of the user activities of a data warehouse": { + "$ref": "./examples/GetDataWarehouseUserActivities.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities": { + "get": { + "tags": [ + "DataWarehouseUserActivities" + ], + "description": "List the user activities of a data warehouse which includes running and suspended queries", + "operationId": "DataWarehouseUserActivities_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully list the data warehouse user activities.", + "schema": { + "$ref": "#/definitions/DataWarehouseUserActivitiesListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The specified resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List of the user activities of a data warehouse": { + "$ref": "./examples/ListDataWarehouseUserActivities.json" + } + } + } + } + }, + "definitions": { + "DataWarehouseUserActivitiesProperties": { + "description": "User activities of a data warehouse. This currently includes the count of running or suspended queries. For more information, please view the sys.dm_pdw_exec_requests dynamic management view (DMV).", + "type": "object", + "properties": { + "activeQueriesCount": { + "format": "int32", + "description": "Count of running and suspended queries.", + "type": "integer", + "readOnly": true + } + } + }, + "DataWarehouseUserActivities": { + "description": "User activities of a data warehouse", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DataWarehouseUserActivitiesProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DataWarehouseUserActivitiesListResult": { + "description": "User activities of a data warehouse", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DataWarehouseUserActivities" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseAdvisors.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseAdvisors.json new file mode 100644 index 000000000000..1a131e334215 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseAdvisors.json @@ -0,0 +1,663 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors": { + "get": { + "tags": [ + "DatabaseAdvisors" + ], + "description": "Gets a list of database advisors.", + "operationId": "DatabaseAdvisors_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of database advisors.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Advisor" + } + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "List of database advisors": { + "$ref": "./examples/DatabaseAdvisorList.json" + }, + "List of database recommended actions for all advisors": { + "$ref": "./examples/DatabaseRecommendedActionListExpand.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}": { + "get": { + "tags": [ + "DatabaseAdvisors" + ], + "description": "Gets a database advisor.", + "operationId": "DatabaseAdvisors_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Database Advisor.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved details of specified database advisor.", + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Get database advisor": { + "$ref": "./examples/DatabaseAdvisorGet.json" + } + } + }, + "patch": { + "tags": [ + "DatabaseAdvisors" + ], + "description": "Updates a database advisor.", + "operationId": "DatabaseAdvisors_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Database Advisor.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested advisor resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the specified database advisor.", + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 400 InvalidAdvisorUpsertRequest - The update advisor request body does not exist or has no properties object.\n\n * 400 InvalidAdvisorAutoExecuteStatus - Specified auto-execute status for the advisor is not allowed.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 AutomaticTuningOptionNotFound - The requested automatic tuning option was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 409 DisabledBySystem - This option is disabled by system\n\n * 409 DefaultAdvisorStateNotAllowedInCustomDbMode - DEFAULT advisor state is not allowed in CUSTOM mode\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Update database advisor": { + "$ref": "./examples/DatabaseAdvisorUpdate.json" + } + } + } + } + }, + "definitions": { + "AdvisorProperties": { + "description": "Properties for a Database, Server or Elastic Pool Advisor.", + "required": [ + "autoExecuteStatus" + ], + "type": "object", + "properties": { + "advisorStatus": { + "description": "Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'.", + "enum": [ + "GA", + "PublicPreview", + "LimitedPublicPreview", + "PrivatePreview" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AdvisorStatus", + "modelAsString": false + } + }, + "autoExecuteStatus": { + "description": "Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'", + "enum": [ + "Enabled", + "Disabled", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "AutoExecuteStatus", + "modelAsString": false + } + }, + "autoExecuteStatusInheritedFrom": { + "description": "Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level).", + "enum": [ + "Default", + "Subscription", + "Server", + "ElasticPool", + "Database" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutoExecuteStatusInheritedFrom", + "modelAsString": false + } + }, + "recommendationsStatus": { + "description": "Gets that status of recommendations for this advisor and reason for not having any recommendations. Possible values include, but are not limited to, 'Ok' (Recommendations available),LowActivity (not enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc.", + "type": "string", + "readOnly": true + }, + "lastChecked": { + "format": "date-time", + "description": "Gets the time when the current resource was analyzed for recommendations by this advisor.", + "type": "string", + "readOnly": true + }, + "recommendedActions": { + "description": "Gets the recommended actions for this advisor.", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedAction" + }, + "readOnly": true + } + } + }, + "RecommendedActionProperties": { + "description": "Properties for a Database, Server or Elastic Pool Recommended Action.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "recommendationReason": { + "description": "Gets the reason for recommending this action. e.g., DuplicateIndex", + "type": "string", + "readOnly": true + }, + "validSince": { + "format": "date-time", + "description": "Gets the time since when this recommended action is valid.", + "type": "string", + "readOnly": true + }, + "lastRefresh": { + "format": "date-time", + "description": "Gets time when this recommended action was last refreshed.", + "type": "string", + "readOnly": true + }, + "state": { + "$ref": "#/definitions/RecommendedActionStateInfo", + "description": "Gets the info of the current state the recommended action is in." + }, + "isExecutableAction": { + "description": "Gets if this recommended action is actionable by user", + "type": "boolean", + "readOnly": true + }, + "isRevertableAction": { + "description": "Gets if changes applied by this recommended action can be reverted by user", + "type": "boolean", + "readOnly": true + }, + "isArchivedAction": { + "description": "Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a new recommended action again.", + "type": "boolean", + "readOnly": true + }, + "executeActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started applying this recommended action on the user resource. e.g., index creation start time", + "type": "string", + "readOnly": true + }, + "executeActionDuration": { + "description": "Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation", + "type": "string", + "readOnly": true + }, + "revertActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started reverting changes of this recommended action on user resource. e.g., time when index drop is executed.", + "type": "string", + "readOnly": true + }, + "revertActionDuration": { + "description": "Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for dropping the created index.", + "type": "string", + "readOnly": true + }, + "executeActionInitiatedBy": { + "description": "Gets if approval for applying this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "executeActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for execution.", + "type": "string", + "readOnly": true + }, + "revertActionInitiatedBy": { + "description": "Gets if approval for reverting this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "revertActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for revert.", + "type": "string", + "readOnly": true + }, + "score": { + "format": "int32", + "description": "Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High Impact", + "type": "integer", + "readOnly": true + }, + "implementationDetails": { + "$ref": "#/definitions/RecommendedActionImplementationInfo", + "description": "Gets the implementation details of this recommended action for user to apply it manually.", + "readOnly": true + }, + "errorDetails": { + "$ref": "#/definitions/RecommendedActionErrorInfo", + "description": "Gets the error details if and why this recommended action is put to error state.", + "readOnly": true + }, + "estimatedImpact": { + "description": "Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "observedImpact": { + "description": "Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "timeSeries": { + "description": "Gets the time series info of metrics for this recommended action e.g., CPU consumption time series", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionMetricInfo" + }, + "readOnly": true + }, + "linkedObjects": { + "description": "Gets the linked objects, if any.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "details": { + "description": "Gets additional details specific to this recommended action.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true + } + } + }, + "RecommendedActionStateInfo": { + "description": "Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "required": [ + "currentValue" + ], + "type": "object", + "properties": { + "currentValue": { + "description": "Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action. ", + "enum": [ + "Active", + "Pending", + "Executing", + "Verifying", + "PendingRevert", + "RevertCancelled", + "Reverting", + "Reverted", + "Ignored", + "Expired", + "Monitoring", + "Resolved", + "Success", + "Error" + ], + "type": "string", + "x-ms-enum": { + "name": "RecommendedActionCurrentState", + "modelAsString": true + } + }, + "actionInitiatedBy": { + "description": "Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity notified system to apply the recommended action. System -> When auto-execute status of this advisor was set to 'Enabled', in which case the system applied it.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "lastModified": { + "format": "date-time", + "description": "Gets the time when the state was last modified", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionImplementationInfo": { + "description": "Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "method": { + "description": "Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell.", + "enum": [ + "TSql", + "AzurePowerShell" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ImplementationMethod", + "modelAsString": false + } + }, + "script": { + "description": "Gets the manual implementation script. e.g., T-SQL script that could be executed on the database.", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionErrorInfo": { + "description": "Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "errorCode": { + "description": "Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists", + "type": "string", + "readOnly": true + }, + "isRetryable": { + "description": "Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No", + "enum": [ + "Yes", + "No" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "IsRetryable", + "modelAsString": false + } + } + } + }, + "RecommendedActionImpactRecord": { + "description": "Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "dimensionName": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "absoluteValue": { + "format": "double", + "description": "Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected", + "type": "number", + "readOnly": true + }, + "changeValueAbsolute": { + "format": "double", + "description": "Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes", + "type": "number", + "readOnly": true + }, + "changeValueRelative": { + "format": "double", + "description": "Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedActionMetricInfo": { + "description": "Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "metricName": { + "description": "Gets the name of the metric. e.g., CPU, Number of Queries.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the unit in which metric is measured. e.g., DTU, Frequency", + "type": "string", + "readOnly": true + }, + "timeGrain": { + "description": "Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour)", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Gets the start time of time interval given by this MetricInfo.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "double", + "description": "Gets the value of the metric in the time interval given by this MetricInfo.", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedAction": { + "description": "Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/RecommendedActionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "Advisor": { + "description": "Database, Server or Elastic Pool Advisor.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/AdvisorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseAutomaticTuning.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseAutomaticTuning.json new file mode 100644 index 000000000000..6bdb4524d017 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseAutomaticTuning.json @@ -0,0 +1,259 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current": { + "get": { + "tags": [ + "DatabaseAutomaticTuning" + ], + "description": "Gets a database's automatic tuning.", + "operationId": "DatabaseAutomaticTuning_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database automatic tuning properties.", + "schema": { + "$ref": "#/definitions/DatabaseAutomaticTuning" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 SystemDatabasesNotSupported - User tried to get automatic tuning information on system databases.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Get a database's automatic tuning settings": { + "$ref": "./examples/DatabaseAutomaticTuningGet.json" + } + } + }, + "patch": { + "tags": [ + "DatabaseAutomaticTuning" + ], + "description": "Update automatic tuning properties for target database.", + "operationId": "DatabaseAutomaticTuning_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested automatic tuning resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseAutomaticTuning" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the specified database automatic tuning settings.", + "schema": { + "$ref": "#/definitions/DatabaseAutomaticTuning" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 SystemDatabasesNotSupported - User tried to get automatic tuning information on system databases.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 400 InvalidAutomaticTuningUpsertRequest - The update automatic tuning request body does not exist or has no properties object.\n\n * 400 InvalidAdvisorAutoExecuteStatus - Specified auto-execute status for the advisor is not allowed.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 AutomaticTuningOptionNotFound - The requested automatic tuning option was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 DisabledBySystem - This option is disabled by system\n\n * 409 DefaultAdvisorStateNotAllowedInCustomDbMode - DEFAULT advisor state is not allowed in CUSTOM mode\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Updates database automatic tuning settings with minimal properties": { + "$ref": "./examples/DatabaseAutomaticTuningUpdateMin.json" + }, + "Updates database automatic tuning settings with all properties": { + "$ref": "./examples/DatabaseAutomaticTuningUpdateMax.json" + } + } + } + } + }, + "definitions": { + "DatabaseAutomaticTuningProperties": { + "description": "Database-level Automatic Tuning properties.", + "type": "object", + "properties": { + "desiredState": { + "description": "Automatic tuning desired state.", + "enum": [ + "Inherit", + "Custom", + "Auto", + "Unspecified" + ], + "type": "string", + "x-ms-enum": { + "name": "AutomaticTuningMode", + "modelAsString": false + } + }, + "actualState": { + "description": "Automatic tuning actual state.", + "enum": [ + "Inherit", + "Custom", + "Auto", + "Unspecified" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningMode", + "modelAsString": false + } + }, + "options": { + "description": "Automatic tuning options definition.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AutomaticTuningOptions" + } + } + } + }, + "AutomaticTuningOptions": { + "description": "Automatic tuning properties for individual advisors.", + "type": "object", + "properties": { + "desiredState": { + "description": "Automatic tuning option desired state.", + "enum": [ + "Off", + "On", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "AutomaticTuningOptionModeDesired", + "modelAsString": false + } + }, + "actualState": { + "description": "Automatic tuning option actual state.", + "enum": [ + "Off", + "On" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningOptionModeActual", + "modelAsString": false + } + }, + "reasonCode": { + "format": "int32", + "description": "Reason code if desired and actual state are different.", + "type": "integer", + "readOnly": true + }, + "reasonDesc": { + "description": "Reason description if desired and actual state are different.", + "enum": [ + "Default", + "Disabled", + "AutoConfigured", + "InheritedFromServer", + "QueryStoreOff", + "QueryStoreReadOnly", + "NotSupported" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningDisabledReason", + "modelAsString": false + } + } + } + }, + "DatabaseAutomaticTuning": { + "description": "Database-level Automatic Tuning.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseAutomaticTuningProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseColumns.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseColumns.json new file mode 100644 index 000000000000..aacf9059d90f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseColumns.json @@ -0,0 +1,382 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/columns": { + "get": { + "tags": [ + "DatabaseColumns" + ], + "description": "List database columns", + "operationId": "DatabaseColumns_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schema", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "table", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "column", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "$skiptoken", + "in": "query", + "description": "An opaque token that identifies a starting point in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database columns.", + "schema": { + "$ref": "#/definitions/DatabaseColumnListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UnsupportedColumnOrderByProperty - The order-by property '{0}' is not supported. Allowed properties are: {1}.\n\n * 400 UnsupportedColumnSortDirection - The column sort direction '{0}' is not supported. Allowed values are: {1}.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database columns": { + "$ref": "./examples/ColumnsListByDatabaseMin.json" + }, + "Filter database columns": { + "$ref": "./examples/ColumnsListByDatabaseMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns": { + "get": { + "tags": [ + "DatabaseColumns" + ], + "description": "List database columns", + "operationId": "DatabaseColumns_ListByTable", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database columns.", + "schema": { + "$ref": "#/definitions/DatabaseColumnListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseColumn", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database columns": { + "$ref": "./examples/DatabaseColumnListByTable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}": { + "get": { + "tags": [ + "DatabaseColumns" + ], + "description": "Get database column", + "operationId": "DatabaseColumns_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database column.", + "schema": { + "$ref": "#/definitions/DatabaseColumn" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get database column": { + "$ref": "./examples/DatabaseColumnGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseColumnListResult": { + "description": "A list of database columns.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseColumn" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseColumnProperties": { + "description": "Database column properties.", + "type": "object", + "properties": { + "columnType": { + "description": "The column data type.", + "enum": [ + "image", + "text", + "uniqueidentifier", + "date", + "time", + "datetime2", + "datetimeoffset", + "tinyint", + "smallint", + "int", + "smalldatetime", + "real", + "money", + "datetime", + "float", + "sql_variant", + "ntext", + "bit", + "decimal", + "numeric", + "smallmoney", + "bigint", + "hierarchyid", + "geometry", + "geography", + "varbinary", + "varchar", + "binary", + "char", + "timestamp", + "nvarchar", + "nchar", + "xml", + "sysname" + ], + "type": "string", + "x-ms-enum": { + "name": "ColumnDataType", + "modelAsString": true + } + }, + "temporalType": { + "description": "The table temporal type.", + "enum": [ + "NonTemporalTable", + "HistoryTable", + "SystemVersionedTemporalTable" + ], + "type": "string", + "x-ms-enum": { + "name": "TableTemporalType", + "modelAsString": true + } + }, + "memoryOptimized": { + "description": "Whether or not the column belongs to a memory optimized table.", + "type": "boolean" + }, + "isComputed": { + "description": "Whether or not the column is computed.", + "type": "boolean" + } + } + }, + "DatabaseColumn": { + "description": "A database column resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseColumnProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseExtensions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseExtensions.json new file mode 100644 index 000000000000..33f1c9e70796 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseExtensions.json @@ -0,0 +1,348 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}": { + "get": { + "tags": [ + "DatabaseExtensions" + ], + "description": "Gets a database extension. This will return resource not found as it is not supported.", + "operationId": "DatabaseExtensions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "extensionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Get extensions import/export operation. This will return resource not found as it is not supported." + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-examples": { + "Get database extensions.": { + "$ref": "./examples/GetDatabaseExtensions.json" + } + } + }, + "put": { + "tags": [ + "DatabaseExtensions" + ], + "description": "Perform a database extension operation, like polybase import", + "operationId": "DatabaseExtensions_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "extensionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The database import request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseExtensions" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed import/export operation.", + "schema": { + "$ref": "#/definitions/ImportExportExtensionsOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database." + }, + "202": { + "description": "Import/Export operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or Update database extensions.": { + "$ref": "./examples/CreateOrUpdateDatabaseExtensions.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions": { + "get": { + "tags": [ + "DatabaseExtensions" + ], + "description": "List database extension. This will return an empty list as it is not supported.", + "operationId": "DatabaseExtensions_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List extensions import/export operations. This will return an empty list as it is not supported.", + "schema": { + "$ref": "#/definitions/ImportExportExtensionsOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database extensions.": { + "$ref": "./examples/ListDatabaseExtensions.json" + } + } + } + } + }, + "definitions": { + "DatabaseExtensionsProperties": { + "description": "Contains the database information after successful export.", + "required": [ + "operationMode", + "storageKeyType", + "storageKey", + "storageUri" + ], + "type": "object", + "properties": { + "operationMode": { + "description": "Operation Mode.", + "enum": [ + "PolybaseImport" + ], + "type": "string", + "x-ms-enum": { + "name": "OperationMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageKeyType": { + "description": "Storage key type.", + "enum": [ + "SharedAccessKey", + "StorageAccessKey" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageKey": { + "description": "Storage key.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageUri": { + "description": "Storage Uri.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + } + } + }, + "DatabaseExtensions": { + "description": "An export managed database operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseExtensionsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ImportExportExtensionsOperationResultProperties": { + "description": "Contains the operation result properties for import/export operation.", + "type": "object", + "properties": { + "requestId": { + "format": "uuid", + "description": "Request Id.", + "type": "string", + "readOnly": true + }, + "requestType": { + "description": "Request type.", + "type": "string", + "readOnly": true + }, + "lastModifiedTime": { + "description": "Last modified time.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "Database name.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Operation status.", + "type": "string", + "readOnly": true + }, + "errorMessage": { + "description": "Error message.", + "type": "string", + "readOnly": true + } + } + }, + "ImportExportExtensionsOperationResult": { + "description": "An Extension operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ImportExportExtensionsOperationResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ImportExportExtensionsOperationListResult": { + "description": "Import export operation extensions list.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ImportExportExtensionsOperationResult" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseOperations.json new file mode 100644 index 000000000000..bd3eaf85e8f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseOperations.json @@ -0,0 +1,271 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel": { + "post": { + "tags": [ + "DatabaseOperations" + ], + "description": "Cancels the asynchronous operation on the database.", + "operationId": "DatabaseOperations_Cancel", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "operationId", + "in": "path", + "description": "The operation identifier.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for cancel has been executed successfully." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Cancel the database management operation": { + "$ref": "./examples/CancelDatabaseOperation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations": { + "get": { + "tags": [ + "DatabaseOperations" + ], + "description": "Gets a list of operations performed on the database.", + "operationId": "DatabaseOperations_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for getting database operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/DatabaseOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the database management operations": { + "$ref": "./examples/ListDatabaseOperations.json" + } + } + } + } + }, + "definitions": { + "DatabaseOperationListResult": { + "description": "The response to a list database operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseOperationProperties": { + "description": "The properties of a database operation.", + "type": "object", + "properties": { + "databaseName": { + "description": "The name of the database the operation is being performed on.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "serverName": { + "description": "The name of the server.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagementOperationState", + "modelAsString": true + } + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + } + } + }, + "DatabaseOperation": { + "description": "A database operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseRecommendedActions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseRecommendedActions.json new file mode 100644 index 000000000000..9cb383a351c6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseRecommendedActions.json @@ -0,0 +1,576 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions": { + "get": { + "tags": [ + "DatabaseRecommendedActions" + ], + "description": "Gets list of Database Recommended Actions.", + "operationId": "DatabaseRecommendedActions_ListByDatabaseAdvisor", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Database Advisor.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of database recommended actions.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedAction" + } + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "List of database recommended actions": { + "$ref": "./examples/DatabaseRecommendedActionList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}": { + "get": { + "tags": [ + "DatabaseRecommendedActions" + ], + "description": "Gets a database recommended action.", + "operationId": "DatabaseRecommendedActions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Database Advisor.", + "required": true, + "type": "string" + }, + { + "name": "recommendedActionName", + "in": "path", + "description": "The name of Database Recommended Action.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved details of specified database recommended action.", + "schema": { + "$ref": "#/definitions/RecommendedAction" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Get database recommended action": { + "$ref": "./examples/DatabaseRecommendedActionGet.json" + } + } + }, + "patch": { + "tags": [ + "DatabaseRecommendedActions" + ], + "description": "Updates a database recommended action.", + "operationId": "DatabaseRecommendedActions_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Database Advisor.", + "required": true, + "type": "string" + }, + { + "name": "recommendedActionName", + "in": "path", + "description": "The name of Database Recommended Action.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested recommended action resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/RecommendedAction" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the specified database recommended action.", + "schema": { + "$ref": "#/definitions/RecommendedAction" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidRecommendedActionUpsertRequest - The update recommended action request body does not exist or has no properties or state object.\n\n * 400 InvalidRecommendedActionState - The specified state for recommended action is invalid\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Update database recommended action": { + "$ref": "./examples/DatabaseRecommendedActionUpdate.json" + } + } + } + } + }, + "definitions": { + "RecommendedActionProperties": { + "description": "Properties for a Database, Server or Elastic Pool Recommended Action.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "recommendationReason": { + "description": "Gets the reason for recommending this action. e.g., DuplicateIndex", + "type": "string", + "readOnly": true + }, + "validSince": { + "format": "date-time", + "description": "Gets the time since when this recommended action is valid.", + "type": "string", + "readOnly": true + }, + "lastRefresh": { + "format": "date-time", + "description": "Gets time when this recommended action was last refreshed.", + "type": "string", + "readOnly": true + }, + "state": { + "$ref": "#/definitions/RecommendedActionStateInfo", + "description": "Gets the info of the current state the recommended action is in." + }, + "isExecutableAction": { + "description": "Gets if this recommended action is actionable by user", + "type": "boolean", + "readOnly": true + }, + "isRevertableAction": { + "description": "Gets if changes applied by this recommended action can be reverted by user", + "type": "boolean", + "readOnly": true + }, + "isArchivedAction": { + "description": "Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a new recommended action again.", + "type": "boolean", + "readOnly": true + }, + "executeActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started applying this recommended action on the user resource. e.g., index creation start time", + "type": "string", + "readOnly": true + }, + "executeActionDuration": { + "description": "Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation", + "type": "string", + "readOnly": true + }, + "revertActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started reverting changes of this recommended action on user resource. e.g., time when index drop is executed.", + "type": "string", + "readOnly": true + }, + "revertActionDuration": { + "description": "Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for dropping the created index.", + "type": "string", + "readOnly": true + }, + "executeActionInitiatedBy": { + "description": "Gets if approval for applying this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "executeActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for execution.", + "type": "string", + "readOnly": true + }, + "revertActionInitiatedBy": { + "description": "Gets if approval for reverting this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "revertActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for revert.", + "type": "string", + "readOnly": true + }, + "score": { + "format": "int32", + "description": "Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High Impact", + "type": "integer", + "readOnly": true + }, + "implementationDetails": { + "$ref": "#/definitions/RecommendedActionImplementationInfo", + "description": "Gets the implementation details of this recommended action for user to apply it manually.", + "readOnly": true + }, + "errorDetails": { + "$ref": "#/definitions/RecommendedActionErrorInfo", + "description": "Gets the error details if and why this recommended action is put to error state.", + "readOnly": true + }, + "estimatedImpact": { + "description": "Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "observedImpact": { + "description": "Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "timeSeries": { + "description": "Gets the time series info of metrics for this recommended action e.g., CPU consumption time series", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionMetricInfo" + }, + "readOnly": true + }, + "linkedObjects": { + "description": "Gets the linked objects, if any.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "details": { + "description": "Gets additional details specific to this recommended action.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true + } + } + }, + "RecommendedActionStateInfo": { + "description": "Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "required": [ + "currentValue" + ], + "type": "object", + "properties": { + "currentValue": { + "description": "Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action. ", + "enum": [ + "Active", + "Pending", + "Executing", + "Verifying", + "PendingRevert", + "RevertCancelled", + "Reverting", + "Reverted", + "Ignored", + "Expired", + "Monitoring", + "Resolved", + "Success", + "Error" + ], + "type": "string", + "x-ms-enum": { + "name": "RecommendedActionCurrentState", + "modelAsString": true + } + }, + "actionInitiatedBy": { + "description": "Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity notified system to apply the recommended action. System -> When auto-execute status of this advisor was set to 'Enabled', in which case the system applied it.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "lastModified": { + "format": "date-time", + "description": "Gets the time when the state was last modified", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionImplementationInfo": { + "description": "Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "method": { + "description": "Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell.", + "enum": [ + "TSql", + "AzurePowerShell" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ImplementationMethod", + "modelAsString": false + } + }, + "script": { + "description": "Gets the manual implementation script. e.g., T-SQL script that could be executed on the database.", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionErrorInfo": { + "description": "Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "errorCode": { + "description": "Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists", + "type": "string", + "readOnly": true + }, + "isRetryable": { + "description": "Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No", + "enum": [ + "Yes", + "No" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "IsRetryable", + "modelAsString": false + } + } + } + }, + "RecommendedActionImpactRecord": { + "description": "Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "dimensionName": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "absoluteValue": { + "format": "double", + "description": "Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected", + "type": "number", + "readOnly": true + }, + "changeValueAbsolute": { + "format": "double", + "description": "Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes", + "type": "number", + "readOnly": true + }, + "changeValueRelative": { + "format": "double", + "description": "Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedActionMetricInfo": { + "description": "Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "metricName": { + "description": "Gets the name of the metric. e.g., CPU, Number of Queries.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the unit in which metric is measured. e.g., DTU, Frequency", + "type": "string", + "readOnly": true + }, + "timeGrain": { + "description": "Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour)", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Gets the start time of time interval given by this MetricInfo.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "double", + "description": "Gets the value of the metric in the time interval given by this MetricInfo.", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedAction": { + "description": "Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/RecommendedActionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseSchemas.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseSchemas.json new file mode 100644 index 000000000000..069826456881 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseSchemas.json @@ -0,0 +1,182 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas": { + "get": { + "tags": [ + "DatabaseSchemas" + ], + "description": "List database schemas", + "operationId": "DatabaseSchemas_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database schemas.", + "schema": { + "$ref": "#/definitions/DatabaseSchemaListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseSchema", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database schemas": { + "$ref": "./examples/DatabaseSchemaListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}": { + "get": { + "tags": [ + "DatabaseSchemas" + ], + "description": "Get database schema", + "operationId": "DatabaseSchemas_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database schema.", + "schema": { + "$ref": "#/definitions/DatabaseSchema" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get database schema": { + "$ref": "./examples/DatabaseSchemaGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseSchema": { + "description": "A database schema resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": {} + }, + "DatabaseSchemaListResult": { + "description": "A list of database schemas.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSchema" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseSecurityAlertPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseSecurityAlertPolicies.json new file mode 100644 index 000000000000..08e598bc76ff --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseSecurityAlertPolicies.json @@ -0,0 +1,329 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}": { + "get": { + "tags": [ + "DatabaseSecurityAlertPolicies" + ], + "description": "Gets a database's security alert policy.", + "operationId": "DatabaseSecurityAlertPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database security alert policy.", + "schema": { + "$ref": "#/definitions/DatabaseSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 InvalidDatabaseSecurityAlertPolicyCreateRequest - The create database Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 DatabaseSecurityAlertPolicyInProgress - Set database security alert policy is already in progress\n\n * 409 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetDatabaseSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-examples": { + "Get a database's threat detection policy": { + "$ref": "./examples/DatabaseSecurityAlertGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseSecurityAlertPolicies" + ], + "description": "Creates or updates a database's security alert policy.", + "operationId": "DatabaseSecurityAlertPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The database security alert policy.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSecurityAlertPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the database security alert policy.", + "schema": { + "$ref": "#/definitions/DatabaseSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 InvalidDatabaseSecurityAlertPolicyCreateRequest - The create database Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 DatabaseSecurityAlertPolicyInProgress - Set database security alert policy is already in progress\n\n * 409 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetDatabaseSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + }, + "201": { + "description": "Successfully created the database security alert policy.", + "schema": { + "$ref": "#/definitions/DatabaseSecurityAlertPolicy" + } + } + }, + "x-ms-examples": { + "Update a database's threat detection policy with minimal parameters": { + "$ref": "./examples/DatabaseSecurityAlertCreateMin.json" + }, + "Update a database's threat detection policy with all parameters": { + "$ref": "./examples/DatabaseSecurityAlertCreateMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies": { + "get": { + "tags": [ + "DatabaseSecurityAlertPolicies" + ], + "description": "Gets a list of database's security alert policies.", + "operationId": "DatabaseSecurityAlertPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database security alert policy.", + "schema": { + "$ref": "#/definitions/DatabaseSecurityAlertListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 InvalidDatabaseSecurityAlertPolicyCreateRequest - The create database Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 DatabaseSecurityAlertPolicyInProgress - Set database security alert policy is already in progress\n\n * 409 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetDatabaseSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the database's threat detection policies": { + "$ref": "./examples/DatabaseSecurityAlertListByDatabase.json" + } + } + } + } + }, + "definitions": { + "SecurityAlertsPolicyProperties": { + "description": "Properties of a security alert policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SecurityAlertsPolicyState", + "modelAsString": false + } + }, + "disabledAlerts": { + "description": "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAddresses": { + "description": "Specifies an array of e-mail addresses to which the alert is sent.", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAccountAdmins": { + "description": "Specifies that the alert is sent to the account administrators.", + "type": "boolean" + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the Threat Detection audit storage account.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the Threat Detection audit logs.", + "type": "integer" + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSecurityAlertPolicy": { + "description": "A database security alert policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SecurityAlertPolicyResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SecurityAlertsPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSecurityAlertListResult": { + "description": "A list of the database's security alert policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSecurityAlertPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseTables.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseTables.json new file mode 100644 index 000000000000..7e6f02df3614 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseTables.json @@ -0,0 +1,225 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables": { + "get": { + "tags": [ + "DatabaseTables" + ], + "description": "List database tables", + "operationId": "DatabaseTables_ListBySchema", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database tables.", + "schema": { + "$ref": "#/definitions/DatabaseTableListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseTable", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database tables": { + "$ref": "./examples/DatabaseTableListBySchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}": { + "get": { + "tags": [ + "DatabaseTables" + ], + "description": "Get database table", + "operationId": "DatabaseTables_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database table.", + "schema": { + "$ref": "#/definitions/DatabaseTable" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get database table": { + "$ref": "./examples/DatabaseTableGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseTableProperties": { + "description": "Database table properties.", + "type": "object", + "properties": { + "temporalType": { + "description": "The table temporal type.", + "enum": [ + "NonTemporalTable", + "HistoryTable", + "SystemVersionedTemporalTable" + ], + "type": "string", + "x-ms-enum": { + "name": "TableTemporalType", + "modelAsString": true + } + }, + "memoryOptimized": { + "description": "Whether or not the table is memory optimized.", + "type": "boolean" + } + } + }, + "DatabaseTable": { + "description": "A database table resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseTableProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseTableListResult": { + "description": "A list of database tables.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseTable" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseUsages.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseUsages.json new file mode 100644 index 000000000000..dee0a720138c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseUsages.json @@ -0,0 +1,159 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages": { + "get": { + "tags": [ + "DatabaseUsages" + ], + "description": "Gets database usages.", + "operationId": "DatabaseUsages_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database usages.", + "schema": { + "$ref": "#/definitions/DatabaseUsageListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets database usages.": { + "$ref": "./examples/GetDatabaseUsages.json" + } + } + } + } + }, + "definitions": { + "DatabaseUsageListResult": { + "description": "A list of database usage metrics.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseUsage" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseUsageProperties": { + "description": "Properties of a database usage.", + "type": "object", + "properties": { + "displayName": { + "description": "User-readable name of the metric.", + "type": "string", + "readOnly": true + }, + "currentValue": { + "format": "double", + "description": "Current value of the metric.", + "type": "number", + "readOnly": true + }, + "limit": { + "format": "double", + "description": "Boundary value of the metric.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit of the metric.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseUsage": { + "description": "Usage metric of a database.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseUsageProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentRuleBaselines.json new file mode 100644 index 000000000000..2f87d61f7657 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentRuleBaselines.json @@ -0,0 +1,339 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}": { + "get": { + "tags": [ + "DatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Gets a database's vulnerability assessment rule baseline.", + "operationId": "DatabaseVulnerabilityAssessmentRuleBaselines_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Creates or updates a database's vulnerability assessment rule baseline.", + "operationId": "DatabaseVulnerabilityAssessmentRuleBaselines_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Creates or updates a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json" + } + } + }, + "delete": { + "tags": [ + "DatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Removes the database's vulnerability assessment rule baseline.", + "operationId": "DatabaseVulnerabilityAssessmentRuleBaselines_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment rule baseline." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Removes a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Vulnerability Assessment rule baseline.", + "required": [ + "baselineResults" + ], + "type": "object", + "properties": { + "baselineResults": { + "description": "The rule baseline result", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineItem" + } + } + } + }, + "DatabaseVulnerabilityAssessmentRuleBaselineItem": { + "description": "Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result.", + "required": [ + "result" + ], + "type": "object", + "properties": { + "result": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DatabaseVulnerabilityAssessmentRuleBaseline": { + "description": "A database vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentScans.json new file mode 100644 index 000000000000..20b3cc6bba80 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentScans.json @@ -0,0 +1,458 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan": { + "post": { + "tags": [ + "DatabaseVulnerabilityAssessmentScans" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "DatabaseVulnerabilityAssessmentScans_InitiateScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidVulnerabilityAssessmentScanIdLength - The vulnerability assessment scan ID length must be below {0} characters.\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentScansExecute.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans": { + "get": { + "tags": [ + "DatabaseVulnerabilityAssessmentScans" + ], + "description": "Lists the vulnerability assessment scans of a database.", + "operationId": "DatabaseVulnerabilityAssessmentScans_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan records.", + "schema": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecordListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the list of a database vulnerability assessment scan records": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { + "get": { + "tags": [ + "DatabaseVulnerabilityAssessmentScans" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "DatabaseVulnerabilityAssessmentScans_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan record.", + "schema": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database vulnerability assessment scan record by scan ID": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export": { + "post": { + "tags": [ + "DatabaseVulnerabilityAssessmentScans" + ], + "description": "Convert an existing scan result to a human readable format. If already exists nothing happens", + "operationId": "DatabaseVulnerabilityAssessmentScans_Export", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the scanned database.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Scan result was converted successfully.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Scan result was converted successfully.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" + } + } + }, + "x-ms-examples": { + "Export a database's vulnerability assessment scan results.": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentScanExport.json" + } + } + } + } + }, + "definitions": { + "VulnerabilityAssessmentScanRecordListResult": { + "description": "A list of vulnerability assessment scan records.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanRecordProperties": { + "description": "Properties of a vulnerability assessment scan record.", + "type": "object", + "properties": { + "scanId": { + "description": "The scan ID.", + "type": "string", + "readOnly": true + }, + "triggerType": { + "description": "The scan trigger type.", + "enum": [ + "OnDemand", + "Recurring" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanTriggerType", + "modelAsString": true + } + }, + "state": { + "description": "The scan status.", + "enum": [ + "Passed", + "Failed", + "FailedToRun", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanState", + "modelAsString": true + } + }, + "startTime": { + "format": "date-time", + "description": "The scan start time (UTC).", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The scan end time (UTC).", + "type": "string", + "readOnly": true + }, + "errors": { + "description": "The scan errors.", + "type": "array", + "items": { + "$ref": "#/definitions/VulnerabilityAssessmentScanError" + }, + "readOnly": true + }, + "storageContainerPath": { + "description": "The scan results storage container path.", + "type": "string", + "readOnly": true + }, + "numberOfFailedSecurityChecks": { + "format": "int32", + "description": "The number of failed security checks.", + "type": "integer", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanError": { + "description": "Properties of a vulnerability assessment scan error.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanRecord": { + "description": "A vulnerability assessment scan record.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecordProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseVulnerabilityAssessmentScanExportProperties": { + "description": "Properties of the export operation's result.", + "type": "object", + "properties": { + "exportedReportLocation": { + "description": "Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx).", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseVulnerabilityAssessmentScansExport": { + "description": "A database Vulnerability Assessment scan export resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScanExportProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessments.json new file mode 100644 index 000000000000..e582015d7b01 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessments.json @@ -0,0 +1,377 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "DatabaseVulnerabilityAssessments" + ], + "description": "Gets the database's vulnerability assessment.", + "operationId": "DatabaseVulnerabilityAssessments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a database's vulnerability assessment": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseVulnerabilityAssessments" + ], + "description": "Creates or updates the database's vulnerability assessment.", + "operationId": "DatabaseVulnerabilityAssessments_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a database's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json" + }, + "Create a database's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json" + }, + "Create a database's vulnerability assessment with all parameters": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "DatabaseVulnerabilityAssessments" + ], + "description": "Removes the database's vulnerability assessment.", + "operationId": "DatabaseVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Remove a database's vulnerability assessment": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments": { + "get": { + "tags": [ + "DatabaseVulnerabilityAssessments" + ], + "description": "Lists the vulnerability assessment policies associated with a database.", + "operationId": "DatabaseVulnerabilityAssessments_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment policies are defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment policies.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the database's vulnerability assessment policies": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentListByDatabase.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessmentProperties": { + "description": "Properties of a database Vulnerability Assessment.", + "type": "object", + "properties": { + "storageContainerPath": { + "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn't set", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageContainerSasKey": { + "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "recurringScans": { + "$ref": "#/definitions/VulnerabilityAssessmentRecurringScansProperties", + "description": "The recurring scans settings" + } + } + }, + "VulnerabilityAssessmentRecurringScansProperties": { + "description": "Properties of a Vulnerability Assessment recurring scans.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Recurring scans state.", + "type": "boolean" + }, + "emailSubscriptionAdmins": { + "description": "Specifies that the schedule scan notification will be is sent to the subscription administrators.", + "default": true, + "type": "boolean" + }, + "emails": { + "description": "Specifies an array of e-mail addresses to which the scan notification is sent.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DatabaseVulnerabilityAssessment": { + "description": "A database vulnerability assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseVulnerabilityAssessmentListResult": { + "description": "A list of the database's vulnerability assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Databases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Databases.json new file mode 100644 index 000000000000..c2f90589d73d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Databases.json @@ -0,0 +1,1466 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases": { + "get": { + "tags": [ + "Databases" + ], + "description": "Gets a list of databases.", + "operationId": "Databases_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of databases.", + "schema": { + "$ref": "#/definitions/DatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of databases.": { + "$ref": "./examples/ListVCoreDatabasesByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}": { + "get": { + "tags": [ + "Databases" + ], + "description": "Gets a database.", + "operationId": "Databases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a database.": { + "$ref": "./examples/GetVCoreDatabase.json" + } + } + }, + "put": { + "tags": [ + "Databases" + ], + "description": "Creates a new database or updates an existing database.", + "operationId": "Databases_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested database resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/Database" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingMaxSizeBytes - MaxSizeBytes is required.\n\n * 400 MissingSkuName - Sku name is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 InvalidLicenseType - The specified license type is invalid.\n\n * 400 InvalidSkuName - Invalid SKU name.\n\n * 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.\n\n * 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.\n\n * 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.\n\n * 400 LedgerNotAllowedWithSpecifiedCreateMode - IsLedgerOn is not allowed with the specified create mode.\n\n * 400 DatabaseNameDoesNotMatchSourceDatabaseId - The database name specified doesn’t match the database name in sourceDatabaseId.\n\n * 400 ElasticPoolNotSupportedForExternalBackupRestore - Elastic pool is not supported for external backup restore\n\n * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.\n\n * 400 InvalidRecoveryServicesRecoveryPointId - Invalid recovery services recovery point identifier.\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 MissingRecoverableDatabaseId - Missing recoverable database identifier.\n\n * 400 MissingRecoveryServicesRecoveryPointId - Missing recovery services recovery point Id.\n\n * 400 MissingRestorableDroppedDatabaseId - Missing restorableDroppedDatabaseId\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingSourceDatabaseDeletionDate - Missing source database deletion date\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Creating or updating the database is in progress." + }, + "201": { + "description": "Successfully created the database.", + "schema": { + "$ref": "#/definitions/Database" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates a database with default mode.": { + "$ref": "./examples/CreateDatabaseDefaultMode.json" + }, + "Creates a VCore database by specifying service objective name.": { + "$ref": "./examples/CreateVCoreDatabaseByServiceObjective.json" + }, + "Creates a VCore database by specifying sku name and capacity.": { + "$ref": "./examples/CreateVCoreDatabaseBySkuNameCapacity.json" + }, + "Creates a database with minimum number of parameters.": { + "$ref": "./examples/CreateDatabaseMin.json" + }, + "Creates a database as a copy.": { + "$ref": "./examples/CreateDatabaseCopyMode.json" + }, + "Creates a database as an on-line secondary.": { + "$ref": "./examples/CreateDatabaseSecondaryMode.json" + }, + "Creates a database as named replica secondary.": { + "$ref": "./examples/CreateDatabaseNamedReplica.json" + }, + "Creates a database from PointInTimeRestore.": { + "$ref": "./examples/CreateDatabasePITRMode.json" + }, + "Creates a database with preferred maintenance window.": { + "$ref": "./examples/CreateDatabaseMaintenanceConfiguration.json" + }, + "Creates a database with specified backup storage redundancy.": { + "$ref": "./examples/CreateDatabaseConfiguredBackupStorageRedundancy.json" + }, + "Creates a database with ledger on.": { + "$ref": "./examples/CreateDatabaseLedger.json" + } + } + }, + "delete": { + "tags": [ + "Databases" + ], + "description": "Deletes the database.", + "operationId": "Databases_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the database." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Deleting the database is in progress." + }, + "204": { + "description": "The specified database does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes a database.": { + "$ref": "./examples/DeleteDatabase.json" + } + } + }, + "patch": { + "tags": [ + "Databases" + ], + "description": "Updates an existing database.", + "operationId": "Databases_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested database resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingMaxSizeBytes - MaxSizeBytes is required.\n\n * 400 MissingSkuName - Sku name is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 InvalidLicenseType - The specified license type is invalid.\n\n * 400 InvalidSkuName - Invalid SKU name.\n\n * 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.\n\n * 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.\n\n * 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.\n\n * 400 LedgerNotAllowedWithSpecifiedCreateMode - IsLedgerOn is not allowed with the specified create mode.\n\n * 400 DatabaseNameDoesNotMatchSourceDatabaseId - The database name specified doesn’t match the database name in sourceDatabaseId.\n\n * 400 ElasticPoolNotSupportedForExternalBackupRestore - Elastic pool is not supported for external backup restore\n\n * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.\n\n * 400 InvalidRecoveryServicesRecoveryPointId - Invalid recovery services recovery point identifier.\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 MissingRecoverableDatabaseId - Missing recoverable database identifier.\n\n * 400 MissingRecoveryServicesRecoveryPointId - Missing recovery services recovery point Id.\n\n * 400 MissingRestorableDroppedDatabaseId - Missing restorableDroppedDatabaseId\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingSourceDatabaseDeletionDate - Missing source database deletion date\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Updating the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Updates a database.": { + "$ref": "./examples/PatchVCoreDatabase.json" + }, + "Assigns maintenance window to a database.": { + "$ref": "./examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json" + }, + "Resets maintenance window of a database to default.": { + "$ref": "./examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases": { + "get": { + "tags": [ + "Databases" + ], + "description": "Gets a list of databases in an elastic pool.", + "operationId": "Databases_ListByElasticPool", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of databases in an elastic pool.", + "schema": { + "$ref": "#/definitions/DatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of databases in an elastic pool.": { + "$ref": "./examples/ListDatabasesByElasticPool.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover": { + "post": { + "tags": [ + "Databases" + ], + "description": "Failovers a database.", + "operationId": "Databases_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to failover.", + "required": true, + "type": "string" + }, + { + "name": "replicaType", + "in": "query", + "description": "The type of replica to be failed over.", + "required": false, + "type": "string", + "enum": [ + "Primary", + "ReadableSecondary" + ], + "x-ms-enum": { + "name": "ReplicaType", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed database failover." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 DatabaseFailoverThrottled - There was a recent failover on the database or pool if database belongs in an elastic pool.\n\n * 400 DatabaseFailoverNotSupportedOnSKU - This type of customer initiated failover is not supported on the given SKU.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 DatabaseNotInStateToFailover - The database is currently in a state such that failover cannot be issued." + }, + "202": { + "description": "Database failover is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Failover an database": { + "$ref": "./examples/FailoverDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/inaccessibleDatabases": { + "get": { + "tags": [ + "Databases" + ], + "description": "Gets a list of inaccessible databases in a logical server", + "operationId": "Databases_ListInaccessibleByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of inaccessible databases in a logical server", + "schema": { + "$ref": "#/definitions/DatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of inaccessible databases in a logical server": { + "$ref": "./examples/ListVCoreInaccessibleDatabasesByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause": { + "post": { + "tags": [ + "Databases" + ], + "description": "Pauses a database.", + "operationId": "Databases_Pause", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to be paused.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully paused the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 CannotDeactivateWhenDeactivatingInProgress - Deactivation workflow failed because there is a deactivate workflow already running.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows" + }, + "202": { + "description": "Pausing the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Pauses a database.": { + "$ref": "./examples/PauseDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume": { + "post": { + "tags": [ + "Databases" + ], + "description": "Resumes a database.", + "operationId": "Databases_Resume", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to be resumed.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully resumed the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows" + }, + "202": { + "description": "Resuming the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Resumes a database.": { + "$ref": "./examples/ResumeDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/upgradeDataWarehouse": { + "post": { + "tags": [ + "Databases" + ], + "description": "Upgrades a data warehouse.", + "operationId": "Databases_UpgradeDataWarehouse", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to be upgraded.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully upgraded the data warehouse." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 UpgradeOnlyAllowedOnDataWarehouseInstances - User attempted to upgrade non-datawarehouse instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Upgrading the data warehouse is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Upgrades a data warehouse.": { + "$ref": "./examples/UpgradeDataWarehouse.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move": { + "post": { + "tags": [ + "Databases" + ], + "description": "Renames a database.", + "operationId": "Databases_Rename", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to rename.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The resource move definition for renaming this database.", + "required": true, + "schema": { + "$ref": "#/definitions/ResourceMoveDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully renamed the database." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceMoveRequest - The resource move request is invalid.\n\n * 400 InvalidMoveTargetResourceId - The target resource identifier in move request is invalid.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DatabaseNameInUse - Database already exists. Choose a different database name.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship." + } + }, + "x-ms-examples": { + "Renames a database.": { + "$ref": "./examples/RenameDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/import": { + "post": { + "tags": [ + "Databases" + ], + "description": "Imports a bacpac into a new database.", + "operationId": "Databases_Import", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The database import request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ImportExistingDatabaseDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully imported the database.", + "schema": { + "$ref": "#/definitions/ImportExportOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database." + }, + "202": { + "description": "Importing the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Imports to an existing empty database.": { + "$ref": "./examples/ImportDatabase.json" + }, + "Imports to an existing empty database, using private link to communicate with SQL server and storage account.": { + "$ref": "./examples/ImportDatabaseWithNetworkIsolation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export": { + "post": { + "tags": [ + "Databases" + ], + "description": "Exports a database.", + "operationId": "Databases_Export", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The database export request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ExportDatabaseDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully exported the database.", + "schema": { + "$ref": "#/definitions/ImportExportOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database." + }, + "202": { + "description": "Exporting the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Exports a database.": { + "$ref": "./examples/ExportDatabase.json" + }, + "Exports a database, using private link to communicate with SQL server and storage account.": { + "$ref": "./examples/ExportDatabaseWithNetworkIsolation.json" + } + } + } + } + }, + "definitions": { + "DatabaseListResult": { + "description": "A list of databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Database" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseProperties": { + "description": "The database's properties.", + "type": "object", + "properties": { + "createMode": { + "description": "Specifies the mode of database creation.\r\n\r\nDefault: regular database creation.\r\n\r\nCopy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.\r\n\r\nSecondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.\r\n\r\nPointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.\r\n\r\nRecovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.\r\n\r\nRestore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.\r\n\r\nRestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.\r\n\r\nCopy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.", + "enum": [ + "Default", + "Copy", + "Secondary", + "PointInTimeRestore", + "Restore", + "Recovery", + "RestoreExternalBackup", + "RestoreExternalBackupSecondary", + "RestoreLongTermRetentionBackup", + "OnlineSecondary" + ], + "type": "string", + "x-ms-enum": { + "name": "CreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "collation": { + "description": "The collation of the database.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "maxSizeBytes": { + "format": "int64", + "description": "The max size of the database expressed in bytes.", + "type": "integer" + }, + "sampleName": { + "description": "The name of the sample schema to apply when creating this database.", + "enum": [ + "AdventureWorksLT", + "WideWorldImportersStd", + "WideWorldImportersFull" + ], + "type": "string", + "x-ms-enum": { + "name": "SampleName", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "elasticPoolId": { + "description": "The resource identifier of the elastic pool containing this database.", + "type": "string" + }, + "sourceDatabaseId": { + "description": "The resource identifier of the source database associated with create operation of this database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "status": { + "description": "The status of the database.", + "enum": [ + "Online", + "Restoring", + "RecoveryPending", + "Recovering", + "Suspect", + "Offline", + "Standby", + "Shutdown", + "EmergencyMode", + "AutoClosed", + "Copying", + "Creating", + "Inaccessible", + "OfflineSecondary", + "Pausing", + "Paused", + "Resuming", + "Scaling", + "OfflineChangingDwPerformanceTiers", + "OnlineChangingDwPerformanceTiers", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "DatabaseStatus", + "modelAsString": true + } + }, + "databaseId": { + "format": "uuid", + "description": "The ID of the database.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The creation date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "currentServiceObjectiveName": { + "description": "The current service level objective name of the database.", + "type": "string", + "readOnly": true + }, + "requestedServiceObjectiveName": { + "description": "The requested service level objective name of the database.", + "type": "string", + "readOnly": true + }, + "defaultSecondaryLocation": { + "description": "The default secondary region for this database.", + "type": "string", + "readOnly": true + }, + "failoverGroupId": { + "description": "Failover Group resource identifier that this database belongs to.", + "type": "string", + "readOnly": true + }, + "restorePointInTime": { + "format": "date-time", + "description": "Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "sourceDatabaseDeletionDate": { + "format": "date-time", + "description": "Specifies the time that the database was deleted.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "recoveryServicesRecoveryPointId": { + "description": "The resource identifier of the recovery point associated with create operation of this database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "longTermRetentionBackupResourceId": { + "description": "The resource identifier of the long term retention backup associated with create operation of this database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "recoverableDatabaseId": { + "description": "The resource identifier of the recoverable database associated with create operation of this database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "restorableDroppedDatabaseId": { + "description": "The resource identifier of the restorable dropped database associated with create operation of this database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "catalogCollation": { + "description": "Collation of the metadata catalog.", + "enum": [ + "DATABASE_DEFAULT", + "SQL_Latin1_General_CP1_CI_AS" + ], + "type": "string", + "x-ms-enum": { + "name": "CatalogCollationType", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "zoneRedundant": { + "description": "Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.", + "type": "boolean" + }, + "licenseType": { + "description": "The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit.", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "DatabaseLicenseType", + "modelAsString": true + } + }, + "maxLogSizeBytes": { + "format": "int64", + "description": "The max log size for this database.", + "type": "integer", + "readOnly": true + }, + "earliestRestoreDate": { + "format": "date-time", + "description": "This records the earliest start date and time that restore is available for this database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "readScale": { + "description": "The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "DatabaseReadScale", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "update" + ] + }, + "highAvailabilityReplicaCount": { + "format": "int32", + "description": "The number of secondary replicas associated with the database that are used to provide high availability.", + "type": "integer" + }, + "secondaryType": { + "description": "The secondary type of the database if it is a secondary. Valid values are Geo and Named.", + "enum": [ + "Geo", + "Named" + ], + "type": "string", + "x-ms-enum": { + "name": "SecondaryType", + "modelAsString": true + } + }, + "currentSku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU.", + "readOnly": true + }, + "autoPauseDelay": { + "format": "int32", + "description": "Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled", + "type": "integer" + }, + "currentBackupStorageRedundancy": { + "description": "The storage account type used to store backups for this database.", + "enum": [ + "Geo", + "Local", + "Zone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CurrentBackupStorageRedundancy", + "modelAsString": true + } + }, + "requestedBackupStorageRedundancy": { + "description": "The storage account type to be used to store backups for this database.", + "enum": [ + "Geo", + "Local", + "Zone" + ], + "type": "string", + "x-ms-enum": { + "name": "RequestedBackupStorageRedundancy", + "modelAsString": true + } + }, + "minCapacity": { + "format": "double", + "description": "Minimal capacity that database will always have allocated, if not paused", + "type": "number" + }, + "pausedDate": { + "format": "date-time", + "description": "The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.", + "type": "string", + "readOnly": true + }, + "resumedDate": { + "format": "date-time", + "description": "The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.", + "type": "string", + "readOnly": true + }, + "maintenanceConfigurationId": { + "description": "Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.", + "type": "string" + }, + "isLedgerOn": { + "description": "Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created.", + "type": "boolean" + }, + "isInfraEncryptionEnabled": { + "description": "Infra encryption is enabled for this database.", + "type": "boolean", + "readOnly": true + } + } + }, + "Database": { + "description": "A database resource.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The database SKU.\r\n\r\nThe list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:\r\n\r\n```azurecli\r\naz sql db list-editions -l -o table\r\n````\r\n\r\n```powershell\r\nGet-AzSqlServerServiceObjective -Location \r\n````\r\n" + }, + "kind": { + "description": "Kind of database. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "managedBy": { + "description": "Resource that manages the database.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseUpdate": { + "description": "A database resource.", + "type": "object", + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU." + }, + "properties": { + "$ref": "#/definitions/DatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ResourceMoveDefinition": { + "description": "Contains the information necessary to perform a resource move (rename).", + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "description": "The target ID for the resource", + "type": "string" + } + } + }, + "ImportExistingDatabaseDefinition": { + "description": "Contains the information necessary to perform import operation for existing database.", + "required": [ + "storageKeyType", + "storageKey", + "storageUri", + "administratorLogin", + "administratorLoginPassword" + ], + "type": "object", + "properties": { + "storageKeyType": { + "description": "Storage key type.", + "enum": [ + "SharedAccessKey", + "StorageAccessKey" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageKey": { + "description": "Storage key.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageUri": { + "description": "Storage Uri.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLogin": { + "description": "Administrator login name.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLoginPassword": { + "description": "Administrator login password.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "authenticationType": { + "description": "Authentication type.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "networkIsolation": { + "$ref": "#/definitions/NetworkIsolationSettings", + "description": "Optional resource information to enable network isolation for request.", + "x-ms-mutability": [ + "create" + ] + } + } + }, + "NetworkIsolationSettings": { + "description": "Contains the ARM resources for which to create private endpoint connection.", + "type": "object", + "properties": { + "storageAccountResourceId": { + "description": "The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "sqlServerResourceId": { + "description": "The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + } + } + }, + "ImportExportOperationResultProperties": { + "description": "Contains the operation result properties for import/export operation.", + "type": "object", + "properties": { + "requestId": { + "format": "uuid", + "description": "Request Id.", + "type": "string", + "readOnly": true + }, + "requestType": { + "description": "Request type.", + "type": "string", + "readOnly": true + }, + "queuedTime": { + "description": "Queued time.", + "type": "string", + "readOnly": true + }, + "lastModifiedTime": { + "description": "Last modified time.", + "type": "string", + "readOnly": true + }, + "blobUri": { + "description": "Blob Uri.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "Database name.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Operation status.", + "type": "string", + "readOnly": true + }, + "errorMessage": { + "description": "Error message.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnections": { + "description": "Gets the status of private endpoints associated with this request.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnectionRequestStatus" + }, + "readOnly": true + } + } + }, + "PrivateEndpointConnectionRequestStatus": { + "description": "Contains the private endpoint connection requests status.", + "type": "object", + "properties": { + "privateLinkServiceId": { + "description": "Resource id for which the private endpoint is created.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnectionName": { + "description": "The connection name for the private endpoint.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Status of this private endpoint connection.", + "type": "string", + "readOnly": true + } + } + }, + "ImportExportOperationResult": { + "description": "An ImportExport operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ImportExportOperationResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ExportDatabaseDefinition": { + "description": "Contains the information necessary to perform export database operation.", + "required": [ + "storageKeyType", + "storageKey", + "storageUri", + "administratorLogin", + "administratorLoginPassword" + ], + "type": "object", + "properties": { + "storageKeyType": { + "description": "Storage key type.", + "enum": [ + "SharedAccessKey", + "StorageAccessKey" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageKey": { + "description": "Storage key.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageUri": { + "description": "Storage Uri.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLogin": { + "description": "Administrator login name.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLoginPassword": { + "description": "Administrator login password.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "authenticationType": { + "description": "Authentication type.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "networkIsolation": { + "$ref": "#/definitions/NetworkIsolationSettings", + "description": "Optional resource information to enable network isolation for request.", + "x-ms-mutability": [ + "create" + ] + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DeletedServers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DeletedServers.json new file mode 100644 index 000000000000..67645c0e7405 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/DeletedServers.json @@ -0,0 +1,273 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers": { + "get": { + "tags": [ + "DeletedServers" + ], + "description": "Gets a list of all deleted servers in a subscription.", + "operationId": "DeletedServers_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of deleted servers.", + "schema": { + "$ref": "#/definitions/DeletedServerListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List deleted servers in a subscription": { + "$ref": "./examples/DeletedServerListBySubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}": { + "get": { + "tags": [ + "DeletedServers" + ], + "description": "Gets a deleted server.", + "operationId": "DeletedServers_Get", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "deletedServerName", + "in": "path", + "description": "The name of the deleted server.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified deleted server.", + "schema": { + "$ref": "#/definitions/DeletedServer" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get deleted server": { + "$ref": "./examples/DeletedServerGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers": { + "get": { + "tags": [ + "DeletedServers" + ], + "description": "Gets a list of deleted servers for a location.", + "operationId": "DeletedServers_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of deleted servers.", + "schema": { + "$ref": "#/definitions/DeletedServerListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 SubscriptionNotFound - The requested subscription was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List deleted servers": { + "$ref": "./examples/DeletedServerList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}/recover": { + "post": { + "tags": [ + "DeletedServers" + ], + "description": "Recovers a deleted server.", + "operationId": "DeletedServers_Recover", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "deletedServerName", + "in": "path", + "description": "The name of the deleted server.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully recover the deleted server.", + "schema": { + "$ref": "#/definitions/DeletedServer" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Recover deleted server.": { + "$ref": "./examples/DeletedServerRecover.json" + } + } + } + } + }, + "definitions": { + "DeletedServerListResult": { + "description": "A list of deleted servers.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DeletedServer" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DeletedServerProperties": { + "description": "The properties of a deleted server.", + "type": "object", + "properties": { + "version": { + "description": "The version of the deleted server.", + "type": "string", + "readOnly": true + }, + "deletionTime": { + "format": "date-time", + "description": "The deletion time of the deleted server.", + "type": "string", + "readOnly": true + }, + "originalId": { + "description": "The original ID of the server before deletion.", + "type": "string", + "readOnly": true + }, + "fullyQualifiedDomainName": { + "description": "The fully qualified domain name of the server.", + "type": "string", + "readOnly": true + } + } + }, + "DeletedServer": { + "description": "A deleted server.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DeletedServerProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ElasticPoolOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ElasticPoolOperations.json new file mode 100644 index 000000000000..74db1fd75fc5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ElasticPoolOperations.json @@ -0,0 +1,257 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel": { + "post": { + "tags": [ + "ElasticPoolOperations" + ], + "description": "Cancels the asynchronous operation on the elastic pool.", + "operationId": "ElasticPoolOperations_Cancel", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "The operation identifier.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for cancel has been executed successfully." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + } + }, + "x-ms-examples": { + "Cancel the elastic pool management operation": { + "$ref": "./examples/CancelElasticPoolOperation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations": { + "get": { + "tags": [ + "ElasticPoolOperations" + ], + "description": "Gets a list of operations performed on the elastic pool.", + "operationId": "ElasticPoolOperations_ListByElasticPool", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for getting elastic pool operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/ElasticPoolOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the elastic pool management operations": { + "$ref": "./examples/ListElasticPoolOperations.json" + } + } + } + } + }, + "definitions": { + "ElasticPoolOperationListResult": { + "description": "The response to a list elastic pool operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPoolOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ElasticPoolOperationProperties": { + "description": "The properties of a elastic pool operation.", + "type": "object", + "properties": { + "elasticPoolName": { + "description": "The name of the elastic pool the operation is being performed on.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "serverName": { + "description": "The name of the server.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "type": "string", + "readOnly": true + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + } + } + }, + "ElasticPoolOperation": { + "description": "A elastic pool operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ElasticPoolOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ElasticPools.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ElasticPools.json new file mode 100644 index 000000000000..b4ac983cc6c4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ElasticPools.json @@ -0,0 +1,543 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools": { + "get": { + "tags": [ + "ElasticPools" + ], + "description": "Gets all elastic pools in a server.", + "operationId": "ElasticPools_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Succeeded", + "schema": { + "$ref": "#/definitions/ElasticPoolListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all elastic pools in a server": { + "$ref": "./examples/ElasticPoolListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}": { + "get": { + "tags": [ + "ElasticPools" + ], + "description": "Gets an elastic pool.", + "operationId": "ElasticPools_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Succeeded", + "schema": { + "$ref": "#/definitions/ElasticPool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Get an elastic pool": { + "$ref": "./examples/ElasticPoolGet.json" + } + } + }, + "put": { + "tags": [ + "ElasticPools" + ], + "description": "Creates or updates an elastic pool.", + "operationId": "ElasticPools_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The elastic pool parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ElasticPool" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Updated the elastic pool", + "schema": { + "$ref": "#/definitions/ElasticPool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSkuName - Invalid SKU name.\n\n * 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.\n\n * 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.\n\n * 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Created the elastic pool", + "schema": { + "$ref": "#/definitions/ElasticPool" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or update elastic pool with minimum parameters": { + "$ref": "./examples/ElasticPoolCreateOrUpdateMin.json" + }, + "Create or update elastic pool with all parameter": { + "$ref": "./examples/ElasticPoolCreateOrUpdateMax.json" + }, + "Create or update elastic pool with maintenance configuration parameter": { + "$ref": "./examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json" + } + } + }, + "delete": { + "tags": [ + "ElasticPools" + ], + "description": "Deletes an elastic pool.", + "operationId": "ElasticPools_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Deleted the elastic pool" + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + }, + "202": { + "description": "Deleting the elastic pool is in progress." + }, + "204": { + "description": "Elastic pool did not exist" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete an elastic pool": { + "$ref": "./examples/ElasticPoolDelete.json" + } + } + }, + "patch": { + "tags": [ + "ElasticPools" + ], + "description": "Updates an elastic pool.", + "operationId": "ElasticPools_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The elastic pool update parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ElasticPoolUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Updated the elastic pool", + "schema": { + "$ref": "#/definitions/ElasticPool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSkuName - Invalid SKU name.\n\n * 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.\n\n * 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.\n\n * 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update an elastic pool with minimum parameters": { + "$ref": "./examples/ElasticPoolUpdateMin.json" + }, + "Update an elastic pool with all parameter": { + "$ref": "./examples/ElasticPoolUpdateMax.json" + }, + "Assigns maintenance configuration to an elastic pool.": { + "$ref": "./examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json" + }, + "Resets maintenance configuration of an elastic pool to default.": { + "$ref": "./examples/ElasticPoolUpdateResetMaintenanceConfiguration.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover": { + "post": { + "tags": [ + "ElasticPools" + ], + "description": "Failovers an elastic pool.", + "operationId": "ElasticPools_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool to failover.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed elastic pool failover." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 ElasticPoolFailoverThrottled - There was a recent failover on the elastic pool.\n\n * 400 ElasticPoolFailoverNotSupportedOnSKU - This type of customer initiated failover is not supported on the given SKU.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ElasticPoolNotInStateToFailover - The elastic pool or a database within the elastic pool is currently in a state such that failover cannot be issued." + }, + "202": { + "description": "Elastic pool failover is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Failover an elastic pool": { + "$ref": "./examples/FailoverElasticPool.json" + } + } + } + } + }, + "definitions": { + "ElasticPoolListResult": { + "description": "The result of an elastic pool list request.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPool" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ElasticPoolProperties": { + "description": "Properties of an elastic pool", + "type": "object", + "properties": { + "state": { + "description": "The state of the elastic pool.", + "enum": [ + "Creating", + "Ready", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ElasticPoolState", + "modelAsString": true + } + }, + "creationDate": { + "format": "date-time", + "description": "The creation date of the elastic pool (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "maxSizeBytes": { + "format": "int64", + "description": "The storage limit for the database elastic pool in bytes.", + "type": "integer" + }, + "perDatabaseSettings": { + "$ref": "#/definitions/ElasticPoolPerDatabaseSettings", + "description": "The per database settings for the elastic pool." + }, + "zoneRedundant": { + "description": "Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones.", + "type": "boolean" + }, + "licenseType": { + "description": "The license type to apply for this elastic pool.", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "ElasticPoolLicenseType", + "modelAsString": true + } + }, + "maintenanceConfigurationId": { + "description": "Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur.", + "type": "string" + } + } + }, + "ElasticPoolPerDatabaseSettings": { + "description": "Per database settings of an elastic pool.", + "type": "object", + "properties": { + "minCapacity": { + "format": "double", + "description": "The minimum capacity all databases are guaranteed.", + "type": "number" + }, + "maxCapacity": { + "format": "double", + "description": "The maximum capacity any one database can consume.", + "type": "number" + } + } + }, + "ElasticPool": { + "description": "An elastic pool.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The elastic pool SKU.\r\n\r\nThe list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command:\r\n\r\n```azurecli\r\naz sql elastic-pool list-editions -l -o table\r\n````\r\n" + }, + "kind": { + "description": "Kind of elastic pool. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ElasticPoolProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ElasticPoolUpdate": { + "description": "An elastic pool update.", + "type": "object", + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku" + }, + "properties": { + "$ref": "#/definitions/ElasticPoolUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ElasticPoolUpdateProperties": { + "description": "Properties of an elastic pool", + "type": "object", + "properties": { + "maxSizeBytes": { + "format": "int64", + "description": "The storage limit for the database elastic pool in bytes.", + "type": "integer" + }, + "perDatabaseSettings": { + "$ref": "#/definitions/ElasticPoolPerDatabaseSettings", + "description": "The per database settings for the elastic pool." + }, + "zoneRedundant": { + "description": "Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones.", + "type": "boolean" + }, + "licenseType": { + "description": "The license type to apply for this elastic pool.", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "ElasticPoolLicenseType", + "modelAsString": true + } + }, + "maintenanceConfigurationId": { + "description": "Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur.", + "type": "string" + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/EncryptionProtectors.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/EncryptionProtectors.json new file mode 100644 index 000000000000..813accde9524 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/EncryptionProtectors.json @@ -0,0 +1,348 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector": { + "get": { + "tags": [ + "EncryptionProtectors" + ], + "description": "Gets a list of server encryption protectors", + "operationId": "EncryptionProtectors_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of server encryption protector.", + "schema": { + "$ref": "#/definitions/EncryptionProtectorListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List encryption protectors by server": { + "$ref": "./examples/EncryptionProtectorList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}": { + "get": { + "tags": [ + "EncryptionProtectors" + ], + "description": "Gets a server encryption protector.", + "operationId": "EncryptionProtectors_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be retrieved.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified server encryption protector.", + "schema": { + "$ref": "#/definitions/EncryptionProtector" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the encryption protector": { + "$ref": "./examples/EncryptionProtectorGet.json" + } + } + }, + "put": { + "tags": [ + "EncryptionProtectors" + ], + "description": "Updates an existing encryption protector.", + "operationId": "EncryptionProtectors_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be updated.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested encryption protector resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/EncryptionProtector" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the encryption protector.", + "schema": { + "$ref": "#/definitions/EncryptionProtector" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerKeyNotFound - The requested server key was not found on the current subscription.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information ." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the encryption protector to key vault": { + "$ref": "./examples/EncryptionProtectorCreateOrUpdateKeyVault.json" + }, + "Update the encryption protector to service managed": { + "$ref": "./examples/EncryptionProtectorCreateOrUpdateServiceManaged.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}/revalidate": { + "post": { + "tags": [ + "EncryptionProtectors" + ], + "description": "Revalidates an existing encryption protector.", + "operationId": "EncryptionProtectors_Revalidate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be updated.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully revalidated the encryption protector." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerKeyNotFound - The requested server key was not found on the current subscription.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information ." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Revalidates the encryption protector": { + "$ref": "./examples/EncryptionProtectorRevalidate.json" + } + } + } + } + }, + "definitions": { + "EncryptionProtectorListResult": { + "description": "A list of server encryption protectors.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/EncryptionProtector" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "EncryptionProtectorProperties": { + "description": "Properties for an encryption protector execution.", + "required": [ + "serverKeyType" + ], + "type": "object", + "properties": { + "subregion": { + "description": "Subregion of the encryption protector.", + "type": "string", + "readOnly": true + }, + "serverKeyName": { + "description": "The name of the server key.", + "type": "string" + }, + "serverKeyType": { + "description": "The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.", + "enum": [ + "ServiceManaged", + "AzureKeyVault" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerKeyType", + "modelAsString": true + } + }, + "uri": { + "description": "The URI of the server key.", + "type": "string", + "readOnly": true + }, + "thumbprint": { + "description": "Thumbprint of the server key.", + "type": "string", + "readOnly": true + }, + "autoRotationEnabled": { + "description": "Key auto rotation opt-in flag. Either true or false.", + "type": "boolean" + } + } + }, + "EncryptionProtector": { + "description": "The server encryption protector.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Kind of encryption protector. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/EncryptionProtectorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/FailoverGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/FailoverGroups.json new file mode 100644 index 000000000000..c3a8b5b6d6f8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/FailoverGroups.json @@ -0,0 +1,633 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}": { + "get": { + "tags": [ + "FailoverGroups" + ], + "description": "Gets a failover group.", + "operationId": "FailoverGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified failover group.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Get failover group": { + "$ref": "./examples/FailoverGroupGet.json" + } + } + }, + "put": { + "tags": [ + "FailoverGroups" + ], + "description": "Creates or updates a failover group.", + "operationId": "FailoverGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The failover group parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the failover group.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 FailoverGroupCreateOrUpdatePartiallySucceeded - Some databases could not be added or removed.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 FailoverGroupUnableToPerformGroupOperationOnDatabases - The list of databases to add/remove to/from Failover Group contains errors that are preventing operation to complete.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the failover group.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create failover group": { + "$ref": "./examples/FailoverGroupCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "FailoverGroups" + ], + "description": "Deletes a failover group.", + "operationId": "FailoverGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the failover group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified failover group does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete failover group": { + "$ref": "./examples/FailoverGroupDelete.json" + } + } + }, + "patch": { + "tags": [ + "FailoverGroups" + ], + "description": "Updates a failover group.", + "operationId": "FailoverGroups_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The failover group parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/FailoverGroupUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the failover group.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 FailoverGroupCreateOrUpdatePartiallySucceeded - Some databases could not be added or removed.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 FailoverGroupUnableToPerformGroupOperationOnDatabases - The list of databases to add/remove to/from Failover Group contains errors that are preventing operation to complete.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update failover group": { + "$ref": "./examples/FailoverGroupUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups": { + "get": { + "tags": [ + "FailoverGroups" + ], + "description": "Lists the failover groups in a server.", + "operationId": "FailoverGroups_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the failover groups.", + "schema": { + "$ref": "#/definitions/FailoverGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List failover group": { + "$ref": "./examples/FailoverGroupList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover": { + "post": { + "tags": [ + "FailoverGroups" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "FailoverGroups_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a failover group": { + "$ref": "./examples/FailoverGroupFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "FailoverGroups" + ], + "description": "Fails over from the current primary server to this server. This operation might result in data loss.", + "operationId": "FailoverGroups_ForceFailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a failover group allowing data loss": { + "$ref": "./examples/FailoverGroupForceFailoverAllowDataLoss.json" + } + } + } + } + }, + "definitions": { + "FailoverGroupProperties": { + "description": "Properties of a failover group.", + "required": [ + "readWriteEndpoint", + "partnerServers" + ], + "type": "object", + "properties": { + "readWriteEndpoint": { + "$ref": "#/definitions/FailoverGroupReadWriteEndpoint", + "description": "Read-write endpoint of the failover group instance." + }, + "readOnlyEndpoint": { + "$ref": "#/definitions/FailoverGroupReadOnlyEndpoint", + "description": "Read-only endpoint of the failover group instance." + }, + "replicationRole": { + "description": "Local replication role of the failover group instance.", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "FailoverGroupReplicationRole", + "modelAsString": true + } + }, + "replicationState": { + "description": "Replication state of the failover group instance.", + "type": "string", + "readOnly": true + }, + "partnerServers": { + "description": "List of partner server information for the failover group.", + "type": "array", + "items": { + "$ref": "#/definitions/PartnerInfo" + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "databases": { + "description": "List of databases in the failover group.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FailoverGroupReadWriteEndpoint": { + "description": "Read-write endpoint of the failover group instance.", + "required": [ + "failoverPolicy" + ], + "type": "object", + "properties": { + "failoverPolicy": { + "description": "Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.", + "enum": [ + "Manual", + "Automatic" + ], + "type": "string", + "x-ms-enum": { + "name": "ReadWriteEndpointFailoverPolicy", + "modelAsString": true + } + }, + "failoverWithDataLossGracePeriodMinutes": { + "format": "int32", + "description": "Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.", + "type": "integer" + } + } + }, + "FailoverGroupReadOnlyEndpoint": { + "description": "Read-only endpoint of the failover group instance.", + "type": "object", + "properties": { + "failoverPolicy": { + "description": "Failover policy of the read-only endpoint for the failover group.", + "enum": [ + "Disabled", + "Enabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ReadOnlyEndpointFailoverPolicy", + "modelAsString": true + } + } + } + }, + "PartnerInfo": { + "description": "Partner server information for the failover group.", + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "description": "Resource identifier of the partner server.", + "type": "string" + }, + "location": { + "description": "Geo location of the partner server.", + "type": "string", + "readOnly": true + }, + "replicationRole": { + "description": "Replication role of the partner server.", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "FailoverGroupReplicationRole", + "modelAsString": true + } + } + } + }, + "FailoverGroup": { + "description": "A failover group.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/FailoverGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "FailoverGroupUpdate": { + "description": "A failover group update request.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/FailoverGroupUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "FailoverGroupUpdateProperties": { + "description": "Properties of a failover group update.", + "type": "object", + "properties": { + "readWriteEndpoint": { + "$ref": "#/definitions/FailoverGroupReadWriteEndpoint", + "description": "Read-write endpoint of the failover group instance." + }, + "readOnlyEndpoint": { + "$ref": "#/definitions/FailoverGroupReadOnlyEndpoint", + "description": "Read-only endpoint of the failover group instance." + }, + "databases": { + "description": "List of databases in the failover group.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "FailoverGroupListResult": { + "description": "A list of failover groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/FailoverGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/FirewallRules.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/FirewallRules.json new file mode 100644 index 000000000000..eb507341f0e0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/FirewallRules.json @@ -0,0 +1,377 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}": { + "get": { + "tags": [ + "FirewallRules" + ], + "description": "Gets a firewall rule.", + "operationId": "FirewallRules_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the firewall rule.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified firewall rule.", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get Firewall Rule": { + "$ref": "./examples/FirewallRuleGet.json" + } + } + }, + "put": { + "tags": [ + "FirewallRules" + ], + "description": "Creates or updates a firewall rule.", + "operationId": "FirewallRules_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the firewall rule.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating a firewall rule.", + "required": true, + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the firewall rule.", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidServerFirewallRuleResourceRequest - The server firewall rule resource request is invalid.\n\n * 400 InvalidServerFirewallRuleResourceParameters - The server firewall rule resource parameter is invalid.\n\n * 400 TooManyFirewallRules - The provided firewall rules are over the limit.\n\n * 400 DenyPublicEndpointEnabled - Unable to create or modify firewall rules when public network interface for the server is disabled. To manage server or database level firewall rules, please enable the public network interface.\n\n * 400 FirewallRuleInvalidRange - The specified firewall rule range is invalid.\n\n * 400 FirewallRuleNameTooLong - The provided firewall rule name is too long\n\n * 400 FirewallRuleNameEmpty - The provided firewall rule name is empty\n\n * 400 FirewallRuleNotIPv4Address - The provided firewall rule address is not IPv4\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "201": { + "description": "Successfully created the firewall rule.", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + } + }, + "x-ms-examples": { + "Create a firewall rule max/min": { + "$ref": "./examples/FirewallRuleCreate.json" + }, + "Update a firewall rule max/min": { + "$ref": "./examples/FirewallRuleUpdate.json" + } + } + }, + "delete": { + "tags": [ + "FirewallRules" + ], + "description": "Deletes a firewall rule.", + "operationId": "FirewallRules_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the firewall rule.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the firewall rule." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidServerFirewallRuleResourceRequest - The server firewall rule resource request is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "204": { + "description": "The specified firewall rule does not exist." + } + }, + "x-ms-examples": { + "Delete a firewall rule": { + "$ref": "./examples/FirewallRuleDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules": { + "get": { + "tags": [ + "FirewallRules" + ], + "description": "Gets a list of firewall rules.", + "operationId": "FirewallRules_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of firewall rules.", + "schema": { + "$ref": "#/definitions/FirewallRuleListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List Firewall Rules": { + "$ref": "./examples/FirewallRuleList.json" + } + } + }, + "put": { + "tags": [ + "FirewallRules" + ], + "description": "Replaces all firewall rules on the server.", + "operationId": "FirewallRules_Replace", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/FirewallRuleList" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the firewall rules.", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidServerFirewallRuleResourceRequest - The server firewall rule resource request is invalid.\n\n * 400 InvalidServerFirewallRuleResourceParameters - The server firewall rule resource parameter is invalid.\n\n * 400 TooManyFirewallRules - The provided firewall rules are over the limit.\n\n * 400 DenyPublicEndpointEnabled - Unable to create or modify firewall rules when public network interface for the server is disabled. To manage server or database level firewall rules, please enable the public network interface.\n\n * 400 FirewallRuleInvalidRange - The specified firewall rule range is invalid.\n\n * 400 FirewallRuleNameTooLong - The provided firewall rule name is too long\n\n * 400 FirewallRuleNameEmpty - The provided firewall rule name is empty\n\n * 400 FirewallRuleNotIPv4Address - The provided firewall rule address is not IPv4\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Creating or updating the Server Firewall Rules is in progress." + } + }, + "x-ms-examples": { + "Replace firewall rules": { + "$ref": "./examples/FirewallRuleReplace.json" + } + } + } + } + }, + "definitions": { + "ServerFirewallRuleProperties": { + "description": "The properties of a server firewall rule.", + "type": "object", + "properties": { + "startIpAddress": { + "description": "The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses.", + "type": "string" + }, + "endIpAddress": { + "description": "The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses.", + "type": "string" + } + } + }, + "ResourceWithWritableName": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string" + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ProxyResourceWithWritableName": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ResourceWithWritableName" + } + ], + "properties": {} + }, + "FirewallRule": { + "description": "A server firewall rule.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResourceWithWritableName" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerFirewallRuleProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "FirewallRuleListResult": { + "description": "The response to a list firewall rules request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "FirewallRuleList": { + "description": "A list of server firewall rules.", + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/InstanceFailoverGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/InstanceFailoverGroups.json new file mode 100644 index 000000000000..ae7f6345191d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/InstanceFailoverGroups.json @@ -0,0 +1,528 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}": { + "get": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Gets a failover group.", + "operationId": "InstanceFailoverGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified failover group.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Get failover group": { + "$ref": "./examples/InstanceFailoverGroupGet.json" + } + } + }, + "put": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Creates or updates a failover group.", + "operationId": "InstanceFailoverGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The failover group parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the failover group.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the failover group.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create failover group": { + "$ref": "./examples/InstanceFailoverGroupCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Deletes a failover group.", + "operationId": "InstanceFailoverGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the failover group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified failover group does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete failover group": { + "$ref": "./examples/InstanceFailoverGroupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups": { + "get": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Lists the failover groups in a location.", + "operationId": "InstanceFailoverGroups_ListByLocation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the failover groups.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List failover group": { + "$ref": "./examples/InstanceFailoverGroupList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover": { + "post": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Fails over from the current primary managed instance to this managed instance.", + "operationId": "InstanceFailoverGroups_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a failover group": { + "$ref": "./examples/InstanceFailoverGroupFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Fails over from the current primary managed instance to this managed instance. This operation might result in data loss.", + "operationId": "InstanceFailoverGroups_ForceFailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a failover group allowing data loss": { + "$ref": "./examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json" + } + } + } + } + }, + "definitions": { + "InstanceFailoverGroupProperties": { + "description": "Properties of a instance failover group.", + "required": [ + "readWriteEndpoint", + "partnerRegions", + "managedInstancePairs" + ], + "type": "object", + "properties": { + "readWriteEndpoint": { + "$ref": "#/definitions/InstanceFailoverGroupReadWriteEndpoint", + "description": "Read-write endpoint of the failover group instance." + }, + "readOnlyEndpoint": { + "$ref": "#/definitions/InstanceFailoverGroupReadOnlyEndpoint", + "description": "Read-only endpoint of the failover group instance." + }, + "replicationRole": { + "description": "Local replication role of the failover group instance.", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "InstanceFailoverGroupReplicationRole", + "modelAsString": true + } + }, + "replicationState": { + "description": "Replication state of the failover group instance.", + "type": "string", + "readOnly": true + }, + "partnerRegions": { + "description": "Partner region information for the failover group.", + "type": "array", + "items": { + "$ref": "#/definitions/PartnerRegionInfo" + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "managedInstancePairs": { + "description": "List of managed instance pairs in the failover group.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstancePairInfo" + } + } + } + }, + "InstanceFailoverGroupReadWriteEndpoint": { + "description": "Read-write endpoint of the failover group instance.", + "required": [ + "failoverPolicy" + ], + "type": "object", + "properties": { + "failoverPolicy": { + "description": "Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.", + "enum": [ + "Manual", + "Automatic" + ], + "type": "string", + "x-ms-enum": { + "name": "ReadWriteEndpointFailoverPolicy", + "modelAsString": true + } + }, + "failoverWithDataLossGracePeriodMinutes": { + "format": "int32", + "description": "Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.", + "type": "integer" + } + } + }, + "InstanceFailoverGroupReadOnlyEndpoint": { + "description": "Read-only endpoint of the failover group instance.", + "type": "object", + "properties": { + "failoverPolicy": { + "description": "Failover policy of the read-only endpoint for the failover group.", + "enum": [ + "Disabled", + "Enabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ReadOnlyEndpointFailoverPolicy", + "modelAsString": true + } + } + } + }, + "PartnerRegionInfo": { + "description": "Partner region information for the failover group.", + "type": "object", + "properties": { + "location": { + "description": "Geo location of the partner managed instances.", + "type": "string" + }, + "replicationRole": { + "description": "Replication role of the partner managed instances.", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "InstanceFailoverGroupReplicationRole", + "modelAsString": true + } + } + } + }, + "ManagedInstancePairInfo": { + "description": "Pairs of Managed Instances in the failover group.", + "type": "object", + "properties": { + "primaryManagedInstanceId": { + "description": "Id of Primary Managed Instance in pair.", + "type": "string" + }, + "partnerManagedInstanceId": { + "description": "Id of Partner Managed Instance in pair.", + "type": "string" + } + } + }, + "InstanceFailoverGroup": { + "description": "An instance failover group.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/InstanceFailoverGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "InstanceFailoverGroupListResult": { + "description": "A list of instance failover groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/InstanceFailoverGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/InstancePools.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/InstancePools.json new file mode 100644 index 000000000000..9f45b90fb91a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/InstancePools.json @@ -0,0 +1,413 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}": { + "get": { + "tags": [ + "InstancePools" + ], + "description": "Gets an instance pool.", + "operationId": "InstancePools_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the instance pool to be retrieved.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified instance pool.", + "schema": { + "$ref": "#/definitions/InstancePool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 InstancePoolNotFound - An instance pool cannot be found" + } + }, + "x-ms-examples": { + "Get an instance pool": { + "$ref": "./examples/GetInstancePool.json" + } + } + }, + "put": { + "tags": [ + "InstancePools" + ], + "description": "Creates or updates an instance pool.", + "operationId": "InstancePools_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the instance pool to be created or updated.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested instance pool resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/InstancePool" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the instance pool.", + "schema": { + "$ref": "#/definitions/InstancePool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 MissingSkuName - Sku name is required.\n\n * 400 InstancePoolRequestedVcoreCountIsInvalid - Requested vcore count for instance pool is invalid\n\n * 400 InstancePoolRequestMissingSku - Instance pool request is missing sku\n\n * 400 InstancePoolRequestMissingSkuTier - Instance pool request is missing sku tier\n\n * 400 InstancePoolRequestMissingSkuFamily - Instance pool request is missing sku family\n\n * 400 InstancePoolRequestedSubnetResourceIdIsInvalid - Subnet id for instance pool is null or empty\n\n * 409 InstancePoolBusy - An instance pool is busy with another ongoing operation" + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the instance pool.", + "schema": { + "$ref": "#/definitions/InstancePool" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create an instance pool with all properties.": { + "$ref": "./examples/CreateOrUpdateInstancePoolMax.json" + }, + "Create an instance pool with min properties.": { + "$ref": "./examples/CreateOrUpdateInstancePoolMin.json" + } + } + }, + "delete": { + "tags": [ + "InstancePools" + ], + "description": "Deletes an instance pool", + "operationId": "InstancePools_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the instance pool to be deleted", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the instance pool." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstancePoolNotEmpty - An instance pool is not empty\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 409 InstancePoolBusy - An instance pool is busy with another ongoing operation" + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified instance pool does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete an instance pool": { + "$ref": "./examples/DeleteInstancePool.json" + } + } + }, + "patch": { + "tags": [ + "InstancePools" + ], + "description": "Updates an instance pool.", + "operationId": "InstancePools_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the instance pool to be updated.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested instance pool resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/InstancePoolUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the instance pool.", + "schema": { + "$ref": "#/definitions/InstancePool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Patch an instance pool": { + "$ref": "./examples/PatchInstancePool.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools": { + "get": { + "tags": [ + "InstancePools" + ], + "description": "Gets a list of instance pools in the resource group", + "operationId": "InstancePools_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of instance pools.", + "schema": { + "$ref": "#/definitions/InstancePoolListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List instance pools by resource group": { + "$ref": "./examples/ListInstancePoolsByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools": { + "get": { + "tags": [ + "InstancePools" + ], + "description": "Gets a list of all instance pools in the subscription.", + "operationId": "InstancePools_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of instance pools in a subscription.", + "schema": { + "$ref": "#/definitions/InstancePoolListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List instance pools in the subscription": { + "$ref": "./examples/ListInstancePoolsBySubscriptionId.json" + } + } + } + } + }, + "definitions": { + "InstancePoolProperties": { + "description": "Properties of an instance pool.", + "required": [ + "subnetId", + "vCores", + "licenseType" + ], + "type": "object", + "properties": { + "subnetId": { + "description": "Resource ID of the subnet to place this instance pool in.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "vCores": { + "format": "int32", + "description": "Count of vCores belonging to this instance pool.", + "type": "integer", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "licenseType": { + "description": "The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price).", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "InstancePoolLicenseType", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "create" + ] + } + } + }, + "InstancePool": { + "description": "An Azure SQL instance pool.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU." + }, + "properties": { + "$ref": "#/definitions/InstancePoolProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "InstancePoolUpdate": { + "description": "An update to an Instance pool.", + "type": "object", + "properties": { + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "InstancePoolListResult": { + "description": "A list of Azure SQL instance pools.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/InstancePool" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobAgents.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobAgents.json new file mode 100644 index 000000000000..8205cd4d6fa9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobAgents.json @@ -0,0 +1,387 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents": { + "get": { + "tags": [ + "JobAgents" + ], + "description": "Gets a list of job agents in a server.", + "operationId": "JobAgents_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job agents.", + "schema": { + "$ref": "#/definitions/JobAgentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ServerDisabled - Server is disabled." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job agents in a server": { + "$ref": "./examples/ListJobAgentsByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}": { + "get": { + "tags": [ + "JobAgents" + ], + "description": "Gets a job agent.", + "operationId": "JobAgents_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be retrieved.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 409 ServerDisabled - Server is disabled." + } + }, + "x-ms-examples": { + "Get a job agent": { + "$ref": "./examples/GetJobAgent.json" + } + } + }, + "put": { + "tags": [ + "JobAgents" + ], + "description": "Creates or updates a job agent.", + "operationId": "JobAgents_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be created or updated.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested job agent resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 MissingSkuName - Sku name is required.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 JobAgentDatabaseSecondary - A job agent cannot be linked to a geo-secondary database.\n\n * 400 JobAgentDatabaseAlreadyLinked - The specified database is already linked to another job agent.\n\n * 400 DatabaseDoesNotExist - The requested database was not found\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 JobAgentExceededQuota - Could not create job agent because it would exceed the quota.\n\n * 400 JobAgentAlreadyExists - The job agent already exists on the server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 PropertyChangeUnsupported - Property cannot be modified.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 409 ServerDisabled - Server is disabled." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or update a job agent": { + "$ref": "./examples/CreateOrUpdateJobAgent.json" + } + } + }, + "delete": { + "tags": [ + "JobAgents" + ], + "description": "Deletes a job agent.", + "operationId": "JobAgents_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be deleted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the job agent." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 409 ServerDisabled - Server is disabled." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified job agent does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a job agent": { + "$ref": "./examples/DeleteJobAgent.json" + } + } + }, + "patch": { + "tags": [ + "JobAgents" + ], + "description": "Updates a job agent.", + "operationId": "JobAgents_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be updated.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The update to the job agent.", + "required": true, + "schema": { + "$ref": "#/definitions/JobAgentUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 PropertyChangeUnsupported - Property cannot be modified.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 409 ServerDisabled - Server is disabled." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a job agent's tags.": { + "$ref": "./examples/UpdateJobAgent.json" + } + } + } + } + }, + "definitions": { + "JobAgentListResult": { + "description": "A list of Azure SQL job agents.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobAgent" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobAgentProperties": { + "description": "Properties of a job agent.", + "required": [ + "databaseId" + ], + "type": "object", + "properties": { + "databaseId": { + "description": "Resource ID of the database to store job metadata in.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "state": { + "description": "The state of the job agent.", + "enum": [ + "Creating", + "Ready", + "Updating", + "Deleting", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobAgentState", + "modelAsString": true + } + } + } + }, + "JobAgent": { + "description": "An Azure SQL job agent.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU." + }, + "properties": { + "$ref": "#/definitions/JobAgentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobAgentUpdate": { + "description": "An update to an Azure SQL job agent.", + "type": "object", + "properties": { + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobCredentials.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobCredentials.json new file mode 100644 index 000000000000..429ea7ee799f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobCredentials.json @@ -0,0 +1,319 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials": { + "get": { + "tags": [ + "JobCredentials" + ], + "description": "Gets a list of jobs credentials.", + "operationId": "JobCredentials_ListByAgent", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job credentials.", + "schema": { + "$ref": "#/definitions/JobCredentialListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List credentials in a job agent": { + "$ref": "./examples/ListJobCredentialsByAgent.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}": { + "get": { + "tags": [ + "JobCredentials" + ], + "description": "Gets a jobs credential.", + "operationId": "JobCredentials_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "credentialName", + "in": "path", + "description": "The name of the credential.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job credential.", + "schema": { + "$ref": "#/definitions/JobCredential" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a credential": { + "$ref": "./examples/GetJobCredential.json" + } + } + }, + "put": { + "tags": [ + "JobCredentials" + ], + "description": "Creates or updates a job credential.", + "operationId": "JobCredentials_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "credentialName", + "in": "path", + "description": "The name of the credential.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested job credential state.", + "required": true, + "schema": { + "$ref": "#/definitions/JobCredential" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the credential.", + "schema": { + "$ref": "#/definitions/JobCredential" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidJobCredentialUsername - Invalid credential username.\n\n * 403 JobCredentialPermissionError - Azure Resource Manager does not have permission to use or manage the credential.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "201": { + "description": "Successfully created the credential.", + "schema": { + "$ref": "#/definitions/JobCredential" + } + } + }, + "x-ms-examples": { + "Create or update a credential": { + "$ref": "./examples/CreateOrUpdateJobCredential.json" + } + } + }, + "delete": { + "tags": [ + "JobCredentials" + ], + "description": "Deletes a job credential.", + "operationId": "JobCredentials_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "credentialName", + "in": "path", + "description": "The name of the credential.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the credential." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 403 JobCredentialPermissionError - Azure Resource Manager does not have permission to use or manage the credential.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "A credential with the specified name does not exist." + } + }, + "x-ms-examples": { + "Delete a credential": { + "$ref": "./examples/DeleteJobCredential.json" + } + } + } + } + }, + "definitions": { + "JobCredentialListResult": { + "description": "A list of job credentials.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobCredential" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobCredentialProperties": { + "description": "Properties of a job credential.", + "required": [ + "username", + "password" + ], + "type": "object", + "properties": { + "username": { + "description": "The credential user name.", + "type": "string" + }, + "password": { + "description": "The credential password.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + } + } + }, + "JobCredential": { + "description": "A stored credential that can be used by a job to connect to target databases.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobCredentialProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobExecutions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobExecutions.json new file mode 100644 index 000000000000..a346cb706576 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobExecutions.json @@ -0,0 +1,678 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions": { + "get": { + "tags": [ + "JobExecutions" + ], + "description": "Lists all executions in a job agent.", + "operationId": "JobExecutions_ListByAgent", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "createTimeMin", + "in": "query", + "description": "If specified, only job executions created at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "createTimeMax", + "in": "query", + "description": "If specified, only job executions created before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMin", + "in": "query", + "description": "If specified, only job executions completed at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMax", + "in": "query", + "description": "If specified, only job executions completed before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "isActive", + "in": "query", + "description": "If specified, only active or only completed job executions are included.", + "required": false, + "type": "boolean" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved job executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List all job executions in a job agent.": { + "$ref": "./examples/ListJobExecutionsByAgent.json" + }, + "List all job executions in a job agent with filtering.": { + "$ref": "./examples/ListJobExecutionsByAgentWithFilter.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel": { + "post": { + "tags": [ + "JobExecutions" + ], + "description": "Requests cancellation of a job execution.", + "operationId": "JobExecutions_Cancel", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution to cancel.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully requested cancellation of the job execution." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Cancel a job execution.": { + "$ref": "./examples/CancelJobExecution.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start": { + "post": { + "tags": [ + "JobExecutions" + ], + "description": "Starts an elastic job execution.", + "operationId": "JobExecutions_Create", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully started an execution for the job.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Start a job execution.": { + "$ref": "./examples/CreateJobExecution.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions": { + "get": { + "tags": [ + "JobExecutions" + ], + "description": "Lists a job's executions.", + "operationId": "JobExecutions_ListByJob", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "createTimeMin", + "in": "query", + "description": "If specified, only job executions created at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "createTimeMax", + "in": "query", + "description": "If specified, only job executions created before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMin", + "in": "query", + "description": "If specified, only job executions completed at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMax", + "in": "query", + "description": "If specified, only job executions completed before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "isActive", + "in": "query", + "description": "If specified, only active or only completed job executions are included.", + "required": false, + "type": "boolean" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved job executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List a job's executions.": { + "$ref": "./examples/ListJobExecutionsByJob.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}": { + "get": { + "tags": [ + "JobExecutions" + ], + "description": "Gets a job execution.", + "operationId": "JobExecutions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get a job execution.": { + "$ref": "./examples/GetJobExecution.json" + } + } + }, + "put": { + "tags": [ + "JobExecutions" + ], + "description": "Creates or updates a job execution.", + "operationId": "JobExecutions_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The job execution id to create the job execution under.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A job execution for the job with the given id already existed.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully started an execution for the job.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create job execution.": { + "$ref": "./examples/CreateOrUpdateJobExecution.json" + } + } + } + } + }, + "definitions": { + "JobExecutionListResult": { + "description": "A list of job executions.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecution" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecutionProperties": { + "description": "Properties for an Azure SQL Database Elastic job execution.", + "type": "object", + "properties": { + "jobVersion": { + "format": "int32", + "description": "The job version number.", + "type": "integer", + "readOnly": true + }, + "stepName": { + "description": "The job step name.", + "type": "string", + "readOnly": true + }, + "stepId": { + "format": "int32", + "description": "The job step id.", + "type": "integer", + "readOnly": true + }, + "jobExecutionId": { + "format": "uuid", + "description": "The unique identifier of the job execution.", + "type": "string", + "readOnly": true + }, + "lifecycle": { + "description": "The detailed state of the job execution.", + "enum": [ + "Created", + "InProgress", + "WaitingForChildJobExecutions", + "WaitingForRetry", + "Succeeded", + "SucceededWithSkipped", + "Failed", + "TimedOut", + "Canceled", + "Skipped" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobExecutionLifecycle", + "modelAsString": true + } + }, + "provisioningState": { + "description": "The ARM provisioning state of the job execution.", + "enum": [ + "Created", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "createTime": { + "format": "date-time", + "description": "The time that the job execution was created.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The time that the job execution started.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The time that the job execution completed.", + "type": "string", + "readOnly": true + }, + "currentAttempts": { + "format": "int32", + "description": "Number of times the job execution has been attempted.", + "type": "integer" + }, + "currentAttemptStartTime": { + "format": "date-time", + "description": "Start time of the current attempt.", + "type": "string", + "readOnly": true + }, + "lastMessage": { + "description": "The last status or error message.", + "type": "string", + "readOnly": true + }, + "target": { + "$ref": "#/definitions/JobExecutionTarget", + "description": "The target that this execution is executed on.", + "readOnly": true + } + } + }, + "JobExecutionTarget": { + "description": "The target that a job execution is executed on.", + "type": "object", + "properties": { + "type": { + "description": "The type of the target.", + "enum": [ + "TargetGroup", + "SqlDatabase", + "SqlElasticPool", + "SqlShardMap", + "SqlServer" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobTargetType", + "modelAsString": true + } + }, + "serverName": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The database name.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecution": { + "description": "An execution of a job", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobExecutionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobStepExecutions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobStepExecutions.json new file mode 100644 index 000000000000..8e3c3f062689 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobStepExecutions.json @@ -0,0 +1,402 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps": { + "get": { + "tags": [ + "JobStepExecutions" + ], + "description": "Lists the step executions of a job execution.", + "operationId": "JobStepExecutions_ListByJobExecution", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "createTimeMin", + "in": "query", + "description": "If specified, only job executions created at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "createTimeMax", + "in": "query", + "description": "If specified, only job executions created before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMin", + "in": "query", + "description": "If specified, only job executions completed at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMax", + "in": "query", + "description": "If specified, only job executions completed before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "isActive", + "in": "query", + "description": "If specified, only active or only completed job executions are included.", + "required": false, + "type": "boolean" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the step executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job step executions": { + "$ref": "./examples/ListJobExecutionSteps.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}": { + "get": { + "tags": [ + "JobStepExecutions" + ], + "description": "Gets a step execution of a job execution.", + "operationId": "JobStepExecutions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The unique id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the step.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the step execution.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a job step execution": { + "$ref": "./examples/GetJobExecutionStep.json" + } + } + } + } + }, + "definitions": { + "JobExecutionListResult": { + "description": "A list of job executions.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecution" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecutionProperties": { + "description": "Properties for an Azure SQL Database Elastic job execution.", + "type": "object", + "properties": { + "jobVersion": { + "format": "int32", + "description": "The job version number.", + "type": "integer", + "readOnly": true + }, + "stepName": { + "description": "The job step name.", + "type": "string", + "readOnly": true + }, + "stepId": { + "format": "int32", + "description": "The job step id.", + "type": "integer", + "readOnly": true + }, + "jobExecutionId": { + "format": "uuid", + "description": "The unique identifier of the job execution.", + "type": "string", + "readOnly": true + }, + "lifecycle": { + "description": "The detailed state of the job execution.", + "enum": [ + "Created", + "InProgress", + "WaitingForChildJobExecutions", + "WaitingForRetry", + "Succeeded", + "SucceededWithSkipped", + "Failed", + "TimedOut", + "Canceled", + "Skipped" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobExecutionLifecycle", + "modelAsString": true + } + }, + "provisioningState": { + "description": "The ARM provisioning state of the job execution.", + "enum": [ + "Created", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "createTime": { + "format": "date-time", + "description": "The time that the job execution was created.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The time that the job execution started.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The time that the job execution completed.", + "type": "string", + "readOnly": true + }, + "currentAttempts": { + "format": "int32", + "description": "Number of times the job execution has been attempted.", + "type": "integer" + }, + "currentAttemptStartTime": { + "format": "date-time", + "description": "Start time of the current attempt.", + "type": "string", + "readOnly": true + }, + "lastMessage": { + "description": "The last status or error message.", + "type": "string", + "readOnly": true + }, + "target": { + "$ref": "#/definitions/JobExecutionTarget", + "description": "The target that this execution is executed on.", + "readOnly": true + } + } + }, + "JobExecutionTarget": { + "description": "The target that a job execution is executed on.", + "type": "object", + "properties": { + "type": { + "description": "The type of the target.", + "enum": [ + "TargetGroup", + "SqlDatabase", + "SqlElasticPool", + "SqlShardMap", + "SqlServer" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobTargetType", + "modelAsString": true + } + }, + "serverName": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The database name.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecution": { + "description": "An execution of a job", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobExecutionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobSteps.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobSteps.json new file mode 100644 index 000000000000..522cfade1e03 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobSteps.json @@ -0,0 +1,623 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets all job steps in the specified job version.", + "operationId": "JobSteps_ListByVersion", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobVersion", + "in": "path", + "description": "The version of the job to get.", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job steps.", + "schema": { + "$ref": "#/definitions/JobStepListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job steps for the specified version of a job.": { + "$ref": "./examples/ListJobStepsByVersion.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets the specified version of a job step.", + "operationId": "JobSteps_GetByVersion", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobVersion", + "in": "path", + "description": "The version of the job to get.", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get the specified version of a job step.": { + "$ref": "./examples/GetJobStepByVersion.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets all job steps for a job's current version.", + "operationId": "JobSteps_ListByJob", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job steps.", + "schema": { + "$ref": "#/definitions/JobStepListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job steps for the latest version of a job.": { + "$ref": "./examples/ListJobStepsByJob.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets a job step in a job's current version.", + "operationId": "JobSteps_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get the latest version of a job step.": { + "$ref": "./examples/GetJobStepByJob.json" + } + } + }, + "put": { + "tags": [ + "JobSteps" + ], + "description": "Creates or updates a job step. This will implicitly create a new job version.", + "operationId": "JobSteps_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested state of the job step.", + "required": true, + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 JobStepIdMismatch - Step Id in the specified Job Step URI does not match step id in provided Job Step Resource.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingJobAccountNameWithUrl - The provided job account name did not match the name in the Url.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "201": { + "description": "Successfully added the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + } + }, + "x-ms-examples": { + "Create or update a job step with minimal properties specified.": { + "$ref": "./examples/CreateOrUpdateJobStepMin.json" + }, + "Create or update a job step with all properties specified.": { + "$ref": "./examples/CreateOrUpdateJobStepMax.json" + } + } + }, + "delete": { + "tags": [ + "JobSteps" + ], + "description": "Deletes a job step. This will implicitly create a new job version.", + "operationId": "JobSteps_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the job step." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "The specified job step does not exist." + } + }, + "x-ms-examples": { + "Delete a job step.": { + "$ref": "./examples/DeleteJobStep.json" + } + } + } + } + }, + "definitions": { + "JobStepListResult": { + "description": "A list of job steps.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobStep" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobStepProperties": { + "description": "Properties of a job step.", + "required": [ + "targetGroup", + "credential", + "action" + ], + "type": "object", + "properties": { + "stepId": { + "format": "int32", + "description": "The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified.", + "type": "integer" + }, + "targetGroup": { + "description": "The resource ID of the target group that the job step will be executed on.", + "type": "string" + }, + "credential": { + "description": "The resource ID of the job credential that will be used to connect to the targets.", + "type": "string" + }, + "action": { + "$ref": "#/definitions/JobStepAction", + "description": "The action payload of the job step." + }, + "output": { + "$ref": "#/definitions/JobStepOutput", + "description": "Output destination properties of the job step." + }, + "executionOptions": { + "$ref": "#/definitions/JobStepExecutionOptions", + "description": "Execution options for the job step." + } + } + }, + "JobStepAction": { + "description": "The action to be executed by a job step.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "type": { + "description": "Type of action being executed by the job step.", + "default": "TSql", + "enum": [ + "TSql" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStepActionType", + "modelAsString": true + } + }, + "source": { + "description": "The source of the action to execute.", + "default": "Inline", + "enum": [ + "Inline" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStepActionSource", + "modelAsString": true + } + }, + "value": { + "description": "The action value, for example the text of the T-SQL script to execute.", + "type": "string" + } + } + }, + "JobStepOutput": { + "description": "The output configuration of a job step.", + "required": [ + "serverName", + "databaseName", + "tableName", + "credential" + ], + "type": "object", + "properties": { + "type": { + "description": "The output destination type.", + "default": "SqlDatabase", + "enum": [ + "SqlDatabase" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStepOutputType", + "modelAsString": true + } + }, + "subscriptionId": { + "format": "uuid", + "description": "The output destination subscription id.", + "type": "string" + }, + "resourceGroupName": { + "description": "The output destination resource group.", + "type": "string" + }, + "serverName": { + "description": "The output destination server name.", + "type": "string" + }, + "databaseName": { + "description": "The output destination database.", + "type": "string" + }, + "schemaName": { + "description": "The output destination schema.", + "default": "dbo", + "type": "string" + }, + "tableName": { + "description": "The output destination table.", + "type": "string" + }, + "credential": { + "description": "The resource ID of the credential to use to connect to the output destination.", + "type": "string" + } + } + }, + "JobStepExecutionOptions": { + "description": "The execution options of a job step.", + "type": "object", + "properties": { + "timeoutSeconds": { + "format": "int32", + "description": "Execution timeout for the job step.", + "default": 43200, + "type": "integer" + }, + "retryAttempts": { + "format": "int32", + "description": "Maximum number of times the job step will be reattempted if the first attempt fails.", + "default": 10, + "type": "integer" + }, + "initialRetryIntervalSeconds": { + "format": "int32", + "description": "Initial delay between retries for job step execution.", + "default": 1, + "type": "integer" + }, + "maximumRetryIntervalSeconds": { + "format": "int32", + "description": "The maximum amount of time to wait between retries for job step execution.", + "default": 120, + "type": "integer" + }, + "retryIntervalBackoffMultiplier": { + "format": "float", + "description": "The backoff multiplier for the time between retries.", + "default": 2.0, + "type": "number" + } + } + }, + "JobStep": { + "description": "A job step.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobStepProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobTargetExecutions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobTargetExecutions.json new file mode 100644 index 000000000000..014eb62adbdf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobTargetExecutions.json @@ -0,0 +1,536 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets": { + "get": { + "tags": [ + "JobTargetExecutions" + ], + "description": "Lists target executions for all steps of a job execution.", + "operationId": "JobTargetExecutions_ListByJobExecution", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "createTimeMin", + "in": "query", + "description": "If specified, only job executions created at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "createTimeMax", + "in": "query", + "description": "If specified, only job executions created before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMin", + "in": "query", + "description": "If specified, only job executions completed at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMax", + "in": "query", + "description": "If specified, only job executions completed before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "isActive", + "in": "query", + "description": "If specified, only active or only completed job executions are included.", + "required": false, + "type": "boolean" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the target executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job step target executions": { + "$ref": "./examples/ListJobExecutionTargetsByExecution.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets": { + "get": { + "tags": [ + "JobTargetExecutions" + ], + "description": "Lists the target executions of a job step execution.", + "operationId": "JobTargetExecutions_ListByStep", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the step.", + "required": true, + "type": "string" + }, + { + "name": "createTimeMin", + "in": "query", + "description": "If specified, only job executions created at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "createTimeMax", + "in": "query", + "description": "If specified, only job executions created before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMin", + "in": "query", + "description": "If specified, only job executions completed at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMax", + "in": "query", + "description": "If specified, only job executions completed before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "isActive", + "in": "query", + "description": "If specified, only active or only completed job executions are included.", + "required": false, + "type": "boolean" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the target executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job step target executions": { + "$ref": "./examples/ListJobExecutionTargetsByStep.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}": { + "get": { + "tags": [ + "JobTargetExecutions" + ], + "description": "Gets a target execution.", + "operationId": "JobTargetExecutions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The unique id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the step.", + "required": true, + "type": "string" + }, + { + "name": "targetId", + "in": "path", + "description": "The target id.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the target execution.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a job step target execution": { + "$ref": "./examples/GetJobExecutionTarget.json" + } + } + } + } + }, + "definitions": { + "JobExecutionListResult": { + "description": "A list of job executions.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecution" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecutionProperties": { + "description": "Properties for an Azure SQL Database Elastic job execution.", + "type": "object", + "properties": { + "jobVersion": { + "format": "int32", + "description": "The job version number.", + "type": "integer", + "readOnly": true + }, + "stepName": { + "description": "The job step name.", + "type": "string", + "readOnly": true + }, + "stepId": { + "format": "int32", + "description": "The job step id.", + "type": "integer", + "readOnly": true + }, + "jobExecutionId": { + "format": "uuid", + "description": "The unique identifier of the job execution.", + "type": "string", + "readOnly": true + }, + "lifecycle": { + "description": "The detailed state of the job execution.", + "enum": [ + "Created", + "InProgress", + "WaitingForChildJobExecutions", + "WaitingForRetry", + "Succeeded", + "SucceededWithSkipped", + "Failed", + "TimedOut", + "Canceled", + "Skipped" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobExecutionLifecycle", + "modelAsString": true + } + }, + "provisioningState": { + "description": "The ARM provisioning state of the job execution.", + "enum": [ + "Created", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "createTime": { + "format": "date-time", + "description": "The time that the job execution was created.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The time that the job execution started.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The time that the job execution completed.", + "type": "string", + "readOnly": true + }, + "currentAttempts": { + "format": "int32", + "description": "Number of times the job execution has been attempted.", + "type": "integer" + }, + "currentAttemptStartTime": { + "format": "date-time", + "description": "Start time of the current attempt.", + "type": "string", + "readOnly": true + }, + "lastMessage": { + "description": "The last status or error message.", + "type": "string", + "readOnly": true + }, + "target": { + "$ref": "#/definitions/JobExecutionTarget", + "description": "The target that this execution is executed on.", + "readOnly": true + } + } + }, + "JobExecutionTarget": { + "description": "The target that a job execution is executed on.", + "type": "object", + "properties": { + "type": { + "description": "The type of the target.", + "enum": [ + "TargetGroup", + "SqlDatabase", + "SqlElasticPool", + "SqlShardMap", + "SqlServer" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobTargetType", + "modelAsString": true + } + }, + "serverName": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The database name.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecution": { + "description": "An execution of a job", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobExecutionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobTargetGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobTargetGroups.json new file mode 100644 index 000000000000..8a94b3668352 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobTargetGroups.json @@ -0,0 +1,373 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups": { + "get": { + "tags": [ + "JobTargetGroups" + ], + "description": "Gets all target groups in an agent.", + "operationId": "JobTargetGroups_ListByAgent", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of target groups.", + "schema": { + "$ref": "#/definitions/JobTargetGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all target groups in an agent.": { + "$ref": "./examples/ListJobTargetGroups.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}": { + "get": { + "tags": [ + "JobTargetGroups" + ], + "description": "Gets a target group.", + "operationId": "JobTargetGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "targetGroupName", + "in": "path", + "description": "The name of the target group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the target group.", + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a target group.": { + "$ref": "./examples/GetJobTargetGroup.json" + } + } + }, + "put": { + "tags": [ + "JobTargetGroups" + ], + "description": "Creates or updates a target group.", + "operationId": "JobTargetGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "targetGroupName", + "in": "path", + "description": "The name of the target group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested state of the target group.", + "required": true, + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the target group.", + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingJobAccountNameWithUrl - The provided job account name did not match the name in the Url.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "201": { + "description": "Successfully created the target group.", + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + } + }, + "x-ms-examples": { + "Create or update a target group with minimal properties.": { + "$ref": "./examples/CreateOrUpdateJobTargetGroupMin.json" + }, + "Create or update a target group with all properties.": { + "$ref": "./examples/CreateOrUpdateJobTargetGroupMax.json" + } + } + }, + "delete": { + "tags": [ + "JobTargetGroups" + ], + "description": "Deletes a target group.", + "operationId": "JobTargetGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "targetGroupName", + "in": "path", + "description": "The name of the target group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the target group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "A target group with the specified name does not exist." + } + }, + "x-ms-examples": { + "Delete a target group.": { + "$ref": "./examples/DeleteJobTargetGroup.json" + } + } + } + } + }, + "definitions": { + "JobTargetGroupListResult": { + "description": "A list of target groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobTargetGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobTargetGroupProperties": { + "description": "Properties of job target group.", + "required": [ + "members" + ], + "type": "object", + "properties": { + "members": { + "description": "Members of the target group.", + "type": "array", + "items": { + "$ref": "#/definitions/JobTarget" + } + } + } + }, + "JobTarget": { + "description": "A job target, for example a specific database or a container of databases that is evaluated during job execution.", + "required": [ + "type" + ], + "type": "object", + "properties": { + "membershipType": { + "description": "Whether the target is included or excluded from the group.", + "default": "Include", + "enum": [ + "Include", + "Exclude" + ], + "type": "string", + "x-ms-enum": { + "name": "JobTargetGroupMembershipType", + "modelAsString": false + } + }, + "type": { + "description": "The target type.", + "enum": [ + "TargetGroup", + "SqlDatabase", + "SqlElasticPool", + "SqlShardMap", + "SqlServer" + ], + "type": "string", + "x-ms-enum": { + "name": "JobTargetType", + "modelAsString": true + } + }, + "serverName": { + "description": "The target server name.", + "type": "string" + }, + "databaseName": { + "description": "The target database name.", + "type": "string" + }, + "elasticPoolName": { + "description": "The target elastic pool name.", + "type": "string" + }, + "shardMapName": { + "description": "The target shard map.", + "type": "string" + }, + "refreshCredential": { + "description": "The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target.", + "type": "string" + } + } + }, + "JobTargetGroup": { + "description": "A group of job targets.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobTargetGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobVersions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobVersions.json new file mode 100644 index 000000000000..a948ced1a7ce --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/JobVersions.json @@ -0,0 +1,189 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions": { + "get": { + "tags": [ + "JobVersions" + ], + "description": "Gets all versions of a job.", + "operationId": "JobVersions_ListByJob", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of versions.", + "schema": { + "$ref": "#/definitions/JobVersionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all versions of a job.": { + "$ref": "./examples/ListJobVersions.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}": { + "get": { + "tags": [ + "JobVersions" + ], + "description": "Gets a job version.", + "operationId": "JobVersions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobVersion", + "in": "path", + "description": "The version of the job to get.", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job version.", + "schema": { + "$ref": "#/definitions/JobVersion" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get a version of a job.": { + "$ref": "./examples/GetJobVersion.json" + } + } + } + } + }, + "definitions": { + "JobVersionListResult": { + "description": "A list of job versions.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobVersion" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobVersion": { + "description": "A job version.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": {} + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Jobs.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Jobs.json new file mode 100644 index 000000000000..e488ac13b57d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Jobs.json @@ -0,0 +1,360 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs": { + "get": { + "tags": [ + "Jobs" + ], + "description": "Gets a list of jobs.", + "operationId": "Jobs_ListByAgent", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of jobs.", + "schema": { + "$ref": "#/definitions/JobListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List jobs in a job agent": { + "$ref": "./examples/ListJobsByAgent.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}": { + "get": { + "tags": [ + "Jobs" + ], + "description": "Gets a job.", + "operationId": "Jobs_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job.", + "schema": { + "$ref": "#/definitions/Job" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a job": { + "$ref": "./examples/GetJob.json" + } + } + }, + "put": { + "tags": [ + "Jobs" + ], + "description": "Creates or updates a job.", + "operationId": "Jobs_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested job state.", + "required": true, + "schema": { + "$ref": "#/definitions/Job" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job.", + "schema": { + "$ref": "#/definitions/Job" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidDuration - Invalid duration.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "201": { + "description": "Successfully created the job.", + "schema": { + "$ref": "#/definitions/Job" + } + } + }, + "x-ms-examples": { + "Create a job with default properties": { + "$ref": "./examples/CreateOrUpdateJobMin.json" + }, + "Create a job with all properties specified": { + "$ref": "./examples/CreateOrUpdateJobMax.json" + } + } + }, + "delete": { + "tags": [ + "Jobs" + ], + "description": "Deletes a job.", + "operationId": "Jobs_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the job." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "The specified job does not exist." + } + }, + "x-ms-examples": { + "Delete a job": { + "$ref": "./examples/DeleteJob.json" + } + } + } + } + }, + "definitions": { + "JobListResult": { + "description": "A list of jobs.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Job" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobProperties": { + "description": "Properties of a job.", + "type": "object", + "properties": { + "description": { + "description": "User-defined description of the job.", + "default": "", + "type": "string" + }, + "version": { + "format": "int32", + "description": "The job version number.", + "type": "integer", + "readOnly": true + }, + "schedule": { + "$ref": "#/definitions/JobSchedule", + "description": "Schedule properties of the job." + } + } + }, + "JobSchedule": { + "description": "Scheduling properties of a job.", + "type": "object", + "properties": { + "startTime": { + "format": "date-time", + "description": "Schedule start time.", + "default": "0001-01-01T00:00:00+00:00", + "type": "string" + }, + "endTime": { + "format": "date-time", + "description": "Schedule end time.", + "default": "9999-12-31T11:59:59+00:00", + "type": "string" + }, + "type": { + "description": "Schedule interval type", + "default": "Once", + "enum": [ + "Once", + "Recurring" + ], + "type": "string", + "x-ms-enum": { + "name": "JobScheduleType", + "modelAsString": false + } + }, + "enabled": { + "description": "Whether or not the schedule is enabled.", + "type": "boolean" + }, + "interval": { + "description": "Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format.", + "type": "string" + } + } + }, + "Job": { + "description": "A job.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LedgerDigestUploads.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LedgerDigestUploads.json new file mode 100644 index 000000000000..5a1e1d03fe00 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LedgerDigestUploads.json @@ -0,0 +1,331 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}": { + "get": { + "tags": [ + "LedgerDigestUploads" + ], + "description": "Gets the current ledger digest upload configuration for a database.", + "operationId": "LedgerDigestUploads_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "ledgerDigestUploads", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "LedgerDigestUploadsName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the ledger digest configuration.", + "schema": { + "$ref": "#/definitions/LedgerDigestUploads" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Gets the current ledger digest upload configuration for a database.": { + "$ref": "./examples/LedgerDigestUploadsGet.json" + } + } + }, + "put": { + "tags": [ + "LedgerDigestUploads" + ], + "description": "Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance.", + "operationId": "LedgerDigestUploads_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "ledgerDigestUploads", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "LedgerDigestUploadsName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LedgerDigestUploads" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the ledger digest upload configuration", + "schema": { + "$ref": "#/definitions/LedgerDigestUploads" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 400 NoServerIdentity - No identity is configured for specified server. For information on how to configure an identity for the server see https://go.microsoft.com/fwlink/?linkid=2156804\n\n * 400 SubscriptionDoesNotHaveServer - Subscription {0} does not contain server {1}.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered. The error message from Active Directory Authentication library (ADAL) is {0}.\n\n * 400 InsufficientStorageAccountPermissions - Read or write operations are not allowed on the storage account {0}.\n\n * 400 StorageAccountIsDisabled - The storage account {0} is disabled.\n\n * 404 SourceDatabaseNotFound - Specified database does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "202": { + "description": "Updating the ledger digest upload configuration is in progress." + } + }, + "x-ms-examples": { + "Enables ledger digest upload configuration for a database": { + "$ref": "./examples/LedgerDigestUploadsEnable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads": { + "get": { + "tags": [ + "LedgerDigestUploads" + ], + "description": "Gets all ledger digest upload settings on a database.", + "operationId": "LedgerDigestUploads_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved ledger upload settings.", + "schema": { + "$ref": "#/definitions/LedgerDigestUploadsListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of ledger digest upload settings on a database.": { + "$ref": "./examples/LedgerDigestUploadsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable": { + "post": { + "tags": [ + "LedgerDigestUploads" + ], + "description": "Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance.", + "operationId": "LedgerDigestUploads_Disable", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "ledgerDigestUploads", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "LedgerDigestUploadsName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled uploading ledger digests", + "schema": { + "$ref": "#/definitions/LedgerDigestUploads" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 400 NoServerIdentity - No identity is configured for specified server. For information on how to configure an identity for the server see https://go.microsoft.com/fwlink/?linkid=2156804\n\n * 400 SubscriptionDoesNotHaveServer - Subscription {0} does not contain server {1}.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered. The error message from Active Directory Authentication library (ADAL) is {0}.\n\n * 400 InsufficientStorageAccountPermissions - Read or write operations are not allowed on the storage account {0}.\n\n * 400 StorageAccountIsDisabled - The storage account {0} is disabled.\n\n * 404 SourceDatabaseNotFound - Specified database does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "202": { + "description": "Disabling the ledger digest upload is in progress." + } + }, + "x-ms-examples": { + "Disables uploading ledger digests for a database": { + "$ref": "./examples/LedgerDigestUploadsDisable.json" + } + } + } + } + }, + "definitions": { + "LedgerDigestUploadsProperties": { + "description": "The properties of a database ledger digest upload settings.", + "type": "object", + "properties": { + "digestStorageEndpoint": { + "description": "The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger.", + "type": "string" + }, + "state": { + "description": "Specifies the state of ledger digest upload.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "LedgerDigestUploadsState", + "modelAsString": false + } + } + } + }, + "LedgerDigestUploads": { + "description": "Azure SQL Database ledger digest upload settings.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/LedgerDigestUploadsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "LedgerDigestUploadsListResult": { + "description": "A list of ledger digest upload settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/LedgerDigestUploads" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LocationCapabilities.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LocationCapabilities.json new file mode 100644 index 000000000000..13b19d0c923b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LocationCapabilities.json @@ -0,0 +1,1273 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/capabilities": { + "get": { + "tags": [ + "LocationCapabilities" + ], + "description": "Gets the subscription capabilities available for the specified location.", + "operationId": "Capabilities_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location name whose capabilities are retrieved.", + "required": true, + "type": "string" + }, + { + "name": "include", + "in": "query", + "description": "If specified, restricts the response to only include the selected item.", + "required": false, + "type": "string", + "enum": [ + "supportedEditions", + "supportedElasticPoolEditions", + "supportedManagedInstanceVersions", + "supportedInstancePoolEditions", + "supportedManagedInstanceEditions" + ], + "x-ms-enum": { + "name": "CapabilityGroup", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the subscription location capabilities.", + "schema": { + "$ref": "#/definitions/LocationCapabilities" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 SubscriptionNotFound - The requested subscription was not found." + } + }, + "x-ms-examples": { + "List subscription capabilities in the given location.": { + "$ref": "./examples/LocationCapabilityListByLocation.json" + } + } + } + } + }, + "definitions": { + "LocationCapabilities": { + "description": "The location capability.", + "type": "object", + "properties": { + "name": { + "description": "The location name.", + "type": "string", + "readOnly": true + }, + "supportedServerVersions": { + "description": "The list of supported server versions.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerVersionCapability" + }, + "readOnly": true + }, + "supportedManagedInstanceVersions": { + "description": "The list of supported managed instance versions.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceVersionCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ServerVersionCapability": { + "description": "The server capability", + "type": "object", + "properties": { + "name": { + "description": "The server version name.", + "type": "string", + "readOnly": true + }, + "supportedEditions": { + "description": "The list of supported database editions.", + "type": "array", + "items": { + "$ref": "#/definitions/EditionCapability" + }, + "readOnly": true + }, + "supportedElasticPoolEditions": { + "description": "The list of supported elastic pool editions.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPoolEditionCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ManagedInstanceVersionCapability": { + "description": "The managed instance capability", + "type": "object", + "properties": { + "name": { + "description": "The server version name.", + "type": "string", + "readOnly": true + }, + "supportedEditions": { + "description": "The list of supported managed instance editions.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceEditionCapability" + }, + "readOnly": true + }, + "supportedInstancePoolEditions": { + "description": "The list of supported instance pool editions.", + "type": "array", + "items": { + "$ref": "#/definitions/InstancePoolEditionCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "EditionCapability": { + "description": "The edition capability.", + "type": "object", + "properties": { + "name": { + "description": "The database edition name.", + "type": "string", + "readOnly": true + }, + "supportedServiceLevelObjectives": { + "description": "The list of supported service objectives for the edition.", + "type": "array", + "items": { + "$ref": "#/definitions/ServiceObjectiveCapability" + }, + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the edition.", + "type": "boolean", + "readOnly": true + }, + "readScale": { + "$ref": "#/definitions/ReadScaleCapability", + "description": "The read scale capability for the edition.", + "readOnly": true + }, + "supportedStorageCapabilities": { + "description": "The list of supported storage capabilities for this edition", + "type": "array", + "items": { + "$ref": "#/definitions/StorageCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ElasticPoolEditionCapability": { + "description": "The elastic pool edition capability.", + "type": "object", + "properties": { + "name": { + "description": "The elastic pool edition name.", + "type": "string", + "readOnly": true + }, + "supportedElasticPoolPerformanceLevels": { + "description": "The list of supported elastic pool DTU levels for the edition.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPoolPerformanceLevelCapability" + }, + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the edition.", + "type": "boolean", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ManagedInstanceEditionCapability": { + "description": "The managed server capability", + "type": "object", + "properties": { + "name": { + "description": "The managed server version name.", + "type": "string", + "readOnly": true + }, + "supportedFamilies": { + "description": "The supported families.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceFamilyCapability" + }, + "readOnly": true + }, + "supportedStorageCapabilities": { + "description": "The list of supported storage capabilities for this edition", + "type": "array", + "items": { + "$ref": "#/definitions/StorageCapability" + }, + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the edition.", + "type": "boolean", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "InstancePoolEditionCapability": { + "description": "The instance pool capability", + "type": "object", + "properties": { + "name": { + "description": "The instance pool version name.", + "type": "string", + "readOnly": true + }, + "supportedFamilies": { + "description": "The supported families.", + "type": "array", + "items": { + "$ref": "#/definitions/InstancePoolFamilyCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ServiceObjectiveCapability": { + "description": "The service objectives capability.", + "type": "object", + "properties": { + "id": { + "format": "uuid", + "description": "The unique ID of the service objective.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The service objective name.", + "type": "string", + "readOnly": true + }, + "supportedMaxSizes": { + "description": "The list of supported maximum database sizes.", + "type": "array", + "items": { + "$ref": "#/definitions/MaxSizeRangeCapability" + }, + "readOnly": true + }, + "performanceLevel": { + "$ref": "#/definitions/PerformanceLevelCapability", + "description": "The performance level.", + "readOnly": true + }, + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The sku.", + "readOnly": true + }, + "supportedLicenseTypes": { + "description": "List of supported license types.", + "type": "array", + "items": { + "$ref": "#/definitions/LicenseTypeCapability" + }, + "readOnly": true + }, + "includedMaxSize": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "The included (free) max size.", + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the service objective.", + "type": "boolean", + "readOnly": true + }, + "supportedAutoPauseDelay": { + "$ref": "#/definitions/AutoPauseDelayTimeRange", + "description": "Supported time range for auto pause delay", + "readOnly": true + }, + "supportedMinCapacities": { + "description": "List of supported min capacities", + "type": "array", + "items": { + "$ref": "#/definitions/MinCapacityCapability" + }, + "readOnly": true + }, + "computeModel": { + "description": "The compute model", + "type": "string", + "readOnly": true + }, + "supportedMaintenanceConfigurations": { + "description": "List of supported maintenance configurations", + "type": "array", + "items": { + "$ref": "#/definitions/MaintenanceConfigurationCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ReadScaleCapability": { + "description": "The read scale capability.", + "type": "object", + "properties": { + "maxNumberOfReplicas": { + "format": "int32", + "description": "The maximum number of read scale replicas.", + "type": "integer", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "StorageCapability": { + "description": "The storage account type capability.", + "type": "object", + "properties": { + "storageAccountType": { + "description": "The storage account type for the database's backups.", + "enum": [ + "GRS", + "LRS", + "ZRS" + ], + "type": "string", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ElasticPoolPerformanceLevelCapability": { + "description": "The Elastic Pool performance level capability.", + "type": "object", + "properties": { + "performanceLevel": { + "$ref": "#/definitions/PerformanceLevelCapability", + "description": "The performance level for the pool.", + "readOnly": true + }, + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The sku.", + "readOnly": true + }, + "supportedLicenseTypes": { + "description": "List of supported license types.", + "type": "array", + "items": { + "$ref": "#/definitions/LicenseTypeCapability" + }, + "readOnly": true + }, + "maxDatabaseCount": { + "format": "int32", + "description": "The maximum number of databases supported.", + "type": "integer", + "readOnly": true + }, + "includedMaxSize": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "The included (free) max size for this performance level.", + "readOnly": true + }, + "supportedMaxSizes": { + "description": "The list of supported max sizes.", + "type": "array", + "items": { + "$ref": "#/definitions/MaxSizeRangeCapability" + }, + "readOnly": true + }, + "supportedPerDatabaseMaxSizes": { + "description": "The list of supported per database max sizes.", + "type": "array", + "items": { + "$ref": "#/definitions/MaxSizeRangeCapability" + }, + "readOnly": true + }, + "supportedPerDatabaseMaxPerformanceLevels": { + "description": "The list of supported per database max performance levels.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPoolPerDatabaseMaxPerformanceLevelCapability" + }, + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the performance level.", + "type": "boolean", + "readOnly": true + }, + "supportedMaintenanceConfigurations": { + "description": "List of supported maintenance configurations", + "type": "array", + "items": { + "$ref": "#/definitions/MaintenanceConfigurationCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ManagedInstanceFamilyCapability": { + "description": "The managed server family capability.", + "type": "object", + "properties": { + "name": { + "description": "Family name.", + "type": "string", + "readOnly": true + }, + "sku": { + "description": "SKU name.", + "type": "string", + "readOnly": true + }, + "supportedLicenseTypes": { + "description": "List of supported license types.", + "type": "array", + "items": { + "$ref": "#/definitions/LicenseTypeCapability" + }, + "readOnly": true + }, + "supportedVcoresValues": { + "description": "List of supported virtual cores values.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceVcoresCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "InstancePoolFamilyCapability": { + "description": "The instance pool family capability.", + "type": "object", + "properties": { + "name": { + "description": "Family name.", + "type": "string", + "readOnly": true + }, + "supportedLicenseTypes": { + "description": "List of supported license types.", + "type": "array", + "items": { + "$ref": "#/definitions/LicenseTypeCapability" + }, + "readOnly": true + }, + "supportedVcoresValues": { + "description": "List of supported virtual cores values.", + "type": "array", + "items": { + "$ref": "#/definitions/InstancePoolVcoresCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "MaxSizeRangeCapability": { + "description": "The maximum size range capability.", + "type": "object", + "properties": { + "minValue": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "Minimum value.", + "readOnly": true + }, + "maxValue": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "Maximum value.", + "readOnly": true + }, + "scaleSize": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "Scale/step size for discrete values between the minimum value and the maximum value.", + "readOnly": true + }, + "logSize": { + "$ref": "#/definitions/LogSizeCapability", + "description": "Size of transaction log.", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "PerformanceLevelCapability": { + "description": "The performance level capability.", + "type": "object", + "properties": { + "value": { + "format": "double", + "description": "Performance level value.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit type used to measure performance level.", + "enum": [ + "DTU", + "VCores" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PerformanceLevelUnit", + "modelAsString": true + } + } + } + }, + "LicenseTypeCapability": { + "description": "The license type capability", + "type": "object", + "properties": { + "name": { + "description": "License type identifier.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "MaxSizeCapability": { + "description": "The maximum size capability.", + "type": "object", + "properties": { + "limit": { + "format": "int32", + "description": "The maximum size limit (see 'unit' for the units).", + "type": "integer", + "readOnly": true + }, + "unit": { + "description": "The units that the limit is expressed in.", + "enum": [ + "Megabytes", + "Gigabytes", + "Terabytes", + "Petabytes" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "MaxSizeUnit", + "modelAsString": true + } + } + } + }, + "AutoPauseDelayTimeRange": { + "description": "Supported auto pause delay time range", + "type": "object", + "properties": { + "minValue": { + "format": "int32", + "description": "Minimum value", + "type": "integer", + "readOnly": true + }, + "maxValue": { + "format": "int32", + "description": "Maximum value", + "type": "integer", + "readOnly": true + }, + "stepSize": { + "format": "int32", + "description": "Step value for discrete values between the minimum value and the maximum value.", + "type": "integer", + "readOnly": true + }, + "default": { + "format": "int32", + "description": "Default value is no value is provided", + "type": "integer", + "readOnly": true + }, + "unit": { + "description": "Unit of time that delay is expressed in", + "enum": [ + "Minutes" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PauseDelayTimeUnit", + "modelAsString": true + } + }, + "doNotPauseValue": { + "format": "int32", + "description": "Value that is used to not pause (infinite delay before pause)", + "type": "integer", + "readOnly": true + } + } + }, + "MinCapacityCapability": { + "description": "The min capacity capability", + "type": "object", + "properties": { + "value": { + "format": "double", + "description": "Min capacity value", + "type": "number", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "MaintenanceConfigurationCapability": { + "description": "The maintenance configuration capability", + "type": "object", + "properties": { + "name": { + "description": "Maintenance configuration name", + "type": "string", + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the maintenance configuration.", + "type": "boolean", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ElasticPoolPerDatabaseMaxPerformanceLevelCapability": { + "description": "The max per-database performance level capability.", + "type": "object", + "properties": { + "limit": { + "format": "double", + "description": "The maximum performance level per database.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit type used to measure performance level.", + "enum": [ + "DTU", + "VCores" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PerformanceLevelUnit", + "modelAsString": true + } + }, + "supportedPerDatabaseMinPerformanceLevels": { + "description": "The list of supported min database performance levels.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPoolPerDatabaseMinPerformanceLevelCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ManagedInstanceVcoresCapability": { + "description": "The managed instance virtual cores capability.", + "type": "object", + "properties": { + "name": { + "description": "The virtual cores identifier.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "int32", + "description": "The virtual cores value.", + "type": "integer", + "readOnly": true + }, + "includedMaxSize": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "Included size.", + "readOnly": true + }, + "supportedStorageSizes": { + "description": "Storage size ranges.", + "type": "array", + "items": { + "$ref": "#/definitions/MaxSizeRangeCapability" + }, + "readOnly": true + }, + "instancePoolSupported": { + "description": "True if this service objective is supported for managed instances in an instance pool.", + "type": "boolean", + "readOnly": true + }, + "standaloneSupported": { + "description": "True if this service objective is supported for standalone managed instances.", + "type": "boolean", + "readOnly": true + }, + "supportedMaintenanceConfigurations": { + "description": "List of supported maintenance configurations", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceMaintenanceConfigurationCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "InstancePoolVcoresCapability": { + "description": "The managed instance virtual cores capability.", + "type": "object", + "properties": { + "name": { + "description": "The virtual cores identifier.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "int32", + "description": "The virtual cores value.", + "type": "integer", + "readOnly": true + }, + "storageLimit": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "Storage limit.", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "LogSizeCapability": { + "description": "The log size capability.", + "type": "object", + "properties": { + "limit": { + "format": "int32", + "description": "The log size limit (see 'unit' for the units).", + "type": "integer", + "readOnly": true + }, + "unit": { + "description": "The units that the limit is expressed in.", + "enum": [ + "Megabytes", + "Gigabytes", + "Terabytes", + "Petabytes", + "Percent" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "LogSizeUnit", + "modelAsString": true + } + } + } + }, + "ElasticPoolPerDatabaseMinPerformanceLevelCapability": { + "description": "The minimum per-database performance level capability.", + "type": "object", + "properties": { + "limit": { + "format": "double", + "description": "The minimum performance level per database.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit type used to measure performance level.", + "enum": [ + "DTU", + "VCores" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PerformanceLevelUnit", + "modelAsString": true + } + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ManagedInstanceMaintenanceConfigurationCapability": { + "description": "The maintenance configuration capability", + "type": "object", + "properties": { + "name": { + "description": "Maintenance configuration name", + "type": "string", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionBackups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionBackups.json new file mode 100644 index 000000000000..2fa4d975890d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionBackups.json @@ -0,0 +1,1305 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy": { + "post": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Copy an existing long term retention backup.", + "operationId": "LongTermRetentionBackups_Copy", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters needed for long term retention copy request", + "required": true, + "schema": { + "$ref": "#/definitions/CopyLongTermRetentionBackupParameters" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully copied the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 500 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed." + }, + "202": { + "description": "Copying the backup is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Copy the long term retention backup.": { + "$ref": "./examples/LongTermRetentionBackupCopy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update": { + "post": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Updates an existing long term retention backup.", + "operationId": "LongTermRetentionBackups_Update", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested backup resource state", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateLongTermRetentionBackupParameters" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 500 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed." + }, + "202": { + "description": "Updating the backup is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the long term retention backup.": { + "$ref": "./examples/LongTermRetentionBackupUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Gets a long term retention backup.", + "operationId": "LongTermRetentionBackups_Get", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the long term retention backup.": { + "$ref": "./examples/LongTermRetentionBackupGet.json" + } + } + }, + "delete": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Deletes a long term retention backup.", + "operationId": "LongTermRetentionBackups_Delete", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the backup." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the long term retention backup.": { + "$ref": "./examples/LongTermRetentionBackupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists all long term retention backups for a database.", + "operationId": "LongTermRetentionBackups_ListByDatabase", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the database.": { + "$ref": "./examples/LongTermRetentionBackupListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists the long term retention backups for a given location.", + "operationId": "LongTermRetentionBackups_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the location.": { + "$ref": "./examples/LongTermRetentionBackupListByLocation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists the long term retention backups for a given server.", + "operationId": "LongTermRetentionBackups_ListByServer", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the server.": { + "$ref": "./examples/LongTermRetentionBackupListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy": { + "post": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Copy an existing long term retention backup to a different server.", + "operationId": "LongTermRetentionBackups_CopyByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters needed for long term retention copy request", + "required": true, + "schema": { + "$ref": "#/definitions/CopyLongTermRetentionBackupParameters" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully Copied the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 500 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed." + }, + "202": { + "description": "Copying the backup is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Copy the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupCopy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update": { + "post": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Updates an existing long term retention backup.", + "operationId": "LongTermRetentionBackups_UpdateByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested backup resource state", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateLongTermRetentionBackupParameters" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 500 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed." + }, + "202": { + "description": "Updating the backup is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Gets a long term retention backup.", + "operationId": "LongTermRetentionBackups_GetByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupGet.json" + } + } + }, + "delete": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Deletes a long term retention backup.", + "operationId": "LongTermRetentionBackups_DeleteByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the backup." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists all long term retention backups for a database.", + "operationId": "LongTermRetentionBackups_ListByResourceGroupDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the database.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists the long term retention backups for a given location.", + "operationId": "LongTermRetentionBackups_ListByResourceGroupLocation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the location.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists the long term retention backups for a given server.", + "operationId": "LongTermRetentionBackups_ListByResourceGroupServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the server.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json" + } + } + } + } + }, + "definitions": { + "CopyLongTermRetentionBackupParameters": { + "description": "Contains the information necessary to perform long term retention backup copy operation.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/CopyLongTermRetentionBackupParametersProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "CopyLongTermRetentionBackupParametersProperties": { + "description": "Contains the properties to perform long term retention backup copy operation.", + "type": "object", + "properties": { + "targetSubscriptionId": { + "description": "The subscription that owns the target server", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "targetResourceGroup": { + "description": "The resource group that owns the target server", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "targetServerResourceId": { + "description": "The resource Id of the target server that owns the database", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "targetServerFullyQualifiedDomainName": { + "description": "The fully qualified domain name of the target server", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "targetDatabaseName": { + "description": "The name of the database owns the copied backup.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "targetBackupStorageRedundancy": { + "description": "The storage redundancy type of the copied backup", + "enum": [ + "Geo", + "Local", + "Zone" + ], + "type": "string", + "x-ms-enum": { + "name": "TargetBackupStorageRedundancy", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + } + } + }, + "LongTermRetentionOperationResultProperties": { + "description": "Contains the operation result properties for long term retention backup operation.", + "type": "object", + "properties": { + "requestId": { + "format": "uuid", + "description": "Request Id.", + "type": "string", + "readOnly": true + }, + "operationType": { + "description": "Operation type.", + "type": "string", + "readOnly": true + }, + "fromBackupResourceId": { + "description": "Source backup resource id", + "type": "string", + "readOnly": true + }, + "toBackupResourceId": { + "description": "Target backup resource id", + "type": "string", + "readOnly": true + }, + "targetBackupStorageRedundancy": { + "description": "The storage redundancy type of the copied backup", + "enum": [ + "Geo", + "Local", + "Zone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "status": { + "description": "Operation status", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Progress message", + "type": "string", + "readOnly": true + } + } + }, + "LongTermRetentionBackupOperationResult": { + "description": "A LongTermRetentionBackup operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/LongTermRetentionOperationResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "UpdateLongTermRetentionBackupParameters": { + "description": "Contains the information necessary to perform long term retention backup update operation.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/UpdateLongTermRetentionBackupParametersProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "UpdateLongTermRetentionBackupParametersProperties": { + "description": "Contains the properties to perform long term retention backup copy operation.", + "type": "object", + "properties": { + "requestedBackupStorageRedundancy": { + "description": "The storage redundancy type of the copied backup", + "enum": [ + "Geo", + "Local", + "Zone" + ], + "type": "string", + "x-ms-enum": { + "name": "RequestedBackupStorageRedundancy", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + } + } + }, + "LongTermRetentionBackupProperties": { + "description": "Properties of a long term retention backup", + "type": "object", + "properties": { + "serverName": { + "description": "The server name that the backup database belong to.", + "type": "string", + "readOnly": true + }, + "serverCreateTime": { + "format": "date-time", + "description": "The create time of the server.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The name of the database the backup belong to", + "type": "string", + "readOnly": true + }, + "databaseDeletionTime": { + "format": "date-time", + "description": "The delete time of the database", + "type": "string", + "readOnly": true + }, + "backupTime": { + "format": "date-time", + "description": "The time the backup was taken", + "type": "string", + "readOnly": true + }, + "backupExpirationTime": { + "format": "date-time", + "description": "The time the long term retention backup will expire.", + "type": "string", + "readOnly": true + }, + "backupStorageRedundancy": { + "description": "The storage redundancy type of the backup", + "enum": [ + "Geo", + "Local", + "Zone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "requestedBackupStorageRedundancy": { + "description": "The storage redundancy type of the backup", + "enum": [ + "Geo", + "Local", + "Zone" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update" + ] + } + } + }, + "LongTermRetentionBackup": { + "description": "A long term retention backup.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/LongTermRetentionBackupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "LongTermRetentionBackupListResult": { + "description": "A list of long term retention backups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/LongTermRetentionBackup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionManagedInstanceBackups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionManagedInstanceBackups.json new file mode 100644 index 000000000000..cbc9f9c87542 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionManagedInstanceBackups.json @@ -0,0 +1,818 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Gets a long term retention backup for a managed database.", + "operationId": "LongTermRetentionManagedInstanceBackups_Get", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the backup.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionManagedInstanceBackupId - Invalid long term retention backup identifier for Managed Instances.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the long term retention backup of a managed database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupGet.json" + } + } + }, + "delete": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Deletes a long term retention backup.", + "operationId": "LongTermRetentionManagedInstanceBackups_Delete", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the backup." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionManagedInstanceBackupId - Invalid long term retention backup identifier for Managed Instances.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the long term retention backup.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists all long term retention backups for a managed database.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByDatabase", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists the long term retention backups for a given managed instance.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByInstance", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the managed instance.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists the long term retention backups for managed databases in a given location.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the location.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupListByLocation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Gets a long term retention backup for a managed database.", + "operationId": "LongTermRetentionManagedInstanceBackups_GetByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the backup.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionManagedInstanceBackupId - Invalid long term retention backup identifier for Managed Instances.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json" + } + } + }, + "delete": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Deletes a long term retention backup.", + "operationId": "LongTermRetentionManagedInstanceBackups_DeleteByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the backup." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionManagedInstanceBackupId - Invalid long term retention backup identifier for Managed Instances.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists all long term retention backups for a managed database.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByResourceGroupDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the database.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists the long term retention backups for a given managed instance.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByResourceGroupInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the managed instance.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists the long term retention backups for managed databases in a given location.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByResourceGroupLocation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the location.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceLongTermRetentionBackupProperties": { + "description": "Properties of a long term retention backup", + "type": "object", + "properties": { + "managedInstanceName": { + "description": "The managed instance that the backup database belongs to.", + "type": "string", + "readOnly": true + }, + "managedInstanceCreateTime": { + "format": "date-time", + "description": "The create time of the instance.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The name of the database the backup belong to", + "type": "string", + "readOnly": true + }, + "databaseDeletionTime": { + "format": "date-time", + "description": "The delete time of the database", + "type": "string", + "readOnly": true + }, + "backupTime": { + "format": "date-time", + "description": "The time the backup was taken", + "type": "string", + "readOnly": true + }, + "backupExpirationTime": { + "format": "date-time", + "description": "The time the long term retention backup will expire.", + "type": "string", + "readOnly": true + }, + "backupStorageRedundancy": { + "description": "The storage redundancy type of the backup", + "enum": [ + "Geo", + "Local", + "Zone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + } + } + }, + "ManagedInstanceLongTermRetentionBackup": { + "description": "A long term retention backup for a managed database.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceLongTermRetentionBackupListResult": { + "description": "A list of long term retention backups for managed database(s).", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionPolicies.json new file mode 100644 index 000000000000..3a04140b5eab --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionPolicies.json @@ -0,0 +1,277 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "LongTermRetentionPolicies" + ], + "description": "Gets a database's long term retention policy.", + "operationId": "LongTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be Default.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "LongTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get the policy.", + "schema": { + "$ref": "#/definitions/LongTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the long term retention policy for the database.": { + "$ref": "./examples/LongTermRetentionPolicyGet.json" + } + } + }, + "put": { + "tags": [ + "LongTermRetentionPolicies" + ], + "description": "Sets a database's long term retention policy.", + "operationId": "LongTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be Default.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "LongTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The long term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/LongTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the policy.", + "schema": { + "$ref": "#/definitions/LongTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMissingWeekOfYear - WeekOfYear is required to be set between 1 and 52 in order to set yearly retention.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or update the long term retention policy for the database.": { + "$ref": "./examples/LongTermRetentionPolicyCreateOrUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies": { + "get": { + "tags": [ + "LongTermRetentionPolicies" + ], + "description": "Gets a database's long term retention policy.", + "operationId": "LongTermRetentionPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get the policy.", + "schema": { + "$ref": "#/definitions/LongTermRetentionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the long term retention policy for the database.": { + "$ref": "./examples/LongTermRetentionPolicyListByDatabase.json" + } + } + } + } + }, + "definitions": { + "BaseLongTermRetentionPolicyProperties": { + "description": "Properties of a long term retention policy", + "type": "object", + "properties": { + "weeklyRetention": { + "description": "The weekly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "monthlyRetention": { + "description": "The monthly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "yearlyRetention": { + "description": "The yearly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "weekOfYear": { + "format": "int32", + "description": "The week of year to take the yearly backup in an ISO 8601 format.", + "type": "integer" + } + } + }, + "LongTermRetentionPolicy": { + "description": "A long term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/BaseLongTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "LongTermRetentionPolicyListResult": { + "description": "A list of long term retention policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/LongTermRetentionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/MaintenanceWindowOptions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/MaintenanceWindowOptions.json new file mode 100644 index 000000000000..ce148699b18f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/MaintenanceWindowOptions.json @@ -0,0 +1,184 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindowOptions/current": { + "get": { + "tags": [ + "MaintenanceWindowOptions" + ], + "description": "Gets a list of available maintenance windows.", + "operationId": "MaintenanceWindowOptions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to get maintenance windows options for.", + "required": true, + "type": "string" + }, + { + "name": "maintenanceWindowOptionsName", + "in": "query", + "description": "Maintenance window options name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of maintenance windows options.", + "schema": { + "$ref": "#/definitions/MaintenanceWindowOptions" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-examples": { + "Gets a list of available maintenance windows for a selected database.": { + "$ref": "./examples/GetMaintenanceWindowOptions.json" + } + } + } + } + }, + "definitions": { + "MaintenanceWindowOptionsProperties": { + "description": "Maintenance window options properties.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Whether maintenance windows are enabled for the database.", + "type": "boolean" + }, + "maintenanceWindowCycles": { + "description": "Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}.", + "type": "array", + "items": { + "$ref": "#/definitions/MaintenanceWindowTimeRange" + } + }, + "minDurationInMinutes": { + "format": "int32", + "description": "Minimum duration of maintenance window.", + "type": "integer" + }, + "defaultDurationInMinutes": { + "format": "int32", + "description": "Default duration for maintenance window.", + "type": "integer" + }, + "minCycles": { + "format": "int32", + "description": "Minimum number of maintenance windows cycles to be set on the database.", + "type": "integer" + }, + "timeGranularityInMinutes": { + "format": "int32", + "description": "Time granularity in minutes for maintenance windows.", + "type": "integer" + }, + "allowMultipleMaintenanceWindowsPerCycle": { + "description": "Whether we allow multiple maintenance windows per cycle.", + "type": "boolean" + } + } + }, + "MaintenanceWindowTimeRange": { + "description": "Maintenance window time range.", + "type": "object", + "properties": { + "dayOfWeek": { + "description": "Day of maintenance window.", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": true + } + }, + "startTime": { + "description": "Start time minutes offset from 12am.", + "type": "string" + }, + "duration": { + "description": "Duration of maintenance window in minutes.", + "type": "string" + } + } + }, + "MaintenanceWindowOptions": { + "description": "Maintenance window options.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/MaintenanceWindowOptionsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/MaintenanceWindows.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/MaintenanceWindows.json new file mode 100644 index 000000000000..ed66dc4d01f4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/MaintenanceWindows.json @@ -0,0 +1,211 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindows/current": { + "get": { + "tags": [ + "MaintenanceWindows" + ], + "description": "Gets maintenance windows settings for a database.", + "operationId": "MaintenanceWindows_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to get maintenance windows for.", + "required": true, + "type": "string" + }, + { + "name": "maintenanceWindowName", + "in": "query", + "description": "Maintenance window name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved maintenance windows settings.", + "schema": { + "$ref": "#/definitions/MaintenanceWindows" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-examples": { + "Gets maintenance window settings for a selected database.": { + "$ref": "./examples/GetMaintenanceWindows.json" + } + } + }, + "put": { + "tags": [ + "MaintenanceWindows" + ], + "description": "Sets maintenance windows settings for a database.", + "operationId": "MaintenanceWindows_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to set maintenance windows for.", + "required": true, + "type": "string" + }, + { + "name": "maintenanceWindowName", + "in": "query", + "description": "Maintenance window name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MaintenanceWindows" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set maintenance windows settings." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidMaintenanceWindowSelection - Invalid maintenance window selection." + } + }, + "x-ms-examples": { + "Sets maintenance window settings for a selected database.": { + "$ref": "./examples/CreateOrUpdateMaintenanceWindows.json" + } + } + } + } + }, + "definitions": { + "MaintenanceWindowsProperties": { + "description": "Maintenance windows resource properties.", + "type": "object", + "properties": { + "timeRanges": { + "type": "array", + "items": { + "$ref": "#/definitions/MaintenanceWindowTimeRange" + } + } + } + }, + "MaintenanceWindowTimeRange": { + "description": "Maintenance window time range.", + "type": "object", + "properties": { + "dayOfWeek": { + "description": "Day of maintenance window.", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": true + } + }, + "startTime": { + "description": "Start time minutes offset from 12am.", + "type": "string" + }, + "duration": { + "description": "Duration of maintenance window in minutes.", + "type": "string" + } + } + }, + "MaintenanceWindows": { + "description": "Maintenance windows.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/MaintenanceWindowsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedBackupShortTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedBackupShortTermRetentionPolicies.json new file mode 100644 index 000000000000..884acdf61047 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedBackupShortTermRetentionPolicies.json @@ -0,0 +1,332 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "ManagedBackupShortTermRetentionPolicies" + ], + "description": "Gets a managed database's short term retention policy.", + "operationId": "ManagedBackupShortTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/GetManagedShortTermRetentionPolicy.json" + } + } + }, + "put": { + "tags": [ + "ManagedBackupShortTermRetentionPolicies" + ], + "description": "Updates a managed database's short term retention policy.", + "operationId": "ManagedBackupShortTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the database.": { + "$ref": "./examples/UpdateManagedShortTermRetentionPolicy.json" + } + } + }, + "patch": { + "tags": [ + "ManagedBackupShortTermRetentionPolicies" + ], + "description": "Updates a managed database's short term retention policy.", + "operationId": "ManagedBackupShortTermRetentionPolicies_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the database.": { + "$ref": "./examples/UpdateManagedShortTermRetentionPolicy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies": { + "get": { + "tags": [ + "ManagedBackupShortTermRetentionPolicies" + ], + "description": "Gets a managed database's short term retention policy list.", + "operationId": "ManagedBackupShortTermRetentionPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the short term retention policy list for the database.": { + "$ref": "./examples/GetListManagedShortTermRetentionPolicy.json" + } + } + } + } + }, + "definitions": { + "ManagedBackupShortTermRetentionPolicyProperties": { + "description": "Properties of a short term retention policy", + "type": "object", + "properties": { + "retentionDays": { + "format": "int32", + "description": "The backup retention period in days. This is how many days Point-in-Time Restore will be supported.", + "type": "integer" + } + } + }, + "ManagedBackupShortTermRetentionPolicy": { + "description": "A short term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedBackupShortTermRetentionPolicyListResult": { + "description": "A list of short term retention policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseColumns.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseColumns.json new file mode 100644 index 000000000000..1bf8008d3a8f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseColumns.json @@ -0,0 +1,390 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/columns": { + "get": { + "tags": [ + "ManagedDatabaseColumns" + ], + "description": "List managed database columns", + "operationId": "ManagedDatabaseColumns_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schema", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "table", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "column", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "$skiptoken", + "in": "query", + "description": "An opaque token that identifies a starting point in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database columns.", + "schema": { + "$ref": "#/definitions/DatabaseColumnListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UnsupportedColumnOrderByProperty - The order-by property '{0}' is not supported. Allowed properties are: {1}.\n\n * 400 UnsupportedColumnSortDirection - The column sort direction '{0}' is not supported. Allowed values are: {1}.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database columns": { + "$ref": "./examples/ManagedColumnsListByDatabaseMin.json" + }, + "Filter managed database columns": { + "$ref": "./examples/ManagedColumnsListByDatabaseMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns": { + "get": { + "tags": [ + "ManagedDatabaseColumns" + ], + "description": "List managed database columns", + "operationId": "ManagedDatabaseColumns_ListByTable", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database columns.", + "schema": { + "$ref": "#/definitions/DatabaseColumnListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseColumn", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database columns": { + "$ref": "./examples/ManagedDatabaseColumnListByTable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}": { + "get": { + "tags": [ + "ManagedDatabaseColumns" + ], + "description": "Get managed database column", + "operationId": "ManagedDatabaseColumns_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database column.", + "schema": { + "$ref": "#/definitions/DatabaseColumn" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get managed database column": { + "$ref": "./examples/ManagedDatabaseColumnGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseColumnListResult": { + "description": "A list of database columns.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseColumn" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseColumnProperties": { + "description": "Database column properties.", + "type": "object", + "properties": { + "columnType": { + "description": "The column data type.", + "enum": [ + "image", + "text", + "uniqueidentifier", + "date", + "time", + "datetime2", + "datetimeoffset", + "tinyint", + "smallint", + "int", + "smalldatetime", + "real", + "money", + "datetime", + "float", + "sql_variant", + "ntext", + "bit", + "decimal", + "numeric", + "smallmoney", + "bigint", + "hierarchyid", + "geometry", + "geography", + "varbinary", + "varchar", + "binary", + "char", + "timestamp", + "nvarchar", + "nchar", + "xml", + "sysname" + ], + "type": "string", + "x-ms-enum": { + "name": "ColumnDataType", + "modelAsString": true + } + }, + "temporalType": { + "description": "The table temporal type.", + "enum": [ + "NonTemporalTable", + "HistoryTable", + "SystemVersionedTemporalTable" + ], + "type": "string", + "x-ms-enum": { + "name": "TableTemporalType", + "modelAsString": true + } + }, + "memoryOptimized": { + "description": "Whether or not the column belongs to a memory optimized table.", + "type": "boolean" + }, + "isComputed": { + "description": "Whether or not the column is computed.", + "type": "boolean" + } + } + }, + "DatabaseColumn": { + "description": "A database column resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseColumnProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseQueries.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseQueries.json new file mode 100644 index 000000000000..dfbde51d7623 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseQueries.json @@ -0,0 +1,382 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}": { + "get": { + "tags": [ + "ManagedDatabaseQueries" + ], + "description": "Get query by query id.", + "operationId": "ManagedDatabaseQueries_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "queryId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved query text.", + "schema": { + "$ref": "#/definitions/ManagedInstanceQuery" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Obtain query properties": { + "$ref": "./examples/ManagedInstanceQueryGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}/statistics": { + "get": { + "tags": [ + "ManagedDatabaseQueries" + ], + "description": "Get query execution statistics by query id.", + "operationId": "ManagedDatabaseQueries_ListByQuery", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "queryId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "startTime", + "in": "query", + "description": "Start time for observed period.", + "required": false, + "type": "string" + }, + { + "name": "endTime", + "in": "query", + "description": "End time for observed period.", + "required": false, + "type": "string" + }, + { + "name": "interval", + "in": "query", + "description": "The time step to be used to summarize the metric values.", + "required": false, + "type": "string", + "enum": [ + "PT1H", + "P1D" + ], + "x-ms-enum": { + "name": "QueryTimeGrainType", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved query text.", + "schema": { + "$ref": "#/definitions/ManagedInstanceQueryStatistics" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Obtain query execution statistics. Minimal example with only mandatory request parameters.": { + "$ref": "./examples/ManagedInstanceQueryStatisticsListMin.json" + }, + "Obtain query execution statistics": { + "$ref": "./examples/ManagedInstanceQueryStatisticsList.json" + }, + "Obtain query execution statistics. Example with all request parameters.": { + "$ref": "./examples/ManagedInstanceQueryStatisticsListMax.json" + } + } + } + } + }, + "definitions": { + "QueryProperties": { + "description": "Properties of a database query.", + "type": "object", + "properties": { + "queryText": { + "description": "Query text.", + "type": "string" + } + } + }, + "ManagedInstanceQuery": { + "description": "Database query.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/QueryProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceQueryStatistics": { + "description": "Execution statistics for one particular query", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/QueryStatistics" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "QueryStatisticsProperties": { + "description": "Properties of a query execution statistics.", + "type": "object", + "properties": { + "databaseName": { + "description": "Database name of the database in which this query was executed.", + "type": "string", + "readOnly": true + }, + "queryId": { + "description": "Unique query id (unique within one database).", + "type": "string", + "readOnly": true + }, + "startTime": { + "description": "The start time for the metric (ISO-8601 format).", + "type": "string", + "readOnly": true + }, + "endTime": { + "description": "The end time for the metric (ISO-8601 format).", + "type": "string", + "readOnly": true + }, + "intervals": { + "description": "List of intervals with appropriate metric data", + "type": "array", + "items": { + "$ref": "#/definitions/QueryMetricInterval" + } + } + } + }, + "QueryMetricInterval": { + "description": "Properties of a query metrics interval.", + "type": "object", + "properties": { + "intervalStartTime": { + "description": "The start time for the metric interval (ISO-8601 format).", + "type": "string", + "readOnly": true + }, + "intervalType": { + "description": "Interval type (length).", + "enum": [ + "PT1H", + "P1D" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "QueryTimeGrainType", + "modelAsString": true + } + }, + "executionCount": { + "format": "int64", + "description": "Execution count of a query in this interval.", + "type": "integer", + "readOnly": true + }, + "metrics": { + "description": "List of metric objects for this interval", + "type": "array", + "items": { + "$ref": "#/definitions/QueryMetricProperties" + } + } + } + }, + "QueryMetricProperties": { + "description": "Properties of a topquery metric in one interval.", + "type": "object", + "properties": { + "name": { + "description": "The name information for the metric.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "The UI appropriate name for the metric.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "The unit of the metric.", + "enum": [ + "percentage", + "KB", + "microseconds", + "count" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "QueryMetricUnitType", + "modelAsString": true + } + }, + "value": { + "format": "double", + "description": "The value of the metric.", + "type": "number", + "readOnly": true + }, + "min": { + "format": "double", + "description": "Metric value when min() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "max": { + "format": "double", + "description": "Metric value when max() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "avg": { + "format": "double", + "description": "Metric value when avg() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "sum": { + "format": "double", + "description": "Metric value when sum() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "stdev": { + "format": "double", + "description": "Metric value when stdev aggregate function is used over the interval.", + "type": "number", + "readOnly": true + } + } + }, + "QueryStatistics": { + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/QueryStatisticsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseRestoreDetails.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseRestoreDetails.json new file mode 100644 index 000000000000..4986cff92fbf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseRestoreDetails.json @@ -0,0 +1,186 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails/{restoreDetailsName}": { + "get": { + "tags": [ + "ManagedDatabaseRestoreDetails" + ], + "description": "Gets managed database restore details.", + "operationId": "ManagedDatabaseRestoreDetails_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "restoreDetailsName", + "in": "path", + "description": "The name of the restore details to retrieve.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "RestoreDetailsName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved restore details.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseRestoreDetailsResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 AutoCompleteMissingLastBackupName - Auto complete restore request must have lastBackupName parameter provided.\n\n * 400 MissingThumbprint - Can not find server certificate.\n\n * 400 BlobStorageServerFailure - Blob storage server failure has occurred.\n\n * 400 BackupSetNotFound - No backups were found to restore the database. Please contact support to restore the database.\n\n * 400 FullBackupNotFound - Full backup can not be found.\n\n * 400 RestoreFromStripedBackupsNotEnabled - Restoring from striped backups is not supported.\n\n * 400 BrokenRestorePlanNoFullBackup - The restore plan is broken because there is no full backup.\n\n * 400 BrokenRestorePlanWrongLogBackupLSN - The restore plan is broken because firstLsn of current log backup is not <= lastLsn of next log backup.\n\n * 400 BrokenRestorePlanWrongDiffBackupLSN - The restore plan is broken because firstLsn of diff backup is not >= firstLsn of full backup.\n\n * 400 BrokenRestorePlanGapInLogBackups - The restore plan is broken because firstLsn of current log backup is not equal to lastLsn of prev log backup.\n\n * 400 XtpInitializedDuringRestore - Memory-optimized filegroup must be empty in order to be restored on General Purpose tier of SQL Database Managed Instance.\n\n * 400 FullBackupMissingChecksum - Provided full backup is missing checksum.\n\n * 400 FullBackupDamaged - Provided full backup is damaged.\n\n * 400 PartiallyContainedDatabaseUnsupported - \"Backup for a partially contained database is not supported.\"\n\n * 400 RequiredBackupIsNotLastRestored - Migration cannot be completed because provided backup file name is not the name of the last backup file that is restored.\n\n * 400 ManagedInstanceStorageLimitHit - The managed instance has reached its storage limit.\n\n * 400 IncompatiblePhysicalLayoutTooFewDataFiles - Database backup contains incompatible physical layout. No data files are found in the backup.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineDataFilesExist - Database backup contains incompatible physical layout. Non-online data files exist.\n\n * 400 IncompatiblePhysicalLayoutWrongNumberOfLogFiles - Database backup contains incompatible physical layout. Multiple log files are not supported.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineLogFilesExist - Database backup contains incompatible physical layout. Non-online log files exist.\n\n * 400 IncompatiblePhysicalLayoutTooManyNonDataLogFiles - Database backup contains incompatible physical layout. Too many non-data/log files.\n\n * 400 ExternalBackupAlreadySignaledToComplete - The restore request has already been signaled to complete.\n\n * 400 ExternalBackupRestoreHasNotBeenStarted - The restore request can only be completed once the restore has started.\n\n * 400 ExternalBackupUpgradeInProgress - The restore request cannot be completed, since upgrade is in progress.\n\n * 400 IncompatiblePhysicalLayoutTooManyXTPFiles - Database backup contains incompatible physical layout. Multiple files found in the filegroup that contains MEMORY_OPTIMIZED_DATA.\n\n * 400 BlobStorageFailure - Blob storage failure has occurred.\n\n * 400 ManagedDatabaseNotInRestoringState - Managed database is not in Restoring state." + } + }, + "x-ms-examples": { + "Managed database restore details.": { + "$ref": "./examples/ManagedDatabaseRestoreDetails.json" + } + } + } + } + }, + "definitions": { + "ManagedDatabaseRestoreDetailsProperties": { + "description": "The managed database's restore details properties.", + "type": "object", + "properties": { + "status": { + "description": "Restore status.", + "type": "string", + "readOnly": true + }, + "currentRestoringFileName": { + "description": "Current restoring file name.", + "type": "string", + "readOnly": true + }, + "lastRestoredFileName": { + "description": "Last restored file name.", + "type": "string", + "readOnly": true + }, + "lastRestoredFileTime": { + "format": "date-time", + "description": "Last restored file time.", + "type": "string", + "readOnly": true + }, + "percentCompleted": { + "format": "double", + "description": "Percent completed.", + "type": "number", + "readOnly": true + }, + "unrestorableFiles": { + "description": "List of unrestorable files.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "numberOfFilesDetected": { + "format": "int64", + "description": "Number of files detected.", + "type": "integer", + "readOnly": true + }, + "lastUploadedFileName": { + "description": "Last uploaded file name.", + "type": "string", + "readOnly": true + }, + "lastUploadedFileTime": { + "format": "date-time", + "description": "Last uploaded file time.", + "type": "string", + "readOnly": true + }, + "blockReason": { + "description": "The reason why restore is in Blocked state.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedDatabaseRestoreDetailsResult": { + "description": "A managed database restore details.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseRestoreDetailsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSchemas.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSchemas.json new file mode 100644 index 000000000000..b71b757f14ec --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSchemas.json @@ -0,0 +1,182 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas": { + "get": { + "tags": [ + "ManagedDatabaseSchemas" + ], + "description": "List managed database schemas", + "operationId": "ManagedDatabaseSchemas_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database schemas.", + "schema": { + "$ref": "#/definitions/DatabaseSchemaListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseSchema", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database schemas": { + "$ref": "./examples/ManagedDatabaseSchemaListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}": { + "get": { + "tags": [ + "ManagedDatabaseSchemas" + ], + "description": "Get managed database schema", + "operationId": "ManagedDatabaseSchemas_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database schema.", + "schema": { + "$ref": "#/definitions/DatabaseSchema" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get managed database schema": { + "$ref": "./examples/ManagedDatabaseSchemaGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseSchema": { + "description": "A database schema resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": {} + }, + "DatabaseSchemaListResult": { + "description": "A list of database schemas.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSchema" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSecurityAlertPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSecurityAlertPolicies.json new file mode 100644 index 000000000000..f06c3f63b75a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSecurityAlertPolicies.json @@ -0,0 +1,325 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}": { + "get": { + "tags": [ + "ManagedDatabaseSecurityAlertPolicies" + ], + "description": "Gets a managed database's security alert policy.", + "operationId": "ManagedDatabaseSecurityAlertPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed database security alert policy.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-examples": { + "Get a database's threat detection policy": { + "$ref": "./examples/ManagedDatabaseSecurityAlertGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseSecurityAlertPolicies" + ], + "description": "Creates or updates a database's security alert policy.", + "operationId": "ManagedDatabaseSecurityAlertPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The database security alert policy.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the managed database security alert policy.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***" + }, + "201": { + "description": "Successfully created the managed database security alert policy.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicy" + } + } + }, + "x-ms-examples": { + "Update a database's threat detection policy with minimal parameters": { + "$ref": "./examples/ManagedDatabaseSecurityAlertCreateMin.json" + }, + "Update a database's threat detection policy with all parameters": { + "$ref": "./examples/ManagedDatabaseSecurityAlertCreateMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies": { + "get": { + "tags": [ + "ManagedDatabaseSecurityAlertPolicies" + ], + "description": "Gets a list of managed database's security alert policies.", + "operationId": "ManagedDatabaseSecurityAlertPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the security alert policies are defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed database security alert policies.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a list of the database's threat detection policies.": { + "$ref": "./examples/ManagedDatabaseSecurityAlertListByDatabase.json" + } + } + } + } + }, + "definitions": { + "SecurityAlertPolicyProperties": { + "description": "Properties of a security alert policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.", + "enum": [ + "New", + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SecurityAlertPolicyState", + "modelAsString": false + } + }, + "disabledAlerts": { + "description": "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAddresses": { + "description": "Specifies an array of e-mail addresses to which the alert is sent.", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAccountAdmins": { + "description": "Specifies that the alert is sent to the account administrators.", + "type": "boolean" + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the Threat Detection audit storage account.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the Threat Detection audit logs.", + "type": "integer" + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedDatabaseSecurityAlertPolicy": { + "description": "A managed database security alert policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SecurityAlertPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseSecurityAlertPolicyListResult": { + "description": "A list of the managed database's security alert policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSecurityEvents.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSecurityEvents.json new file mode 100644 index 000000000000..250a958d90ac --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSecurityEvents.json @@ -0,0 +1,282 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityEvents": { + "get": { + "tags": [ + "ManagedDatabaseSecurityEvents" + ], + "description": "Gets a list of security events.", + "operationId": "ManagedDatabaseSecurityEvents_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the security events are retrieved.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$skiptoken", + "in": "query", + "description": "An opaque token that identifies a starting point in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of security events.", + "schema": { + "$ref": "#/definitions/SecurityEventCollection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-odata": "#/definitions/SecurityEventsFilterParameters", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the managed database's security events with minimal parameters": { + "$ref": "./examples/ManagedDatabaseSecurityEventsGetMin.json" + }, + "Get the managed database's security events with maximal parameters": { + "$ref": "./examples/ManagedDatabaseSecurityEventsGetMax.json" + } + } + } + } + }, + "definitions": { + "SecurityEventsFilterParameters": { + "description": "The properties that are supported in the $filter operation.", + "type": "object", + "properties": { + "eventTime": { + "format": "date-time", + "description": "Filter on the event time.", + "type": "string" + }, + "showServerRecords": { + "description": "Whether to show server records or not.", + "type": "boolean" + } + } + }, + "SecurityEventCollection": { + "description": "A list of security events.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SecurityEvent" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SecurityEventProperties": { + "description": "The properties of a security event.", + "type": "object", + "properties": { + "eventTime": { + "format": "date-time", + "description": "The time when the security event occurred.", + "type": "string", + "readOnly": true + }, + "securityEventType": { + "description": "The type of the security event.", + "enum": [ + "Undefined", + "SqlInjectionVulnerability", + "SqlInjectionExploit" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SecurityEventType", + "modelAsString": false + } + }, + "subscription": { + "description": "The subscription name", + "type": "string", + "readOnly": true + }, + "server": { + "description": "The server name", + "type": "string", + "readOnly": true + }, + "database": { + "description": "The database name", + "type": "string", + "readOnly": true + }, + "clientIp": { + "description": "The IP address of the client who executed the statement.", + "type": "string", + "readOnly": true + }, + "applicationName": { + "description": "The application used to execute the statement.", + "type": "string", + "readOnly": true + }, + "principalName": { + "description": "The principal user who executed the statement", + "type": "string", + "readOnly": true + }, + "securityEventSqlInjectionAdditionalProperties": { + "$ref": "#/definitions/SecurityEventSqlInjectionAdditionalProperties", + "description": "The sql injection additional properties, populated only if the type of the security event is sql injection.", + "readOnly": true + } + } + }, + "SecurityEventSqlInjectionAdditionalProperties": { + "description": "The properties of a security event sql injection additional properties.", + "type": "object", + "properties": { + "threatId": { + "description": "The threat ID.", + "type": "string", + "readOnly": true + }, + "statement": { + "description": "The statement", + "type": "string", + "readOnly": true + }, + "statementHighlightOffset": { + "format": "int32", + "description": "The statement highlight offset", + "type": "integer", + "readOnly": true + }, + "statementHighlightLength": { + "format": "int32", + "description": "The statement highlight length", + "type": "integer", + "readOnly": true + }, + "errorCode": { + "format": "int32", + "description": "The sql error code", + "type": "integer", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The sql error severity", + "type": "integer", + "readOnly": true + }, + "errorMessage": { + "description": "The sql error message", + "type": "string", + "readOnly": true + } + } + }, + "SecurityEvent": { + "description": "A security event.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SecurityEventProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSensitivityLabels.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSensitivityLabels.json new file mode 100644 index 000000000000..ac0f350792bc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSensitivityLabels.json @@ -0,0 +1,904 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}": { + "get": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Gets the sensitivity label of a given column", + "operationId": "ManagedDatabaseSensitivityLabels_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current", + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + } + }, + "x-ms-examples": { + "Gets the sensitivity label of a given column in a managed database": { + "$ref": "./examples/ManagedDatabaseColumnSensitivityLabelGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Creates or updates the sensitivity label of a given column", + "operationId": "ManagedDatabaseSensitivityLabels_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "WritableSensitivityLabelSource", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The column sensitivity label resource.", + "required": true, + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + }, + "201": { + "description": "Successfully created the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + } + }, + "x-ms-examples": { + "Updates or creates a sensitivity label of a given column with all parameters in a managed database": { + "$ref": "./examples/ManagedDatabaseColumnSensitivityLabelCreate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Deletes the sensitivity label of a given column", + "operationId": "ManagedDatabaseSensitivityLabels_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "WritableSensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the sensitivity label." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + } + }, + "x-ms-examples": { + "Deletes the sensitivity label of a given column in a managed database": { + "$ref": "./examples/ManagedDatabaseColumnSensitivityLabelDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable": { + "post": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Disables sensitivity recommendations on a given column", + "operationId": "ManagedDatabaseSensitivityLabels_DisableRecommendation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled the sensitivity recommendations on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + } + }, + "x-ms-examples": { + "Disables the sensitivity recommendations on a given column": { + "$ref": "./examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable": { + "post": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns)", + "operationId": "ManagedDatabaseSensitivityLabels_EnableRecommendation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully enabled the sensitivity recommendations on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + } + }, + "x-ms-examples": { + "Enables the sensitivity recommendations on a given column": { + "$ref": "./examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels": { + "get": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Gets the sensitivity labels of a given database", + "operationId": "ManagedDatabaseSensitivityLabels_ListCurrentByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$count", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity labels.", + "schema": { + "$ref": "#/definitions/SensitivityLabelListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/SensitivityLabel", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the current sensitivity labels of a given database in a managed database": { + "$ref": "./examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json" + } + } + }, + "patch": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Update sensitivity labels of a given database using an operations batch.", + "operationId": "ManagedDatabaseSensitivityLabels_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SensitivityLabelUpdateList" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated sensitivity labels." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelsBatch - The specified sensitivity labels batch is not valid. Please provide batch operations\n\n * 400 SensitivityLabelsMissingSchema - Operation[{0}]: Missing schema information\n\n * 400 SensitivityLabelsMissingTable - Operation[{0}]: Missing table information\n\n * 400 SensitivityLabelsMissingColumn - Operation[{0}]: Missing column information\n\n * 400 SensitivityLabelsUpdateSameColumnMoreThanOnce - The column {0} can not be updated more than once in a single command\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Update sensitivity labels of a given database using an operations batch.": { + "$ref": "./examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels": { + "get": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Gets the sensitivity labels of a given database", + "operationId": "ManagedDatabaseSensitivityLabels_ListRecommendedByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "includeDisabledRecommendations", + "in": "query", + "description": "Specifies whether to include disabled recommendations or not.", + "required": false, + "type": "boolean" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity labels.", + "schema": { + "$ref": "#/definitions/SensitivityLabelListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/SensitivityLabel", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the recommended sensitivity labels of a given database in a managed database": { + "$ref": "./examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json" + } + } + }, + "patch": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Update recommended sensitivity labels states of a given database using an operations batch.", + "operationId": "ManagedDatabaseRecommendedSensitivityLabels_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdateList" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated recommended sensitivity labels." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidRecommendedSensitivityLabelsBatch - The specified recommended sensitivity labels operations are not valid\n\n * 400 SensitivityLabelsMissingSchema - Operation[{0}]: Missing schema information\n\n * 400 SensitivityLabelsMissingTable - Operation[{0}]: Missing table information\n\n * 400 SensitivityLabelsMissingColumn - Operation[{0}]: Missing column information\n\n * 400 SensitivityLabelsUpdateSameColumnMoreThanOnce - The column {0} can not be updated more than once in a single command\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Update recommended sensitivity labels of a given database using an operations batch.": { + "$ref": "./examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json" + } + } + } + } + }, + "definitions": { + "SensitivityLabelProperties": { + "description": "Properties of a sensitivity label.", + "type": "object", + "properties": { + "schemaName": { + "description": "The schema name.", + "type": "string", + "readOnly": true + }, + "tableName": { + "description": "The table name.", + "type": "string", + "readOnly": true + }, + "columnName": { + "description": "The column name.", + "type": "string", + "readOnly": true + }, + "labelName": { + "description": "The label name.", + "type": "string" + }, + "labelId": { + "description": "The label ID.", + "type": "string" + }, + "informationType": { + "description": "The information type.", + "type": "string" + }, + "informationTypeId": { + "description": "The information type ID.", + "type": "string" + }, + "isDisabled": { + "description": "Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.", + "type": "boolean", + "readOnly": true + }, + "rank": { + "enum": [ + "None", + "Low", + "Medium", + "High", + "Critical" + ], + "type": "string", + "x-ms-enum": { + "name": "SensitivityLabelRank", + "modelAsString": false + } + } + } + }, + "SensitivityLabel": { + "description": "A sensitivity label.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "managedBy": { + "description": "Resource that manages the sensitivity label.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SensitivityLabelProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SensitivityLabelListResult": { + "description": "A list of sensitivity labels.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SensitivityLabel" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SensitivityLabelUpdateList": { + "description": "A list of sensitivity label update operations.", + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/SensitivityLabelUpdate" + } + } + } + }, + "SensitivityLabelUpdateProperties": { + "description": "Properties of an operation executed on a sensitivity label.", + "required": [ + "op", + "schema", + "table", + "column" + ], + "type": "object", + "properties": { + "op": { + "enum": [ + "set", + "remove" + ], + "type": "string", + "x-ms-enum": { + "name": "SensitivityLabelUpdateKind", + "modelAsString": false + } + }, + "schema": { + "description": "Schema name of the column to update.", + "type": "string" + }, + "table": { + "description": "Table name of the column to update.", + "type": "string" + }, + "column": { + "description": "Column name to update.", + "type": "string" + }, + "sensitivityLabel": { + "$ref": "#/definitions/SensitivityLabel", + "description": "The sensitivity label information to apply on a column." + } + } + }, + "SensitivityLabelUpdate": { + "description": "A sensitivity label update operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SensitivityLabelUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RecommendedSensitivityLabelUpdateList": { + "description": "A list of recommended sensitivity label update operations.", + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdate" + } + } + } + }, + "RecommendedSensitivityLabelUpdateProperties": { + "description": "Properties of an operation executed on a recommended sensitivity label.", + "required": [ + "op", + "schema", + "table", + "column" + ], + "type": "object", + "properties": { + "op": { + "enum": [ + "enable", + "disable" + ], + "type": "string", + "x-ms-enum": { + "name": "RecommendedSensitivityLabelUpdateKind", + "modelAsString": false + } + }, + "schema": { + "description": "Schema name of the column to update.", + "type": "string" + }, + "table": { + "description": "Table name of the column to update.", + "type": "string" + }, + "column": { + "description": "Column name to update.", + "type": "string" + } + } + }, + "RecommendedSensitivityLabelUpdate": { + "description": "A recommended sensitivity label update operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseTables.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseTables.json new file mode 100644 index 000000000000..90b4f739fb0e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseTables.json @@ -0,0 +1,225 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables": { + "get": { + "tags": [ + "ManagedDatabaseTables" + ], + "description": "List managed database tables", + "operationId": "ManagedDatabaseTables_ListBySchema", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database tables.", + "schema": { + "$ref": "#/definitions/DatabaseTableListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseTable", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database tables": { + "$ref": "./examples/ManagedDatabaseTableListBySchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}": { + "get": { + "tags": [ + "ManagedDatabaseTables" + ], + "description": "Get managed database table", + "operationId": "ManagedDatabaseTables_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database table.", + "schema": { + "$ref": "#/definitions/DatabaseTable" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get managed database table": { + "$ref": "./examples/ManagedDatabaseTableGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseTableProperties": { + "description": "Database table properties.", + "type": "object", + "properties": { + "temporalType": { + "description": "The table temporal type.", + "enum": [ + "NonTemporalTable", + "HistoryTable", + "SystemVersionedTemporalTable" + ], + "type": "string", + "x-ms-enum": { + "name": "TableTemporalType", + "modelAsString": true + } + }, + "memoryOptimized": { + "description": "Whether or not the table is memory optimized.", + "type": "boolean" + } + } + }, + "DatabaseTable": { + "description": "A database table resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseTableProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseTableListResult": { + "description": "A list of database tables.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseTable" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseTransparentDataEncryption.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseTransparentDataEncryption.json new file mode 100644 index 000000000000..777fcfd76f2d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseTransparentDataEncryption.json @@ -0,0 +1,284 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}": { + "get": { + "tags": [ + "ManagedDatabaseTransparentDataEncryption" + ], + "description": "Gets a managed database's transparent data encryption.", + "operationId": "ManagedDatabaseTransparentDataEncryption_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the transparent data encryption is defined.", + "required": true, + "type": "string" + }, + { + "name": "tdeName", + "in": "path", + "description": "The name of the transparent data encryption configuration.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "TransparentDataEncryptionName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed database transparent data encryption.", + "schema": { + "$ref": "#/definitions/ManagedTransparentDataEncryption" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 401 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + } + }, + "x-ms-examples": { + "Get a database's transparent data encryption": { + "$ref": "./examples/ManagedTransparentDataEncryptionGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseTransparentDataEncryption" + ], + "description": "Updates a database's transparent data encryption configuration.", + "operationId": "ManagedDatabaseTransparentDataEncryption_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "tdeName", + "in": "path", + "description": "The name of the transparent data encryption configuration.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "TransparentDataEncryptionName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The database transparent data encryption.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedTransparentDataEncryption" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database Transparent Data Encryption state.", + "schema": { + "$ref": "#/definitions/ManagedTransparentDataEncryption" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 400 InvalidTransparentDataEncryptionUpdateRequest - Please enter a valid state. Please use \"Enabled\" or \"Disabled\".\n\n * 400 InvalidTransparentDataEncryptionName - The transparent data encryption key name is not supported.\n\n * 401 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + }, + "201": { + "description": "Successfully created the database transparent data encryption state.", + "schema": { + "$ref": "#/definitions/ManagedTransparentDataEncryption" + } + } + }, + "x-ms-examples": { + "Update a database's Transparent Data Encryption state with minimal parameters": { + "$ref": "./examples/ManagedTransparentDataEncryptionUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption": { + "get": { + "tags": [ + "ManagedDatabaseTransparentDataEncryption" + ], + "description": "Gets a list of managed database's transparent data encryptions.", + "operationId": "ManagedDatabaseTransparentDataEncryption_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the transparent data encryption is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed database transparent data encryptions.", + "schema": { + "$ref": "#/definitions/ManagedTransparentDataEncryptionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 401 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a list of the database's transparent data encryptions": { + "$ref": "./examples/ManagedTransparentDataEncryptionList.json" + } + } + } + } + }, + "definitions": { + "ManagedTransparentDataEncryptionProperties": { + "description": "Properties of a transparent data encryption.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the transparent data encryption.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "TransparentDataEncryptionState", + "modelAsString": false + } + } + } + }, + "ManagedTransparentDataEncryption": { + "description": "A managed database transparent data encryption state.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedTransparentDataEncryptionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedTransparentDataEncryptionListResult": { + "description": "A list of managed transparent data encryptions", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedTransparentDataEncryption" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.json new file mode 100644 index 000000000000..6936dafe3154 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.json @@ -0,0 +1,342 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Gets a database's vulnerability assessment rule baseline.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Creates or updates a database's vulnerability assessment rule baseline.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Creates or updates a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Removes the database's vulnerability assessment rule baseline.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment rule baseline." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Removes a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Vulnerability Assessment rule baseline.", + "required": [ + "baselineResults" + ], + "type": "object", + "properties": { + "baselineResults": { + "description": "The rule baseline result", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineItem" + } + } + } + }, + "DatabaseVulnerabilityAssessmentRuleBaselineItem": { + "description": "Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result.", + "required": [ + "result" + ], + "type": "object", + "properties": { + "result": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DatabaseVulnerabilityAssessmentRuleBaseline": { + "description": "A database vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessmentScans.json new file mode 100644 index 000000000000..309596a47414 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessmentScans.json @@ -0,0 +1,466 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan": { + "post": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScans" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_InitiateScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidVulnerabilityAssessmentScanIdLength - The vulnerability assessment scan ID length must be below {0} characters.\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export": { + "post": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScans" + ], + "description": "Convert an existing scan result to a human readable format. If already exists nothing happens", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_Export", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the scanned database.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Scan result was converted successfully.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Scan result was converted successfully.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" + } + } + }, + "x-ms-examples": { + "Export a database's vulnerability assessment scan results.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScans" + ], + "description": "Lists the vulnerability assessment scans of a database.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan records.", + "schema": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecordListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the list of a database vulnerability assessment scan records": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScans" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan record.", + "schema": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database vulnerability assessment scan record by scan ID": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessmentScanExportProperties": { + "description": "Properties of the export operation's result.", + "type": "object", + "properties": { + "exportedReportLocation": { + "description": "Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx).", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseVulnerabilityAssessmentScansExport": { + "description": "A database Vulnerability Assessment scan export resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScanExportProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VulnerabilityAssessmentScanRecordListResult": { + "description": "A list of vulnerability assessment scan records.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanRecordProperties": { + "description": "Properties of a vulnerability assessment scan record.", + "type": "object", + "properties": { + "scanId": { + "description": "The scan ID.", + "type": "string", + "readOnly": true + }, + "triggerType": { + "description": "The scan trigger type.", + "enum": [ + "OnDemand", + "Recurring" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanTriggerType", + "modelAsString": true + } + }, + "state": { + "description": "The scan status.", + "enum": [ + "Passed", + "Failed", + "FailedToRun", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanState", + "modelAsString": true + } + }, + "startTime": { + "format": "date-time", + "description": "The scan start time (UTC).", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The scan end time (UTC).", + "type": "string", + "readOnly": true + }, + "errors": { + "description": "The scan errors.", + "type": "array", + "items": { + "$ref": "#/definitions/VulnerabilityAssessmentScanError" + }, + "readOnly": true + }, + "storageContainerPath": { + "description": "The scan results storage container path.", + "type": "string", + "readOnly": true + }, + "numberOfFailedSecurityChecks": { + "format": "int32", + "description": "The number of failed security checks.", + "type": "integer", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanError": { + "description": "Properties of a vulnerability assessment scan error.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanRecord": { + "description": "A vulnerability assessment scan record.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecordProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessments.json new file mode 100644 index 000000000000..161f2c15d4e6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessments.json @@ -0,0 +1,381 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessments" + ], + "description": "Gets the database's vulnerability assessment.", + "operationId": "ManagedDatabaseVulnerabilityAssessments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a database's vulnerability assessment": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessments" + ], + "description": "Creates or updates the database's vulnerability assessment.", + "operationId": "ManagedDatabaseVulnerabilityAssessments_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a database's vulnerability assessment with minimal parameters": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json" + }, + "Create a database's vulnerability assessment with all parameters": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessments" + ], + "description": "Removes the database's vulnerability assessment.", + "operationId": "ManagedDatabaseVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Remove a database's vulnerability assessment": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessments" + ], + "description": "Lists the vulnerability assessments of a managed database.", + "operationId": "ManagedDatabaseVulnerabilityAssessments_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessments.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a database's vulnerability assessments list": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessmentProperties": { + "description": "Properties of a database Vulnerability Assessment.", + "type": "object", + "properties": { + "storageContainerPath": { + "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn't set", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageContainerSasKey": { + "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "recurringScans": { + "$ref": "#/definitions/VulnerabilityAssessmentRecurringScansProperties", + "description": "The recurring scans settings" + } + } + }, + "VulnerabilityAssessmentRecurringScansProperties": { + "description": "Properties of a Vulnerability Assessment recurring scans.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Recurring scans state.", + "type": "boolean" + }, + "emailSubscriptionAdmins": { + "description": "Specifies that the schedule scan notification will be is sent to the subscription administrators.", + "default": true, + "type": "boolean" + }, + "emails": { + "description": "Specifies an array of e-mail addresses to which the scan notification is sent.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DatabaseVulnerabilityAssessment": { + "description": "A database vulnerability assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseVulnerabilityAssessmentListResult": { + "description": "A list of the database's vulnerability assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabases.json new file mode 100644 index 000000000000..3583f2589127 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabases.json @@ -0,0 +1,624 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases": { + "get": { + "tags": [ + "ManagedDatabases" + ], + "description": "Gets a list of managed databases.", + "operationId": "ManagedDatabases_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of databases.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List databases by managed instances": { + "$ref": "./examples/ManagedDatabaseListByManagedInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}": { + "get": { + "tags": [ + "ManagedDatabases" + ], + "description": "Gets a managed database.", + "operationId": "ManagedDatabases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a managed database": { + "$ref": "./examples/ManagedDatabaseGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabases" + ], + "description": "Creates a new database or updates an existing database.", + "operationId": "ManagedDatabases_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested database resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidLongTermRetentionManagedInstanceBackupId - Invalid long term retention backup identifier for Managed Instances.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 AutoCompleteMissingLastBackupName - Auto complete restore request must have lastBackupName parameter provided.\n\n * 400 MissingThumbprint - Can not find server certificate.\n\n * 400 BlobStorageServerFailure - Blob storage server failure has occurred.\n\n * 400 BackupSetNotFound - No backups were found to restore the database. Please contact support to restore the database.\n\n * 400 FullBackupNotFound - Full backup can not be found.\n\n * 400 RestoreFromStripedBackupsNotEnabled - Restoring from striped backups is not supported.\n\n * 400 BrokenRestorePlanNoFullBackup - The restore plan is broken because there is no full backup.\n\n * 400 BrokenRestorePlanWrongLogBackupLSN - The restore plan is broken because firstLsn of current log backup is not <= lastLsn of next log backup.\n\n * 400 BrokenRestorePlanWrongDiffBackupLSN - The restore plan is broken because firstLsn of diff backup is not >= firstLsn of full backup.\n\n * 400 BrokenRestorePlanGapInLogBackups - The restore plan is broken because firstLsn of current log backup is not equal to lastLsn of prev log backup.\n\n * 400 XtpInitializedDuringRestore - Memory-optimized filegroup must be empty in order to be restored on General Purpose tier of SQL Database Managed Instance.\n\n * 400 FullBackupMissingChecksum - Provided full backup is missing checksum.\n\n * 400 FullBackupDamaged - Provided full backup is damaged.\n\n * 400 PartiallyContainedDatabaseUnsupported - \"Backup for a partially contained database is not supported.\"\n\n * 400 RequiredBackupIsNotLastRestored - Migration cannot be completed because provided backup file name is not the name of the last backup file that is restored.\n\n * 400 ManagedInstanceStorageLimitHit - The managed instance has reached its storage limit.\n\n * 400 IncompatiblePhysicalLayoutTooFewDataFiles - Database backup contains incompatible physical layout. No data files are found in the backup.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineDataFilesExist - Database backup contains incompatible physical layout. Non-online data files exist.\n\n * 400 IncompatiblePhysicalLayoutWrongNumberOfLogFiles - Database backup contains incompatible physical layout. Multiple log files are not supported.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineLogFilesExist - Database backup contains incompatible physical layout. Non-online log files exist.\n\n * 400 IncompatiblePhysicalLayoutTooManyNonDataLogFiles - Database backup contains incompatible physical layout. Too many non-data/log files.\n\n * 400 ExternalBackupAlreadySignaledToComplete - The restore request has already been signaled to complete.\n\n * 400 ExternalBackupRestoreHasNotBeenStarted - The restore request can only be completed once the restore has started.\n\n * 400 ExternalBackupUpgradeInProgress - The restore request cannot be completed, since upgrade is in progress.\n\n * 400 IncompatiblePhysicalLayoutTooManyXTPFiles - Database backup contains incompatible physical layout. Multiple files found in the filegroup that contains MEMORY_OPTIMIZED_DATA.\n\n * 400 BlobStorageFailure - Blob storage failure has occurred.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates a new managed database with minimal properties": { + "$ref": "./examples/ManagedDatabaseCreateMin.json" + }, + "Creates a new managed database with maximal properties": { + "$ref": "./examples/ManagedDatabaseCreateMax.json" + }, + "Creates a new managed database using point in time restore": { + "$ref": "./examples/ManagedDatabaseCreatePointInTimeRestore.json" + }, + "Creates a new managed database from restoring a geo-replicated backup": { + "$ref": "./examples/ManagedDatabaseCreateRecovery.json" + }, + "Creates a new managed database by restoring from an external backup": { + "$ref": "./examples/ManagedDatabaseCreateRestoreExternalBackup.json" + }, + "Creates a new managed database from restoring a long term retention backup": { + "$ref": "./examples/ManagedDatabaseCreateRestoreLtrBackup.json" + } + } + }, + "delete": { + "tags": [ + "ManagedDatabases" + ], + "description": "Deletes a managed database.", + "operationId": "ManagedDatabases_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed database." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 GeoReplicationDatabaseNotPrimary - The operation cannot be performed since the database '{0}' is a replication target.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 DropDisallowedDuringFailover - Can not drop database because a failover operation is in progress on the failover group.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Deleting the managed database is in progress." + }, + "204": { + "description": "The specified managed database does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete managed database": { + "$ref": "./examples/ManagedDatabaseDelete.json" + } + } + }, + "patch": { + "tags": [ + "ManagedDatabases" + ], + "description": "Updates an existing database.", + "operationId": "ManagedDatabases_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested database resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabaseUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Updating the managed database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Updates a managed database with minimal properties": { + "$ref": "./examples/ManagedDatabaseUpdateMin.json" + }, + "Updates a managed database with maximal properties": { + "$ref": "./examples/ManagedDatabaseUpdateMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeRestore": { + "post": { + "tags": [ + "ManagedDatabases" + ], + "description": "Completes the restore operation on a managed database.", + "operationId": "ManagedDatabases_CompleteRestore", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The definition for completing the restore of this managed database.", + "required": true, + "schema": { + "$ref": "#/definitions/CompleteDatabaseRestoreDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed restore request." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseCompleteRestoreRequest - The complete database restore request is invalid\n\n * 400 InvalidDatabaseCompleteRestoreRequestLastBackupName - The last backup name is invalid\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 AutoCompleteMissingLastBackupName - Auto complete restore request must have lastBackupName parameter provided.\n\n * 400 MissingThumbprint - Can not find server certificate.\n\n * 400 BlobStorageServerFailure - Blob storage server failure has occurred.\n\n * 400 BackupSetNotFound - No backups were found to restore the database. Please contact support to restore the database.\n\n * 400 FullBackupNotFound - Full backup can not be found.\n\n * 400 RestoreFromStripedBackupsNotEnabled - Restoring from striped backups is not supported.\n\n * 400 BrokenRestorePlanNoFullBackup - The restore plan is broken because there is no full backup.\n\n * 400 BrokenRestorePlanWrongLogBackupLSN - The restore plan is broken because firstLsn of current log backup is not <= lastLsn of next log backup.\n\n * 400 BrokenRestorePlanWrongDiffBackupLSN - The restore plan is broken because firstLsn of diff backup is not >= firstLsn of full backup.\n\n * 400 BrokenRestorePlanGapInLogBackups - The restore plan is broken because firstLsn of current log backup is not equal to lastLsn of prev log backup.\n\n * 400 XtpInitializedDuringRestore - Memory-optimized filegroup must be empty in order to be restored on General Purpose tier of SQL Database Managed Instance.\n\n * 400 FullBackupMissingChecksum - Provided full backup is missing checksum.\n\n * 400 FullBackupDamaged - Provided full backup is damaged.\n\n * 400 PartiallyContainedDatabaseUnsupported - \"Backup for a partially contained database is not supported.\"\n\n * 400 RequiredBackupIsNotLastRestored - Migration cannot be completed because provided backup file name is not the name of the last backup file that is restored.\n\n * 400 ManagedInstanceStorageLimitHit - The managed instance has reached its storage limit.\n\n * 400 IncompatiblePhysicalLayoutTooFewDataFiles - Database backup contains incompatible physical layout. No data files are found in the backup.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineDataFilesExist - Database backup contains incompatible physical layout. Non-online data files exist.\n\n * 400 IncompatiblePhysicalLayoutWrongNumberOfLogFiles - Database backup contains incompatible physical layout. Multiple log files are not supported.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineLogFilesExist - Database backup contains incompatible physical layout. Non-online log files exist.\n\n * 400 IncompatiblePhysicalLayoutTooManyNonDataLogFiles - Database backup contains incompatible physical layout. Too many non-data/log files.\n\n * 400 ExternalBackupAlreadySignaledToComplete - The restore request has already been signaled to complete.\n\n * 400 ExternalBackupRestoreHasNotBeenStarted - The restore request can only be completed once the restore has started.\n\n * 400 ExternalBackupUpgradeInProgress - The restore request cannot be completed, since upgrade is in progress.\n\n * 400 IncompatiblePhysicalLayoutTooManyXTPFiles - Database backup contains incompatible physical layout. Multiple files found in the filegroup that contains MEMORY_OPTIMIZED_DATA.\n\n * 400 BlobStorageFailure - Blob storage failure has occurred.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Completing restore request is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Completes a managed database external backup restore.": { + "$ref": "./examples/ManagedDatabaseCompleteExternalRestore.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/inaccessibleManagedDatabases": { + "get": { + "tags": [ + "ManagedDatabases" + ], + "description": "Gets a list of inaccessible managed databases in a managed instance", + "operationId": "ManagedDatabases_ListInaccessibleByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of inaccessible managed databases in a managed instance.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List inaccessible managed databases by managed instances": { + "$ref": "./examples/InaccessibleManagedDatabaseListByManagedInstance.json" + } + } + } + } + }, + "definitions": { + "ManagedDatabaseListResult": { + "description": "A list of managed databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedDatabaseProperties": { + "description": "The managed database's properties.", + "type": "object", + "properties": { + "collation": { + "description": "Collation of the managed database.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "status": { + "description": "Status of the database.", + "enum": [ + "Online", + "Offline", + "Shutdown", + "Creating", + "Inaccessible", + "Restoring", + "Updating" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagedDatabaseStatus", + "modelAsString": true + } + }, + "creationDate": { + "format": "date-time", + "description": "Creation date of the database.", + "type": "string", + "readOnly": true + }, + "earliestRestorePoint": { + "format": "date-time", + "description": "Earliest restore point in time for point in time restore.", + "type": "string", + "readOnly": true + }, + "restorePointInTime": { + "format": "date-time", + "description": "Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "defaultSecondaryLocation": { + "description": "Geo paired region.", + "type": "string", + "readOnly": true + }, + "catalogCollation": { + "description": "Collation of the metadata catalog.", + "enum": [ + "DATABASE_DEFAULT", + "SQL_Latin1_General_CP1_CI_AS" + ], + "type": "string", + "x-ms-enum": { + "name": "CatalogCollationType", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "createMode": { + "description": "Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).", + "enum": [ + "Default", + "RestoreExternalBackup", + "PointInTimeRestore", + "Recovery", + "RestoreLongTermRetentionBackup" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedDatabaseCreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageContainerUri": { + "description": "Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "sourceDatabaseId": { + "description": "The resource identifier of the source database associated with create operation of this database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "restorableDroppedDatabaseId": { + "description": "The restorable dropped database resource id to restore when creating this database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageContainerSasToken": { + "description": "Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "failoverGroupId": { + "description": "Instance Failover Group resource identifier that this managed database belongs to.", + "type": "string", + "readOnly": true + }, + "recoverableDatabaseId": { + "description": "The resource identifier of the recoverable database associated with create operation of this database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "longTermRetentionBackupResourceId": { + "description": "The name of the Long Term Retention backup to be used for restore of this managed database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "autoCompleteRestore": { + "description": "Whether to auto complete restore of this managed database.", + "type": "boolean", + "x-ms-mutability": [ + "create" + ] + }, + "lastBackupName": { + "description": "Last backup file name for restore of this managed database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + } + } + }, + "ManagedDatabase": { + "description": "A managed database resource.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseUpdate": { + "description": "An managed database update.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "CompleteDatabaseRestoreDefinition": { + "description": "Contains the information necessary to perform a complete database restore operation.", + "required": [ + "lastBackupName" + ], + "type": "object", + "properties": { + "lastBackupName": { + "description": "The last backup name to apply", + "type": "string" + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceAdministrators.json new file mode 100644 index 000000000000..b091be25132f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceAdministrators.json @@ -0,0 +1,331 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators": { + "get": { + "tags": [ + "ManagedInstanceAdministrators" + ], + "description": "Gets a list of managed instance administrators.", + "operationId": "ManagedInstanceAdministrators_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed instance administrators.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdministratorListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List administrators of managed instance": { + "$ref": "./examples/ManagedInstanceAdministratorListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}": { + "get": { + "tags": [ + "ManagedInstanceAdministrators" + ], + "description": "Gets a managed instance administrator.", + "operationId": "ManagedInstanceAdministrators_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the the specified managed instance administrator.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidManagedServerAdministratorType - Invalid administrator type specified in properties.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidManagedServerAzureADAdminDeleteOperation - User tried to delete managed server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Get administrator of managed instance": { + "$ref": "./examples/ManagedInstanceAdministratorGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceAdministrators" + ], + "description": "Creates or updates a managed instance administrator.", + "operationId": "ManagedInstanceAdministrators_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested administrator parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceAdministrator" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance administrator.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidManagedServerAdministratorType - Invalid administrator type specified in properties.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidManagedServerAzureADAdminDeleteOperation - User tried to delete managed server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 PrincipalNotFoundInTenant - AzureAD Lookup returned no results for this name.\n\n * 400 ServerPrincipalHasDuplicateDisplayNameInAad - AzureAD Lookup returned multiple results for this name.\n\n * 400 ManagedInstanceIsBusy - Managed Instance is busy with another request.\n\n * 400 InvalidPrincipalType - This principal type is not supported in Windows Azure SQL Database.\n\n * 400 ServicePrincipalLookupInAadFailed - AzureAD Lookup failed due to service infrastructure errors.\n\n * 400 TenantNotFoundInActiveDirectory - Tenant is not available in active directory.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceHasNoPermissionsToAccessAad - Attempt to perform operation, which involves a non-existing login or login on which executing principal has no permissions.\n\n * 403 ServicePrincipalLookupInAadFailedIdentityForbidden - AzureAD Lookup failed because MSI was not granted read permissions on AAD.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerPrincipalAlreadyExists - Attempt to create server principal with non-unique name.\n\n * 409 ServerPrincipalCurrentlyLoggedIn - Self-explanatory.\n\n * 409 ServerPrincipalOwnsJobs - Attempt to remove a login when it has active jobs.\n\n * 409 ServerPrincipalIsGrantorOfPermissions - Attempt to drop a server principal, which is a grantor of permissions.\n\n * 409 ServerPrincipalOwnsDatabase - Change the owner of the database(s) before dropping the login.\n\n * 409 ServerPrincipalUsedInTriggerOrEventNotification - Attempt to drop login, which is used as an execution context of a trigger or event notification.\n\n * 409 ServerPrincipalOwnsObjects - Attempt to drop a login, which owns objects.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActiveDirectoryLookupTimedOut - The operation could not be completed at this time. Please try again later.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the managed instance administrator.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdministrator" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create administrator of managed instance": { + "$ref": "./examples/ManagedInstanceAdministratorCreate.json" + }, + "Update administrator of managed instance": { + "$ref": "./examples/ManagedInstanceAdministratorUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstanceAdministrators" + ], + "description": "Deletes a managed instance administrator.", + "operationId": "ManagedInstanceAdministrators_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed instance administrator." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidManagedServerAdministratorType - Invalid administrator type specified in properties.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidManagedServerAzureADAdminDeleteOperation - User tried to delete managed server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 PrincipalNotFoundInTenant - AzureAD Lookup returned no results for this name.\n\n * 400 ServerPrincipalHasDuplicateDisplayNameInAad - AzureAD Lookup returned multiple results for this name.\n\n * 400 ManagedInstanceIsBusy - Managed Instance is busy with another request.\n\n * 400 InvalidPrincipalType - This principal type is not supported in Windows Azure SQL Database.\n\n * 400 ServicePrincipalLookupInAadFailed - AzureAD Lookup failed due to service infrastructure errors.\n\n * 400 TenantNotFoundInActiveDirectory - Tenant is not available in active directory.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceHasNoPermissionsToAccessAad - Attempt to perform operation, which involves a non-existing login or login on which executing principal has no permissions.\n\n * 403 ServicePrincipalLookupInAadFailedIdentityForbidden - AzureAD Lookup failed because MSI was not granted read permissions on AAD.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerPrincipalAlreadyExists - Attempt to create server principal with non-unique name.\n\n * 409 ServerPrincipalCurrentlyLoggedIn - Self-explanatory.\n\n * 409 ServerPrincipalOwnsJobs - Attempt to remove a login when it has active jobs.\n\n * 409 ServerPrincipalIsGrantorOfPermissions - Attempt to drop a server principal, which is a grantor of permissions.\n\n * 409 ServerPrincipalOwnsDatabase - Change the owner of the database(s) before dropping the login.\n\n * 409 ServerPrincipalUsedInTriggerOrEventNotification - Attempt to drop login, which is used as an execution context of a trigger or event notification.\n\n * 409 ServerPrincipalOwnsObjects - Attempt to drop a login, which owns objects.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActiveDirectoryLookupTimedOut - The operation could not be completed at this time. Please try again later.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete administrator of managed instance": { + "$ref": "./examples/ManagedInstanceAdministratorDelete.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceAdministratorListResult": { + "description": "A list of managed instance administrators.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceAdministrator" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceAdministratorProperties": { + "description": "The properties of a managed instance administrator.", + "required": [ + "administratorType", + "login", + "sid" + ], + "type": "object", + "properties": { + "administratorType": { + "description": "Type of the managed instance administrator.", + "enum": [ + "ActiveDirectory" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedInstanceAdministratorType", + "modelAsString": true + } + }, + "login": { + "description": "Login name of the managed instance administrator.", + "type": "string" + }, + "sid": { + "format": "uuid", + "description": "SID (object ID) of the managed instance administrator.", + "type": "string" + }, + "tenantId": { + "format": "uuid", + "description": "Tenant ID of the managed instance administrator.", + "type": "string" + } + } + }, + "ManagedInstanceAdministrator": { + "description": "An Azure SQL managed instance administrator.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceAdministratorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceAzureADOnlyAuthentications.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceAzureADOnlyAuthentications.json new file mode 100644 index 000000000000..3472fb50a849 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceAzureADOnlyAuthentications.json @@ -0,0 +1,311 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}": { + "get": { + "tags": [ + "ManagedInstanceAzureADOnlyAuthentications" + ], + "description": "Gets a specific Azure Active Directory only authentication property.", + "operationId": "ManagedInstanceAzureADOnlyAuthentications_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified Azure Active Directory only authentication properties.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthentication" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidManagedServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Gets a Azure Active Directory only authentication property.": { + "$ref": "./examples/ManagedInstanceAzureADOnlyAuthGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceAzureADOnlyAuthentications" + ], + "description": "Sets Server Active Directory only authentication property or updates an existing server Active Directory only authentication property.", + "operationId": "ManagedInstanceAzureADOnlyAuthentications_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating an Active Directory only authentication property.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthentication" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated a Azure Active Directory only authentication property.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthentication" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidManagedServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully updated Azure Active Directory only authentication property.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthentication" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates Azure Active Directory only authentication object.": { + "$ref": "./examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstanceAzureADOnlyAuthentications" + ], + "description": "Deletes an existing server Active Directory only authentication property.", + "operationId": "ManagedInstanceAzureADOnlyAuthentications_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the Azure Active Directory only property." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidManagedServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified Azure Active Directory only property does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes Azure Active Directory only authentication object.": { + "$ref": "./examples/ManagedInstanceAzureADOnlyAuthDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications": { + "get": { + "tags": [ + "ManagedInstanceAzureADOnlyAuthentications" + ], + "description": "Gets a list of server Azure Active Directory only authentications.", + "operationId": "ManagedInstanceAzureADOnlyAuthentications_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of Azure Active Directory only authentication objects.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of Azure Active Directory only authentication object.": { + "$ref": "./examples/ManagedInstanceAzureADOnlyAuthListByInstance.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceAzureADOnlyAuthProperties": { + "description": "Properties of a active directory only authentication for Managed Instance.", + "required": [ + "azureADOnlyAuthentication" + ], + "type": "object", + "properties": { + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean" + } + } + }, + "ManagedInstanceAzureADOnlyAuthentication": { + "description": "Azure Active Directory only authentication.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceAzureADOnlyAuthListResult": { + "description": "A list of active directory only authentications.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthentication" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceEncryptionProtectors.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceEncryptionProtectors.json new file mode 100644 index 000000000000..f12b8081098b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceEncryptionProtectors.json @@ -0,0 +1,338 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}/revalidate": { + "post": { + "tags": [ + "ManagedInstanceEncryptionProtectors" + ], + "description": "Revalidates an existing encryption protector.", + "operationId": "ManagedInstanceEncryptionProtectors_Revalidate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be updated.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully revalidated the encryption protector." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerKeyNotFound - The requested server key was not found on the current subscription.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information ." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Revalidates the encryption protector": { + "$ref": "./examples/ManagedInstanceEncryptionProtectorRevalidate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector": { + "get": { + "tags": [ + "ManagedInstanceEncryptionProtectors" + ], + "description": "Gets a list of managed instance encryption protectors", + "operationId": "ManagedInstanceEncryptionProtectors_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed instance encryption protector.", + "schema": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtectorListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List encryption protectors by managed instance": { + "$ref": "./examples/ManagedInstanceEncryptionProtectorList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}": { + "get": { + "tags": [ + "ManagedInstanceEncryptionProtectors" + ], + "description": "Gets a managed instance encryption protector.", + "operationId": "ManagedInstanceEncryptionProtectors_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be retrieved.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance encryption protector.", + "schema": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtector" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the encryption protector": { + "$ref": "./examples/ManagedInstanceEncryptionProtectorGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceEncryptionProtectors" + ], + "description": "Updates an existing encryption protector.", + "operationId": "ManagedInstanceEncryptionProtectors_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be updated.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested encryption protector resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtector" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the encryption protector.", + "schema": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtector" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerKeyNotFound - The requested server key was not found on the current subscription.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information ." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the encryption protector to key vault": { + "$ref": "./examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json" + }, + "Update the encryption protector to service managed": { + "$ref": "./examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceEncryptionProtectorListResult": { + "description": "A list of managed instance encryption protectors.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtector" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceEncryptionProtectorProperties": { + "description": "Properties for an encryption protector execution.", + "required": [ + "serverKeyType" + ], + "type": "object", + "properties": { + "serverKeyName": { + "description": "The name of the managed instance key.", + "type": "string" + }, + "serverKeyType": { + "description": "The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.", + "enum": [ + "ServiceManaged", + "AzureKeyVault" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerKeyType", + "modelAsString": true + } + }, + "uri": { + "description": "The URI of the server key.", + "type": "string", + "readOnly": true + }, + "thumbprint": { + "description": "Thumbprint of the server key.", + "type": "string", + "readOnly": true + }, + "autoRotationEnabled": { + "description": "Key auto rotation opt-in flag. Either true or false.", + "type": "boolean" + } + } + }, + "ManagedInstanceEncryptionProtector": { + "description": "The managed instance encryption protector.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Kind of encryption protector. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtectorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceKeys.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceKeys.json new file mode 100644 index 000000000000..650ffe168a84 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceKeys.json @@ -0,0 +1,336 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys": { + "get": { + "tags": [ + "ManagedInstanceKeys" + ], + "description": "Gets a list of managed instance keys.", + "operationId": "ManagedInstanceKeys_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed instance keys.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKeyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the keys for a managed instance.": { + "$ref": "./examples/ManagedInstanceKeyList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}": { + "get": { + "tags": [ + "ManagedInstanceKeys" + ], + "description": "Gets a managed instance key.", + "operationId": "ManagedInstanceKeys_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the managed instance key to be retrieved.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance key.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKey" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the managed instance key": { + "$ref": "./examples/ManagedInstanceKeyGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceKeys" + ], + "description": "Creates or updates a managed instance key.", + "operationId": "ManagedInstanceKeys_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the managed instance key to be operated on (updated or created).", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested managed instance key resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceKey" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance key.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKey" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information ." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the managed instance key.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKey" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates a managed instance key": { + "$ref": "./examples/ManagedInstanceKeyCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstanceKeys" + ], + "description": "Deletes the managed instance key with the given name.", + "operationId": "ManagedInstanceKeys_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the managed instance key to be deleted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed instance key." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information ." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified managed instance key does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the managed instance key": { + "$ref": "./examples/ManagedInstanceKeyDelete.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceKeyListResult": { + "description": "A list of managed instance keys.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceKey" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceKeyProperties": { + "description": "Properties for a key execution.", + "required": [ + "serverKeyType" + ], + "type": "object", + "properties": { + "serverKeyType": { + "description": "The key type like 'ServiceManaged', 'AzureKeyVault'.", + "enum": [ + "ServiceManaged", + "AzureKeyVault" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "uri": { + "description": "The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "thumbprint": { + "description": "Thumbprint of the key.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The key creation date.", + "type": "string", + "readOnly": true + }, + "autoRotationEnabled": { + "description": "Key auto rotation opt-in flag. Either true or false.", + "type": "boolean", + "readOnly": true + } + } + }, + "ManagedInstanceKey": { + "description": "A managed instance key.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Kind of encryption protector. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ManagedInstanceKeyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceLongTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceLongTermRetentionPolicies.json new file mode 100644 index 000000000000..f4eae1925d92 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceLongTermRetentionPolicies.json @@ -0,0 +1,277 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "ManagedInstanceLongTermRetentionPolicies" + ], + "description": "Gets a managed database's long term retention policy.", + "operationId": "ManagedInstanceLongTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be Default.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedInstanceLongTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got LTR policy for managed database.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the long term retention policy for the managed database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionPolicyGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceLongTermRetentionPolicies" + ], + "description": "Sets a managed database's long term retention policy.", + "operationId": "ManagedInstanceLongTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be Default.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedInstanceLongTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The long term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set LTR policy for managed database.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMissingWeekOfYear - WeekOfYear is required to be set between 1 and 52 in order to set yearly retention.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or update the LTR policy for the managed database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies": { + "get": { + "tags": [ + "ManagedInstanceLongTermRetentionPolicies" + ], + "description": "Gets a database's long term retention policy.", + "operationId": "ManagedInstanceLongTermRetentionPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got LTR policy for managed database.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the long term retention policies for the managed database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json" + } + } + } + } + }, + "definitions": { + "BaseLongTermRetentionPolicyProperties": { + "description": "Properties of a long term retention policy", + "type": "object", + "properties": { + "weeklyRetention": { + "description": "The weekly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "monthlyRetention": { + "description": "The monthly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "yearlyRetention": { + "description": "The yearly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "weekOfYear": { + "format": "int32", + "description": "The week of year to take the yearly backup in an ISO 8601 format.", + "type": "integer" + } + } + }, + "ManagedInstanceLongTermRetentionPolicy": { + "description": "A long term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/BaseLongTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceLongTermRetentionPolicyListResult": { + "description": "A list of long term retention policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceOperations.json new file mode 100644 index 000000000000..79bd3d7c3702 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceOperations.json @@ -0,0 +1,390 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations": { + "get": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Gets a list of operations performed on the managed instance.", + "operationId": "ManagedInstanceOperations_ListByManagedInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for getting managed instance operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/ManagedInstanceOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the managed instance management operations": { + "$ref": "./examples/ListManagedInstanceOperations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}": { + "get": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Gets a management operation on a managed instance.", + "operationId": "ManagedInstanceOperations_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance operation.", + "schema": { + "$ref": "#/definitions/ManagedInstanceOperation" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets the managed instance management operation": { + "$ref": "./examples/GetManagedInstanceOperation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel": { + "post": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Cancels the asynchronous operation on the managed instance.", + "operationId": "ManagedInstanceOperations_Cancel", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for cancel has been executed successfully." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + } + }, + "x-ms-examples": { + "Cancel the managed instance management operation": { + "$ref": "./examples/CancelManagedInstanceOperation.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceOperationListResult": { + "description": "The response to a list managed instance operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceOperationProperties": { + "description": "The properties of a managed instance operation.", + "type": "object", + "properties": { + "managedInstanceName": { + "description": "The name of the managed instance the operation is being performed on.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagementOperationState", + "modelAsString": true + } + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + }, + "operationParameters": { + "$ref": "#/definitions/ManagedInstanceOperationParametersPair", + "description": "The operation parameters.", + "readOnly": true + }, + "operationSteps": { + "$ref": "#/definitions/ManagedInstanceOperationSteps", + "description": "The operation steps.", + "readOnly": true + } + } + }, + "ManagedInstanceOperationParametersPair": { + "description": "The parameters of a managed instance operation.", + "type": "object", + "properties": { + "currentParameters": { + "$ref": "#/definitions/UpsertManagedServerOperationParameters", + "description": "The current parameters.", + "readOnly": true + }, + "requestedParameters": { + "$ref": "#/definitions/UpsertManagedServerOperationParameters", + "description": "The requested parameters.", + "readOnly": true + } + } + }, + "ManagedInstanceOperationSteps": { + "description": "The steps of a managed instance operation.", + "type": "object", + "properties": { + "totalSteps": { + "description": "The total number of operation steps.", + "type": "string", + "readOnly": true + }, + "currentStep": { + "format": "int32", + "description": "The number of current operation steps.", + "type": "integer", + "readOnly": true + }, + "stepsList": { + "description": "The operation steps list.", + "type": "array", + "items": { + "$ref": "#/definitions/UpsertManagedServerOperationStep" + }, + "readOnly": true + } + } + }, + "UpsertManagedServerOperationParameters": { + "type": "object", + "properties": { + "family": { + "type": "string" + }, + "tier": { + "type": "string" + }, + "vCores": { + "format": "int32", + "type": "integer" + }, + "storageSizeInGB": { + "format": "int32", + "type": "integer" + } + } + }, + "UpsertManagedServerOperationStep": { + "type": "object", + "properties": { + "order": { + "format": "int32", + "type": "integer" + }, + "name": { + "type": "string" + }, + "status": { + "enum": [ + "NotStarted", + "InProgress", + "SlowedDown", + "Completed", + "Failed", + "Canceled" + ], + "type": "string" + } + } + }, + "ManagedInstanceOperation": { + "description": "A managed instance operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstancePrivateEndpointConnections.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstancePrivateEndpointConnections.json new file mode 100644 index 000000000000..161f8db8c66d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstancePrivateEndpointConnections.json @@ -0,0 +1,318 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "tags": [ + "ManagedInstancePrivateEndpointConnections" + ], + "description": "Gets a private endpoint connection.", + "operationId": "ManagedInstancePrivateEndpointConnections_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified private endpoint connection.", + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets private endpoint connection.": { + "$ref": "./examples/ManagedInstancePrivateEndpointConnectionGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstancePrivateEndpointConnections" + ], + "description": "Approve or reject a private endpoint connection with a given name.", + "operationId": "ManagedInstancePrivateEndpointConnections_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnection" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully approved or rejected private endpoint connection.", + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Approve or reject a private endpoint connection with a given name.": { + "$ref": "./examples/ManagedInstancePrivateEndpointConnectionUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstancePrivateEndpointConnections" + ], + "description": "Deletes a private endpoint connection with a given name.", + "operationId": "ManagedInstancePrivateEndpointConnections_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted private endpoint connection." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "Private endpoint connection does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes a private endpoint connection with a given name.": { + "$ref": "./examples/ManagedInstancePrivateEndpointConnectionDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections": { + "get": { + "tags": [ + "ManagedInstancePrivateEndpointConnections" + ], + "description": "Gets all private endpoint connections on a server.", + "operationId": "ManagedInstancePrivateEndpointConnections_ListByManagedInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private endpoint connections.", + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of private endpoint connections on a server.": { + "$ref": "./examples/ManagedInstancePrivateEndpointConnectionList.json" + } + } + } + } + }, + "definitions": { + "ManagedInstancePrivateEndpointConnectionProperties": { + "description": "Properties of a private endpoint connection.", + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointProperty", + "description": "Private endpoint which the connection belongs to." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/ManagedInstancePrivateLinkServiceConnectionStateProperty", + "description": "Connection State of the Private Endpoint Connection." + }, + "provisioningState": { + "description": "State of the Private Endpoint Connection.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstancePrivateEndpointProperty": { + "type": "object", + "properties": { + "id": { + "description": "Resource id of the private endpoint.", + "type": "string" + } + } + }, + "ManagedInstancePrivateLinkServiceConnectionStateProperty": { + "required": [ + "status", + "description" + ], + "type": "object", + "properties": { + "status": { + "description": "The private link service connection status.", + "type": "string" + }, + "description": { + "description": "The private link service connection description.", + "type": "string" + }, + "actionsRequired": { + "description": "The private link service connection description.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstancePrivateEndpointConnection": { + "description": "A private endpoint connection", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnectionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstancePrivateEndpointConnectionListResult": { + "description": "A list of private endpoint connections.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnection" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstancePrivateLinkResources.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstancePrivateLinkResources.json new file mode 100644 index 000000000000..7a8a33272ef0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstancePrivateLinkResources.json @@ -0,0 +1,185 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources": { + "get": { + "tags": [ + "ManagedInstancePrivateLinkResources" + ], + "description": "Gets the private link resources for SQL server.", + "operationId": "ManagedInstancePrivateLinkResources_ListByManagedInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateLinkListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets private link resources for SQL.": { + "$ref": "./examples/ManagedInstancePrivateLinkResourcesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources/{groupName}": { + "get": { + "tags": [ + "ManagedInstancePrivateLinkResources" + ], + "description": "Gets a private link resource for SQL server.", + "operationId": "ManagedInstancePrivateLinkResources_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "groupName", + "in": "path", + "description": "The name of the private link resource.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + } + }, + "x-ms-examples": { + "Gets a private link resource for SQL.": { + "$ref": "./examples/ManagedInstancePrivateLinkResourcesGet.json" + } + } + } + } + }, + "definitions": { + "ManagedInstancePrivateLinkListResult": { + "description": "A list of private link resources", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstancePrivateLink" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstancePrivateLinkProperties": { + "description": "Properties of a private link resource.", + "type": "object", + "properties": { + "groupId": { + "description": "The private link resource group id.", + "type": "string", + "readOnly": true + }, + "requiredMembers": { + "description": "The private link resource required member names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + }, + "ManagedInstancePrivateLink": { + "description": "A private link resource", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstancePrivateLinkProperties", + "description": "The private link resource group id.", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceTdeCertificates.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceTdeCertificates.json new file mode 100644 index 000000000000..84a01b17dc55 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceTdeCertificates.json @@ -0,0 +1,133 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates": { + "post": { + "tags": [ + "ManagedInstanceTdeCertificates" + ], + "description": "Creates a TDE certificate for a given server.", + "operationId": "ManagedInstanceTdeCertificates_Create", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested TDE certificate to be created or updated.", + "required": true, + "schema": { + "$ref": "#/definitions/TdeCertificate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created the TDE certificate." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MissingPrivateBlob - The private blob is missing.\n\n * 400 InvalidPrivateBlobOrPassword - Invalid private blob or password specified.\n\n * 400 PrivateBlobWithoutPrivateKey - The provided blob does not contain private key.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Upload a TDE certificate": { + "$ref": "./examples/ManagedInstanceTdeCertificate.json" + } + } + } + } + }, + "definitions": { + "TdeCertificateProperties": { + "description": "Properties of a TDE certificate.", + "required": [ + "privateBlob" + ], + "type": "object", + "properties": { + "privateBlob": { + "description": "The base64 encoded certificate private blob.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "certPassword": { + "description": "The certificate password.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + } + } + }, + "TdeCertificate": { + "description": "A TDE certificate that can be uploaded into a server.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/TdeCertificateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceVulnerabilityAssessments.json new file mode 100644 index 000000000000..09e3acffad9b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceVulnerabilityAssessments.json @@ -0,0 +1,359 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "ManagedInstanceVulnerabilityAssessments" + ], + "description": "Gets the managed instance's vulnerability assessment.", + "operationId": "ManagedInstanceVulnerabilityAssessments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed instance vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Get a managed instance's vulnerability assessment": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceVulnerabilityAssessments" + ], + "description": "Creates or updates the managed instance's vulnerability assessment.", + "operationId": "ManagedInstanceVulnerabilityAssessments_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + }, + "201": { + "description": "Successfully created the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a managed instance's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json" + }, + "Create a managed instance's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json" + }, + "Create a managed instance's vulnerability assessment with all parameters": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstanceVulnerabilityAssessments" + ], + "description": "Removes the managed instance's vulnerability assessment.", + "operationId": "ManagedInstanceVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the managed instance vulnerability assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Remove a managed instance's vulnerability assessment": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments": { + "get": { + "tags": [ + "ManagedInstanceVulnerabilityAssessments" + ], + "description": "Gets the managed instance's vulnerability assessment policies.", + "operationId": "ManagedInstanceVulnerabilityAssessments_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance for which the vulnerability assessments is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed instance vulnerability assessment policies.", + "schema": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a managed instance's vulnerability assessment policies": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceVulnerabilityAssessmentProperties": { + "description": "Properties of a managed instance vulnerability assessment.", + "required": [ + "storageContainerPath" + ], + "type": "object", + "properties": { + "storageContainerPath": { + "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageContainerSasKey": { + "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "recurringScans": { + "$ref": "#/definitions/VulnerabilityAssessmentRecurringScansProperties", + "description": "The recurring scans settings" + } + } + }, + "VulnerabilityAssessmentRecurringScansProperties": { + "description": "Properties of a Vulnerability Assessment recurring scans.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Recurring scans state.", + "type": "boolean" + }, + "emailSubscriptionAdmins": { + "description": "Specifies that the schedule scan notification will be is sent to the subscription administrators.", + "default": true, + "type": "boolean" + }, + "emails": { + "description": "Specifies an array of e-mail addresses to which the scan notification is sent.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ManagedInstanceVulnerabilityAssessment": { + "description": "A managed instance vulnerability assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessmentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceVulnerabilityAssessmentListResult": { + "description": "A list of the ManagedInstance's vulnerability assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstances.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstances.json new file mode 100644 index 000000000000..934a8280c2c7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedInstances.json @@ -0,0 +1,1254 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a list of all managed instances in an instance pool.", + "operationId": "ManagedInstances_ListByInstancePool", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The instance pool name.", + "required": true, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed instances.", + "schema": { + "$ref": "#/definitions/ManagedInstanceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 InstancePoolNotFound - An instance pool cannot be found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed instances by instance pool": { + "$ref": "./examples/ManagedInstanceListByInstancePool.json" + }, + "List managed instances by instance pool with expand equals administrators": { + "$ref": "./examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a list of all managed instances in the subscription.", + "operationId": "ManagedInstances_List", + "parameters": [ + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed instances.", + "schema": { + "$ref": "#/definitions/ManagedInstanceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed instances": { + "$ref": "./examples/ManagedInstanceList.json" + }, + "List managed instances with expand equals administrators": { + "$ref": "./examples/ManagedInstanceListWithExpandEqualsAdministrators.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a list of managed instances in a resource group.", + "operationId": "ManagedInstances_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed instances.", + "schema": { + "$ref": "#/definitions/ManagedInstanceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed instances by resource group": { + "$ref": "./examples/ManagedInstanceListByResourceGroup.json" + }, + "List managed instances by resource group with $expand=administrators": { + "$ref": "./examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a managed instance.", + "operationId": "ManagedInstances_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Get managed instance": { + "$ref": "./examples/ManagedInstanceGet.json" + }, + "Get managed instance with $expand=administrators": { + "$ref": "./examples/ManagedInstanceGetWithExpandEqualsAdministrators.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstances" + ], + "description": "Creates or updates a managed instance.", + "operationId": "ManagedInstances_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested managed instance resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 InvalidManagedServerDnsZonePartner - The resource URI of the geo-primary managed instance specified in the create request is invalid. Please ensure that the property is of the format /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/managedInstances/{managedInstanceName}\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidMaintenanceWindowSettings - Invalid maintenance window settings.\n\n * 400 InvalidMaintenanceWindowProperty - Invalid maintenance window property was specified.\n\n * 400 InvalidMaintenanceWindowPropertyNull - Invalid maintenance window with required properties null.\n\n * 400 InvalidMaintenanceWindowTypeWithPropertySpecified - Maintenance window type must not have certain properties specified.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 InvalidExternalAdministratorLogin - Invalid or missing external administrator login name.\n\n * 400 InvalidExternalAdministratorSid - Invalid or missing external administrator object id.\n\n * 400 InvalidExternalAdministratorTenantId - Invalid or missing external administrator tenant id.\n\n * 400 ExternalAdministratorPrincipalType - Invalid or missing external administrator principal type. Please select from User, Application or Group.\n\n * 400 MissingExternalAdministratorWithAadOnlyAuth - In order to use Azure AD Only Authentication, please provide details of an external administrator.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create managed instance with minimal properties": { + "$ref": "./examples/ManagedInstanceCreateMin.json" + }, + "Create managed instance with all properties": { + "$ref": "./examples/ManagedInstanceCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstances" + ], + "description": "Deletes a managed instance.", + "operationId": "ManagedInstances_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed instance." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Successfully initiated deletion of the managed instance." + }, + "204": { + "description": "The specified managed instance does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete managed instance": { + "$ref": "./examples/ManagedInstanceDelete.json" + } + } + }, + "patch": { + "tags": [ + "ManagedInstances" + ], + "description": "Updates a managed instance.", + "operationId": "ManagedInstances_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested managed instance resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 InvalidExternalAdministratorLogin - Invalid or missing external administrator login name.\n\n * 400 InvalidExternalAdministratorSid - Invalid or missing external administrator object id.\n\n * 400 InvalidExternalAdministratorTenantId - Invalid or missing external administrator tenant id.\n\n * 400 ExternalAdministratorPrincipalType - Invalid or missing external administrator principal type. Please select from User, Application or Group.\n\n * 400 MissingExternalAdministratorWithAadOnlyAuth - In order to use Azure AD Only Authentication, please provide details of an external administrator.\n\n * 400 InvalidMaintenanceWindowSettings - Invalid maintenance window settings.\n\n * 400 InvalidMaintenanceWindowProperty - Invalid maintenance window property was specified.\n\n * 400 InvalidMaintenanceWindowPropertyNull - Invalid maintenance window with required properties null.\n\n * 400 InvalidMaintenanceWindowTypeWithPropertySpecified - Maintenance window type must not have certain properties specified.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update managed instance with minimal properties": { + "$ref": "./examples/ManagedInstanceUpdateMin.json" + }, + "Update managed instance with all properties": { + "$ref": "./examples/ManagedInstanceUpdateMax.json" + }, + "Remove maintenance policy from managed instance (select default maintenance policy)": { + "$ref": "./examples/ManagedInstanceRemoveMaintenanceConfiguration.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Get top resource consuming queries of a managed instance.", + "operationId": "ManagedInstances_ListByManagedInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "numberOfQueries", + "in": "query", + "description": "How many 'top queries' to return. Default is 5.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "databases", + "in": "query", + "description": "Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified.", + "required": false, + "type": "string" + }, + { + "name": "startTime", + "in": "query", + "description": "Start time for observed period.", + "required": false, + "type": "string" + }, + { + "name": "endTime", + "in": "query", + "description": "End time for observed period.", + "required": false, + "type": "string" + }, + { + "name": "interval", + "in": "query", + "description": "The time step to be used to summarize the metric values. Default value is PT1H", + "required": false, + "type": "string", + "enum": [ + "PT1H", + "P1D" + ], + "x-ms-enum": { + "name": "QueryTimeGrainType", + "modelAsString": true + } + }, + { + "name": "aggregationFunction", + "in": "query", + "description": "Aggregation function to be used, default value is 'sum'", + "required": false, + "type": "string", + "enum": [ + "avg", + "min", + "max", + "stdev", + "sum" + ], + "x-ms-enum": { + "name": "AggregationFunctionType", + "modelAsString": true + } + }, + { + "name": "observationMetric", + "in": "query", + "description": "Metric to be used for ranking top queries. Default is 'cpu'", + "required": false, + "type": "string", + "enum": [ + "cpu", + "io", + "logIo", + "duration", + "dtu" + ], + "x-ms-enum": { + "name": "MetricType", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved top queries for managed instance.", + "schema": { + "$ref": "#/definitions/TopQueriesListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Obtain list of instance's top resource consuming queries. Minimal request and response.": { + "$ref": "./examples/ManagedInstanceTopQueriesListMin.json" + }, + "Obtain list of instance's top resource consuming queries.": { + "$ref": "./examples/ManagedInstanceTopQueriesList.json" + }, + "Obtain list of instance's top resource consuming queries. Full-blown request and response.": { + "$ref": "./examples/ManagedInstanceTopQueriesListMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover": { + "post": { + "tags": [ + "ManagedInstances" + ], + "description": "Failovers a managed instance.", + "operationId": "ManagedInstances_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance to failover.", + "required": true, + "type": "string" + }, + { + "name": "replicaType", + "in": "query", + "description": "The type of replica to be failed over.", + "required": false, + "type": "string", + "enum": [ + "Primary", + "ReadableSecondary" + ], + "x-ms-enum": { + "name": "ReplicaType", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed managed instance failover." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceFailoverThrottled - There was a recent failover on the managed instance.\n\n * 400 ManagedInstanceFailoverNotSupportedOnSKU - This type of customer initiated failover is not supported on the given SKU.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ManagedInstanceFailoverFullBackupMissing - Automated backup needs to complete the first full backup for a new database.\n\n * 409 ManagedInstanceNotInStateToFailover - The managed instance is currently in a state such that failover cannot be issued." + }, + "202": { + "description": "Managed instance failover is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Failover a managed instance.": { + "$ref": "./examples/FailoverManagedInstance.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceListResult": { + "description": "A list of managed instances.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstance" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ResourceIdentityWithUserAssignedIdentities": { + "description": "Azure Active Directory identity configuration for a resource.", + "type": "object", + "properties": { + "userAssignedIdentities": { + "description": "The resource ids of the user assigned identities to use", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UserIdentity" + } + }, + "principalId": { + "format": "uuid", + "description": "The Azure Active Directory principal id.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.", + "enum": [ + "None", + "SystemAssigned", + "UserAssigned" + ], + "type": "string", + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + }, + "tenantId": { + "format": "uuid", + "description": "The Azure Active Directory tenant id.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceProperties": { + "description": "The properties of a managed instance.", + "type": "object", + "properties": { + "provisioningState": { + "enum": [ + "Creating", + "Deleting", + "Updating", + "Unknown", + "Succeeded", + "Failed", + "Accepted", + "Created", + "Deleted", + "Unrecognized", + "Running", + "Canceled", + "NotSpecified", + "Registering", + "TimedOut" + ], + "type": "string", + "readOnly": true + }, + "managedInstanceCreateMode": { + "description": "Specifies the mode of database creation.\r\n\r\nDefault: Regular instance creation.\r\n\r\nRestore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified.", + "enum": [ + "Default", + "PointInTimeRestore" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedServerCreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "fullyQualifiedDomainName": { + "description": "The fully qualified domain name of the managed instance.", + "type": "string", + "readOnly": true + }, + "administratorLogin": { + "description": "Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation).", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "administratorLoginPassword": { + "description": "The administrator login password (required for managed instance creation).", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "subnetId": { + "description": "Subnet resource ID for the managed instance.", + "type": "string" + }, + "state": { + "description": "The state of the managed instance.", + "type": "string", + "readOnly": true + }, + "licenseType": { + "description": "The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses).", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedInstanceLicenseType", + "modelAsString": true + } + }, + "vCores": { + "format": "int32", + "description": "The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80.", + "type": "integer" + }, + "storageSizeInGB": { + "format": "int32", + "description": "Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only.", + "type": "integer" + }, + "collation": { + "description": "Collation of the managed instance.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "dnsZone": { + "description": "The Dns Zone that the managed instance is in.", + "type": "string", + "readOnly": true + }, + "dnsZonePartner": { + "description": "The resource id of another managed instance whose DNS zone this managed instance will share after creation.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "publicDataEndpointEnabled": { + "description": "Whether or not the public data endpoint is enabled.", + "type": "boolean" + }, + "sourceManagedInstanceId": { + "description": "The resource identifier of the source managed instance associated with create operation of this instance.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "restorePointInTime": { + "format": "date-time", + "description": "Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "proxyOverride": { + "description": "Connection type used for connecting to the instance.", + "enum": [ + "Proxy", + "Redirect", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedInstanceProxyOverride", + "modelAsString": true + } + }, + "timezoneId": { + "description": "Id of the timezone. Allowed values are timezones supported by Windows.\r\nWindows keeps details on supported timezones, including the id, in registry under\r\nKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones.\r\nYou can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.\r\nList of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.\r\nAn example of valid timezone id is \"Pacific Standard Time\" or \"W. Europe Standard Time\".", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "instancePoolId": { + "description": "The Id of the instance pool this managed server belongs to.", + "type": "string" + }, + "maintenanceConfigurationId": { + "description": "Specifies maintenance configuration id to apply to this managed instance.", + "type": "string" + }, + "privateEndpointConnections": { + "description": "List of private endpoint connections on a managed instance.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstancePecProperty" + }, + "readOnly": true + }, + "minimalTlsVersion": { + "description": "Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'", + "type": "string" + }, + "storageAccountType": { + "description": "The storage account type used to store backups for this instance. The options are LRS (LocallyRedundantStorage), ZRS (ZoneRedundantStorage) and GRS (GeoRedundantStorage)", + "enum": [ + "GRS", + "LRS", + "ZRS" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageAccountType", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "zoneRedundant": { + "description": "Whether or not the multi-az is enabled.", + "type": "boolean" + }, + "primaryUserAssignedIdentityId": { + "description": "The resource id of a user assigned identity to be used by default.", + "type": "string" + }, + "keyId": { + "description": "A CMK URI of the key to use for encryption.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "administrators": { + "$ref": "#/definitions/ManagedInstanceExternalAdministrator", + "description": "The Azure Active Directory administrator of the server.", + "x-ms-mutability": [ + "read", + "create" + ] + } + } + }, + "UserIdentity": { + "description": "Azure Active Directory identity configuration for a resource.", + "type": "object", + "properties": { + "principalId": { + "format": "uuid", + "description": "The Azure Active Directory principal id.", + "type": "string", + "readOnly": true + }, + "clientId": { + "format": "uuid", + "description": "The Azure Active Directory client id.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstancePecProperty": { + "description": "A private endpoint connection under a managed instance", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnectionProperties", + "description": "Private endpoint connection properties", + "readOnly": true + } + } + }, + "ManagedInstanceExternalAdministrator": { + "description": "Properties of a active directory administrator.", + "type": "object", + "properties": { + "administratorType": { + "description": "Type of the sever administrator.", + "enum": [ + "ActiveDirectory" + ], + "type": "string", + "x-ms-enum": { + "name": "AdministratorType", + "modelAsString": true + } + }, + "principalType": { + "description": "Principal Type of the sever administrator.", + "enum": [ + "User", + "Group", + "Application" + ], + "type": "string", + "x-ms-enum": { + "name": "PrincipalType", + "modelAsString": true + } + }, + "login": { + "description": "Login name of the server administrator.", + "type": "string" + }, + "sid": { + "format": "uuid", + "description": "SID (object ID) of the server administrator.", + "type": "string" + }, + "tenantId": { + "format": "uuid", + "description": "Tenant ID of the administrator.", + "type": "string" + }, + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean" + } + } + }, + "ManagedInstancePrivateEndpointConnectionProperties": { + "description": "Properties of a private endpoint connection.", + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointProperty", + "description": "Private endpoint which the connection belongs to." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/ManagedInstancePrivateLinkServiceConnectionStateProperty", + "description": "Connection State of the Private Endpoint Connection." + }, + "provisioningState": { + "description": "State of the Private Endpoint Connection.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstancePrivateEndpointProperty": { + "type": "object", + "properties": { + "id": { + "description": "Resource id of the private endpoint.", + "type": "string" + } + } + }, + "ManagedInstancePrivateLinkServiceConnectionStateProperty": { + "required": [ + "status", + "description" + ], + "type": "object", + "properties": { + "status": { + "description": "The private link service connection status.", + "type": "string" + }, + "description": { + "description": "The private link service connection description.", + "type": "string" + }, + "actionsRequired": { + "description": "The private link service connection description.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstance": { + "description": "An Azure SQL managed instance.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "identity": { + "$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities", + "description": "The Azure Active Directory identity of the managed instance.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, BC_Gen5" + }, + "properties": { + "$ref": "#/definitions/ManagedInstanceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceUpdate": { + "description": "An update request for an Azure SQL Database managed instance.", + "type": "object", + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "Managed instance sku" + }, + "identity": { + "$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities", + "description": "Managed instance identity" + }, + "properties": { + "$ref": "#/definitions/ManagedInstanceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "TopQueriesListResult": { + "description": "A list of top resource consuming queries on managed instance", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/TopQueries" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "TopQueries": { + "type": "object", + "properties": { + "numberOfQueries": { + "format": "int32", + "description": "Requested number of top queries.", + "type": "integer", + "readOnly": true + }, + "aggregationFunction": { + "description": "Aggregation function used to calculate query metrics.", + "type": "string", + "readOnly": true + }, + "observationMetric": { + "description": "Metric used to rank queries.", + "type": "string", + "readOnly": true + }, + "intervalType": { + "description": "Interval type (length).", + "enum": [ + "PT1H", + "P1D" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "QueryTimeGrainType", + "modelAsString": true + } + }, + "startTime": { + "description": "The start time for the metric (ISO-8601 format).", + "type": "string", + "readOnly": true + }, + "endTime": { + "description": "The end time for the metric (ISO-8601 format).", + "type": "string", + "readOnly": true + }, + "queries": { + "description": "List of top resource consuming queries with appropriate metric data", + "type": "array", + "items": { + "$ref": "#/definitions/QueryStatisticsProperties" + } + } + } + }, + "QueryStatisticsProperties": { + "description": "Properties of a query execution statistics.", + "type": "object", + "properties": { + "databaseName": { + "description": "Database name of the database in which this query was executed.", + "type": "string", + "readOnly": true + }, + "queryId": { + "description": "Unique query id (unique within one database).", + "type": "string", + "readOnly": true + }, + "startTime": { + "description": "The start time for the metric (ISO-8601 format).", + "type": "string", + "readOnly": true + }, + "endTime": { + "description": "The end time for the metric (ISO-8601 format).", + "type": "string", + "readOnly": true + }, + "intervals": { + "description": "List of intervals with appropriate metric data", + "type": "array", + "items": { + "$ref": "#/definitions/QueryMetricInterval" + } + } + } + }, + "QueryMetricInterval": { + "description": "Properties of a query metrics interval.", + "type": "object", + "properties": { + "intervalStartTime": { + "description": "The start time for the metric interval (ISO-8601 format).", + "type": "string", + "readOnly": true + }, + "intervalType": { + "description": "Interval type (length).", + "enum": [ + "PT1H", + "P1D" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "QueryTimeGrainType", + "modelAsString": true + } + }, + "executionCount": { + "format": "int64", + "description": "Execution count of a query in this interval.", + "type": "integer", + "readOnly": true + }, + "metrics": { + "description": "List of metric objects for this interval", + "type": "array", + "items": { + "$ref": "#/definitions/QueryMetricProperties" + } + } + } + }, + "QueryMetricProperties": { + "description": "Properties of a topquery metric in one interval.", + "type": "object", + "properties": { + "name": { + "description": "The name information for the metric.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "The UI appropriate name for the metric.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "The unit of the metric.", + "enum": [ + "percentage", + "KB", + "microseconds", + "count" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "QueryMetricUnitType", + "modelAsString": true + } + }, + "value": { + "format": "double", + "description": "The value of the metric.", + "type": "number", + "readOnly": true + }, + "min": { + "format": "double", + "description": "Metric value when min() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "max": { + "format": "double", + "description": "Metric value when max() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "avg": { + "format": "double", + "description": "Metric value when avg() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "sum": { + "format": "double", + "description": "Metric value when sum() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "stdev": { + "format": "double", + "description": "Metric value when stdev aggregate function is used over the interval.", + "type": "number", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.json new file mode 100644 index 000000000000..2287b2e12f0b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.json @@ -0,0 +1,336 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies" + ], + "description": "Gets a dropped database's short term retention policy.", + "operationId": "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policies.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/GetManagedShortTermRetentionPolicyRestorableDropped.json" + } + } + }, + "put": { + "tags": [ + "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies" + ], + "description": "Sets a database's short term retention policy.", + "operationId": "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the restorable dropped database.": { + "$ref": "./examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json" + } + } + }, + "patch": { + "tags": [ + "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies" + ], + "description": "Sets a database's short term retention policy.", + "operationId": "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the restorable dropped database.": { + "$ref": "./examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies": { + "get": { + "tags": [ + "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies" + ], + "description": "Gets a dropped database's short term retention policy list.", + "operationId": "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_ListByRestorableDroppedDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policies.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the short term retention policy list for the database.": { + "$ref": "./examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json" + } + } + } + } + }, + "definitions": { + "ManagedBackupShortTermRetentionPolicyProperties": { + "description": "Properties of a short term retention policy", + "type": "object", + "properties": { + "retentionDays": { + "format": "int32", + "description": "The backup retention period in days. This is how many days Point-in-Time Restore will be supported.", + "type": "integer" + } + } + }, + "ManagedBackupShortTermRetentionPolicy": { + "description": "A short term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedBackupShortTermRetentionPolicyListResult": { + "description": "A list of short term retention policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedServerSecurityAlertPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedServerSecurityAlertPolicies.json new file mode 100644 index 000000000000..83a6fddccfec --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ManagedServerSecurityAlertPolicies.json @@ -0,0 +1,303 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}": { + "get": { + "tags": [ + "ManagedServerSecurityAlertPolicies" + ], + "description": "Get a managed server's threat detection policy.", + "operationId": "ManagedServerSecurityAlertPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed server threat detection policy.", + "schema": { + "$ref": "#/definitions/ManagedServerSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-examples": { + "Get a managed server's threat detection policy": { + "$ref": "./examples/ManagedServerSecurityAlertGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedServerSecurityAlertPolicies" + ], + "description": "Creates or updates a threat detection policy.", + "operationId": "ManagedServerSecurityAlertPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The managed server security alert policy.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedServerSecurityAlertPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the threat detection policy.", + "schema": { + "$ref": "#/definitions/ManagedServerSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later" + }, + "202": { + "description": "Created request to set the server threat detection policy." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a managed server's threat detection policy with minimal parameters": { + "$ref": "./examples/ManagedServerSecurityAlertCreateMin.json" + }, + "Update a managed server's threat detection policy with all parameters": { + "$ref": "./examples/ManagedServerSecurityAlertCreateMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies": { + "get": { + "tags": [ + "ManagedServerSecurityAlertPolicies" + ], + "description": "Get the managed server's threat detection policies.", + "operationId": "ManagedServerSecurityAlertPolicies_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed server threat detection policies.", + "schema": { + "$ref": "#/definitions/ManagedServerSecurityAlertPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the managed server's threat detection policies": { + "$ref": "./examples/ManagedServerSecurityAlertListByInstance.json" + } + } + } + } + }, + "definitions": { + "SecurityAlertsPolicyProperties": { + "description": "Properties of a security alert policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SecurityAlertsPolicyState", + "modelAsString": false + } + }, + "disabledAlerts": { + "description": "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAddresses": { + "description": "Specifies an array of e-mail addresses to which the alert is sent.", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAccountAdmins": { + "description": "Specifies that the alert is sent to the account administrators.", + "type": "boolean" + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the Threat Detection audit storage account.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the Threat Detection audit logs.", + "type": "integer" + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedServerSecurityAlertPolicy": { + "description": "A managed server security alert policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SecurityAlertPolicyResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SecurityAlertsPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedServerSecurityAlertPolicyListResult": { + "description": "A list of the managed Server's security alert policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedServerSecurityAlertPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Operations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Operations.json new file mode 100644 index 000000000000..048d8868e93b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Operations.json @@ -0,0 +1,145 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Sql/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available SQL Rest API operations.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved operations.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "OperationListResult": { + "description": "Result of the request to list SQL operations.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "SQL REST API operation definition.", + "type": "object", + "properties": { + "name": { + "description": "The name of the operation being performed on this particular object.", + "type": "string", + "readOnly": true + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "The localized display information for this particular operation / action.", + "readOnly": true + }, + "origin": { + "description": "The intended executor of the operation.", + "enum": [ + "user", + "system" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "OperationOrigin", + "modelAsString": true + } + }, + "properties": { + "description": "Additional descriptions for the operation.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true, + "x-ms-client-flatten": false + } + } + }, + "OperationDisplay": { + "description": "Display metadata associated with the operation.", + "type": "object", + "properties": { + "provider": { + "description": "The localized friendly form of the resource provider name.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The localized friendly form of the resource type related to this action/operation.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The localized friendly name for the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The localized friendly description for the operation.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/OperationsHealth.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/OperationsHealth.json new file mode 100644 index 000000000000..344d746aaf31 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/OperationsHealth.json @@ -0,0 +1,133 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/operationsHealth": { + "get": { + "tags": [ + "OperationsHealth" + ], + "description": "Gets a service operation health status.", + "operationId": "OperationsHealth_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved operations health for a location.", + "schema": { + "$ref": "#/definitions/OperationsHealthListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get management operations health in the given location.": { + "$ref": "./examples/OperationsHealthListByLocation.json" + } + } + } + } + }, + "definitions": { + "OperationsHealthListResult": { + "description": "A list of service health statuses in a location.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationsHealth" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "OperationsHealthProperties": { + "description": "Properties of an operation health.", + "type": "object", + "properties": { + "name": { + "description": "Operation name for the service", + "type": "string", + "readOnly": true + }, + "health": { + "description": "Operation health status of the service.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Health status description.", + "type": "string", + "readOnly": true + } + } + }, + "OperationsHealth": { + "description": "Operations health status in a location.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/OperationsHealthProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/OutboundFirewallRules.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/OutboundFirewallRules.json new file mode 100644 index 000000000000..422a4d707957 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/OutboundFirewallRules.json @@ -0,0 +1,284 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}": { + "get": { + "tags": [ + "OutboundFirewallRules" + ], + "description": "Gets an outbound firewall rule.", + "operationId": "OutboundFirewallRules_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "outboundRuleFqdn", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified outbound firewall rule.", + "schema": { + "$ref": "#/definitions/OutboundFirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OutboundFirewallRulesNotAllowedOnSynapse - Outbound Firewall Rules are not allowed on SQL DB servers connected to Synapse\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets outbound firewall rule.": { + "$ref": "./examples/OutboundFirewallRuleGet.json" + } + } + }, + "put": { + "tags": [ + "OutboundFirewallRules" + ], + "description": "Create a outbound firewall rule with a given name.", + "operationId": "OutboundFirewallRules_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "outboundRuleFqdn", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/OutboundFirewallRule" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created outbound firewall rule.", + "schema": { + "$ref": "#/definitions/OutboundFirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OutboundFirewallRulesNotAllowedOnSynapse - Outbound Firewall Rules are not allowed on SQL DB servers connected to Synapse\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created outbound firewall rule.", + "schema": { + "$ref": "#/definitions/OutboundFirewallRule" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Approve or reject a outbound firewall rule with a given name.": { + "$ref": "./examples/OutboundFirewallRuleCreate.json" + } + } + }, + "delete": { + "tags": [ + "OutboundFirewallRules" + ], + "description": "Deletes a outbound firewall rule with a given name.", + "operationId": "OutboundFirewallRules_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "outboundRuleFqdn", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted outbound firewall rule." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OutboundFirewallRulesNotAllowedOnSynapse - Outbound Firewall Rules are not allowed on SQL DB servers connected to Synapse\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "Outbound firewall rule does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes a outbound firewall rule with a given name.": { + "$ref": "./examples/OutboundFirewallRuleDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules": { + "get": { + "tags": [ + "OutboundFirewallRules" + ], + "description": "Gets all outbound firewall rules on a server.", + "operationId": "OutboundFirewallRules_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved outbound firewall rules.", + "schema": { + "$ref": "#/definitions/OutboundFirewallRuleListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OutboundFirewallRulesNotAllowedOnSynapse - Outbound Firewall Rules are not allowed on SQL DB servers connected to Synapse\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of outbound firewall rules on a server.": { + "$ref": "./examples/OutboundFirewallRuleList.json" + } + } + } + } + }, + "definitions": { + "OutboundFirewallRuleProperties": { + "description": "The properties of an outbound firewall rule.", + "type": "object", + "properties": { + "provisioningState": { + "description": "The state of the outbound rule.", + "type": "string", + "readOnly": true + } + } + }, + "OutboundFirewallRule": { + "description": "An Azure SQL DB Server Outbound Firewall Rule.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/OutboundFirewallRuleProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "OutboundFirewallRuleListResult": { + "description": "A list of outbound rules.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/OutboundFirewallRule" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/PrivateEndpointConnections.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/PrivateEndpointConnections.json new file mode 100644 index 000000000000..2fef1d1201e4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/PrivateEndpointConnections.json @@ -0,0 +1,347 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets a private endpoint connection.", + "operationId": "PrivateEndpointConnections_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified private endpoint connection.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets private endpoint connection.": { + "$ref": "./examples/PrivateEndpointConnectionGet.json" + } + } + }, + "put": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Approve or reject a private endpoint connection with a given name.", + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully approved or rejected private endpoint connection.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 400 NetworkingSubscriptionNotRegisteredWithSqlRp - Subscription used for network-side Private Endpoint is not registered with SQL resource provider\n\n * 404 PrivateEndpointConnectionDroppedByOtherWorkflow - {0}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Approve or reject a private endpoint connection with a given name.": { + "$ref": "./examples/PrivateEndpointConnectionUpdate.json" + } + } + }, + "delete": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Deletes a private endpoint connection with a given name.", + "operationId": "PrivateEndpointConnections_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted private endpoint connection." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 NetworkingSubscriptionNotRegisteredWithSqlRp - Subscription used for network-side Private Endpoint is not registered with SQL resource provider\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 404 PrivateEndpointConnectionDroppedByOtherWorkflow - {0}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "Private endpoint connection does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes a private endpoint connection with a given name.": { + "$ref": "./examples/PrivateEndpointConnectionDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets all private endpoint connections on a server.", + "operationId": "PrivateEndpointConnections_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private endpoint connections.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of private endpoint connections on a server.": { + "$ref": "./examples/PrivateEndpointConnectionList.json" + } + } + } + } + }, + "definitions": { + "PrivateEndpointConnectionProperties": { + "description": "Properties of a private endpoint connection.", + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpointProperty", + "description": "Private endpoint which the connection belongs to." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionStateProperty", + "description": "Connection state of the private endpoint connection." + }, + "provisioningState": { + "description": "State of the private endpoint connection.", + "enum": [ + "Approving", + "Ready", + "Dropping", + "Failed", + "Rejecting" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PrivateEndpointProvisioningState", + "modelAsString": true + } + } + } + }, + "PrivateEndpointProperty": { + "type": "object", + "properties": { + "id": { + "description": "Resource id of the private endpoint.", + "type": "string" + } + }, + "x-ms-azure-resource": true + }, + "PrivateLinkServiceConnectionStateProperty": { + "required": [ + "status", + "description" + ], + "type": "object", + "properties": { + "status": { + "description": "The private link service connection status.", + "enum": [ + "Approved", + "Pending", + "Rejected", + "Disconnected" + ], + "type": "string", + "x-ms-enum": { + "name": "PrivateLinkServiceConnectionStateStatus", + "modelAsString": true + } + }, + "description": { + "description": "The private link service connection description.", + "type": "string" + }, + "actionsRequired": { + "description": "The actions required for private link service connection.", + "enum": [ + "None" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PrivateLinkServiceConnectionStateActionsRequire", + "modelAsString": true + } + } + } + }, + "PrivateEndpointConnection": { + "description": "A private endpoint connection", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "PrivateEndpointConnectionListResult": { + "description": "A list of private endpoint connections.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/PrivateLinkResources.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/PrivateLinkResources.json new file mode 100644 index 000000000000..372247bc5456 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/PrivateLinkResources.json @@ -0,0 +1,193 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "description": "Gets the private link resources for SQL server.", + "operationId": "PrivateLinkResources_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "#/definitions/PrivateLinkResourceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets private link resources for SQL.": { + "$ref": "./examples/PrivateLinkResourcesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources/{groupName}": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "description": "Gets a private link resource for SQL server.", + "operationId": "PrivateLinkResources_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "groupName", + "in": "path", + "description": "The name of the private link resource.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "#/definitions/PrivateLinkResource" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + } + }, + "x-ms-examples": { + "Gets a private link resource for SQL.": { + "$ref": "./examples/PrivateLinkResourcesGet.json" + } + } + } + } + }, + "definitions": { + "PrivateLinkResourceListResult": { + "description": "A list of private link resources", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "PrivateLinkResourceProperties": { + "description": "Properties of a private link resource.", + "type": "object", + "properties": { + "groupId": { + "description": "The private link resource group id.", + "type": "string", + "readOnly": true + }, + "requiredMembers": { + "description": "The private link resource required member names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "requiredZoneNames": { + "description": "The private link resource required zone names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + }, + "PrivateLinkResource": { + "description": "A private link resource", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/PrivateLinkResourceProperties", + "description": "The private link resource group id.", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RecoverableManagedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RecoverableManagedDatabases.json new file mode 100644 index 000000000000..199077d43d9a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RecoverableManagedDatabases.json @@ -0,0 +1,176 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases": { + "get": { + "tags": [ + "RecoverableManagedDatabases" + ], + "description": "Gets a list of recoverable managed databases.", + "operationId": "RecoverableManagedDatabases_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of recoverable managed databases.", + "schema": { + "$ref": "#/definitions/RecoverableManagedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List recoverable databases by managed instances": { + "$ref": "./examples/ListRecoverableManagedDatabasesByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases/{recoverableDatabaseName}": { + "get": { + "tags": [ + "RecoverableManagedDatabases" + ], + "description": "Gets a recoverable managed database.", + "operationId": "RecoverableManagedDatabases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "recoverableDatabaseName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified recoverable managed database.", + "schema": { + "$ref": "#/definitions/RecoverableManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Gets a recoverable databases by managed instances": { + "$ref": "./examples/GetRecoverableManagedDatabase.json" + } + } + } + } + }, + "definitions": { + "RecoverableManagedDatabaseListResult": { + "description": "A list of recoverable managed databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/RecoverableManagedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "RecoverableManagedDatabaseProperties": { + "description": "The recoverable managed database's properties.", + "type": "object", + "properties": { + "lastAvailableBackupDate": { + "description": "The last available backup date.", + "type": "string", + "readOnly": true + } + } + }, + "RecoverableManagedDatabase": { + "description": "A recoverable managed database resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RecoverableManagedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ReplicationLinks.json new file mode 100644 index 000000000000..fb5d96911be7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ReplicationLinks.json @@ -0,0 +1,288 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a list of replication links on database.", + "operationId": "ReplicationLinks_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the replication link.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database containing the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of replication links.", + "schema": { + "$ref": "#/definitions/ReplicationLinksListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List replication links on server on database.": { + "$ref": "./examples/ReplicationLinkListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{replicationLinkName}": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a replication link.", + "operationId": "ReplicationLinks_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the replication link.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database containing the replication link.", + "required": true, + "type": "string" + }, + { + "name": "replicationLinkName", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified replication link.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets the replication link.": { + "$ref": "./examples/ReplicationLinkGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a list of replication links.", + "operationId": "ReplicationLinks_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of replication links.", + "schema": { + "$ref": "#/definitions/ReplicationLinksListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List replication links on server": { + "$ref": "./examples/ReplicationLinkListByServer.json" + } + } + } + } + }, + "definitions": { + "ReplicationLinksListResult": { + "description": "A list of replication links.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ReplicationLink" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ReplicationLinkProperties": { + "description": "Properties of a replication link.", + "type": "object", + "properties": { + "partnerServer": { + "description": "Resource partner server.", + "type": "string", + "readOnly": true + }, + "partnerDatabase": { + "description": "Resource partner database.", + "type": "string", + "readOnly": true + }, + "partnerLocation": { + "description": "Resource partner location.", + "type": "string", + "readOnly": true + }, + "role": { + "description": "Local replication role.", + "type": "string", + "readOnly": true + }, + "partnerRole": { + "description": "Partner replication role.", + "type": "string", + "readOnly": true + }, + "replicationMode": { + "description": "Replication mode.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Time at which the link was created.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "Seeding completion percentage for the link.", + "type": "integer", + "readOnly": true + }, + "replicationState": { + "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", + "type": "string", + "readOnly": true + }, + "isTerminationAllowed": { + "description": "Whether the user is currently allowed to terminate the link.", + "type": "boolean", + "readOnly": true + }, + "linkType": { + "description": "Link type (GEO, NAMED).", + "type": "string", + "readOnly": true + } + } + }, + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedDatabases.json new file mode 100644 index 000000000000..cb1c28527d9a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedDatabases.json @@ -0,0 +1,234 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases": { + "get": { + "tags": [ + "RestorableDroppedDatabases" + ], + "description": "Gets a list of restorable dropped databases.", + "operationId": "RestorableDroppedDatabases_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of restorable dropped databases.", + "schema": { + "$ref": "#/definitions/RestorableDroppedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of restorable dropped databases.": { + "$ref": "./examples/ListRestorableDroppedDatabasesByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}": { + "get": { + "tags": [ + "RestorableDroppedDatabases" + ], + "description": "Gets a restorable dropped database.", + "operationId": "RestorableDroppedDatabases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified restorable dropped database.", + "schema": { + "$ref": "#/definitions/RestorableDroppedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a restorable dropped database.": { + "$ref": "./examples/GetRestorableDroppedDatabase.json" + } + } + } + } + }, + "definitions": { + "RestorableDroppedDatabaseListResult": { + "description": "A list of restorable dropped databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/RestorableDroppedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "RestorableDroppedDatabaseProperties": { + "description": "The restorable dropped database's properties.", + "type": "object", + "properties": { + "databaseName": { + "description": "The name of the database.", + "type": "string", + "readOnly": true + }, + "maxSizeBytes": { + "format": "int64", + "description": "The max size of the database expressed in bytes.", + "type": "integer", + "readOnly": true + }, + "elasticPoolId": { + "description": "DEPRECATED: The resource name of the elastic pool containing this database. This property is deprecated and the value will always be null.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The creation date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "deletionDate": { + "format": "date-time", + "description": "The deletion date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "earliestRestoreDate": { + "format": "date-time", + "description": "The earliest restore date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "backupStorageRedundancy": { + "description": "The storage account type used to store backups for this database.", + "enum": [ + "Geo", + "Local", + "Zone" + ], + "type": "string", + "readOnly": true + } + } + }, + "RestorableDroppedDatabase": { + "description": "A restorable dropped database resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU." + }, + "location": { + "description": "Resource location.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/RestorableDroppedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedManagedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedManagedDatabases.json new file mode 100644 index 000000000000..3d912f8b274c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedManagedDatabases.json @@ -0,0 +1,197 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases": { + "get": { + "tags": [ + "RestorableDroppedManagedDatabases" + ], + "description": "Gets a list of restorable dropped managed databases.", + "operationId": "RestorableDroppedManagedDatabases_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of restorable dropped databases.", + "schema": { + "$ref": "#/definitions/RestorableDroppedManagedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List restorable dropped databases by managed instances": { + "$ref": "./examples/RestorableDroppedManagedDatabaseListByManagedInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}": { + "get": { + "tags": [ + "RestorableDroppedManagedDatabases" + ], + "description": "Gets a restorable dropped managed database.", + "operationId": "RestorableDroppedManagedDatabases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified restorable dropped database.", + "schema": { + "$ref": "#/definitions/RestorableDroppedManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a restorable dropped managed database.": { + "$ref": "./examples/GetRestorableDroppedManagedDatabase.json" + } + } + } + } + }, + "definitions": { + "RestorableDroppedManagedDatabaseListResult": { + "description": "A list of restorable dropped managed databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/RestorableDroppedManagedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "RestorableDroppedManagedDatabaseProperties": { + "description": "The restorable dropped managed database's properties.", + "type": "object", + "properties": { + "databaseName": { + "description": "The name of the database.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The creation date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "deletionDate": { + "format": "date-time", + "description": "The deletion date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "earliestRestoreDate": { + "format": "date-time", + "description": "The earliest restore date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + } + } + }, + "RestorableDroppedManagedDatabase": { + "description": "A restorable dropped managed database resource.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RestorableDroppedManagedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorePoints.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorePoints.json new file mode 100644 index 000000000000..d86124091056 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/RestorePoints.json @@ -0,0 +1,343 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints": { + "get": { + "tags": [ + "RestorePoints" + ], + "description": "Gets a list of database restore points.", + "operationId": "RestorePoints_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully returned restore points.", + "schema": { + "$ref": "#/definitions/RestorePointListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BackupNotAllowedOnDeactivatedDatabase - Cannot create restore point on a deactivated database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 RestorePointLimitReached - A restore point cannot be created because database would exceed the allowed quota of restore points.\n\n * 400 RestorePointAttemptToDeleteSystemBackup - Cannot delete system restore point.\n\n * 404 DatabaseRestorePointNotFound - Can not find database restore point.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 408 DatabaseRestorePointTimedOut - Create database restore point failed." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database restore points.": { + "$ref": "./examples/DatabaseRestorePointsListByDatabase.json" + }, + "List datawarehouse database restore points.": { + "$ref": "./examples/DataWarehouseRestorePointsListByDatabase.json" + } + } + }, + "post": { + "tags": [ + "RestorePoints" + ], + "description": "Creates a restore point for a data warehouse.", + "operationId": "RestorePoints_Create", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The definition for creating the restore point of this database.", + "required": true, + "schema": { + "$ref": "#/definitions/CreateDatabaseRestorePointDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created the restore point request.", + "schema": { + "$ref": "#/definitions/RestorePoint" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BackupNotAllowedOnDeactivatedDatabase - Cannot create restore point on a deactivated database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 RestorePointLimitReached - A restore point cannot be created because database would exceed the allowed quota of restore points.\n\n * 400 RestorePointAttemptToDeleteSystemBackup - Cannot delete system restore point.\n\n * 404 DatabaseRestorePointNotFound - Can not find database restore point.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 408 DatabaseRestorePointTimedOut - Create database restore point failed." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the restore point request.", + "schema": { + "$ref": "#/definitions/RestorePoint" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates datawarehouse database restore point.": { + "$ref": "./examples/DatabaseRestorePointsPost.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}": { + "get": { + "tags": [ + "RestorePoints" + ], + "description": "Gets a restore point.", + "operationId": "RestorePoints_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "restorePointName", + "in": "path", + "description": "The name of the restore point.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully returned the restore point.", + "schema": { + "$ref": "#/definitions/RestorePoint" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BackupNotAllowedOnDeactivatedDatabase - Cannot create restore point on a deactivated database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 RestorePointLimitReached - A restore point cannot be created because database would exceed the allowed quota of restore points.\n\n * 400 RestorePointAttemptToDeleteSystemBackup - Cannot delete system restore point.\n\n * 404 DatabaseRestorePointNotFound - Can not find database restore point.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 408 DatabaseRestorePointTimedOut - Create database restore point failed." + } + }, + "x-ms-examples": { + "Gets a database restore point.": { + "$ref": "./examples/DatabaseRestorePointsGet.json" + }, + "Gets a datawarehouse database restore point.": { + "$ref": "./examples/DataWarehouseRestorePointsGet.json" + } + } + }, + "delete": { + "tags": [ + "RestorePoints" + ], + "description": "Deletes a restore point.", + "operationId": "RestorePoints_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "restorePointName", + "in": "path", + "description": "The name of the restore point.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the restore point." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BackupNotAllowedOnDeactivatedDatabase - Cannot create restore point on a deactivated database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 RestorePointLimitReached - A restore point cannot be created because database would exceed the allowed quota of restore points.\n\n * 400 RestorePointAttemptToDeleteSystemBackup - Cannot delete system restore point.\n\n * 404 DatabaseRestorePointNotFound - Can not find database restore point.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 408 DatabaseRestorePointTimedOut - Create database restore point failed." + } + }, + "x-ms-examples": { + "Deletes a restore point.": { + "$ref": "./examples/DatabaseRestorePointsDelete.json" + } + } + } + } + }, + "definitions": { + "RestorePointListResult": { + "description": "A list of long term retention backups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/RestorePoint" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "RestorePointProperties": { + "description": "Properties of a database restore point", + "type": "object", + "properties": { + "restorePointType": { + "description": "The type of restore point", + "enum": [ + "CONTINUOUS", + "DISCRETE" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RestorePointType", + "modelAsString": false + } + }, + "earliestRestoreDate": { + "format": "date-time", + "description": "The earliest time to which this database can be restored", + "type": "string", + "readOnly": true + }, + "restorePointCreationDate": { + "format": "date-time", + "description": "The time the backup was taken", + "type": "string", + "readOnly": true + }, + "restorePointLabel": { + "description": "The label of restore point for backup request by user", + "type": "string", + "readOnly": true + } + } + }, + "RestorePoint": { + "description": "Database restore points.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/RestorePointProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "CreateDatabaseRestorePointDefinition": { + "description": "Contains the information necessary to perform a create database restore point operation.", + "required": [ + "restorePointLabel" + ], + "type": "object", + "properties": { + "restorePointLabel": { + "description": "The restore point label to apply", + "type": "string" + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SensitivityLabels.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SensitivityLabels.json new file mode 100644 index 000000000000..140529203fb7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SensitivityLabels.json @@ -0,0 +1,884 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels": { + "get": { + "tags": [ + "SensitivityLabels" + ], + "description": "Gets the sensitivity labels of a given database", + "operationId": "SensitivityLabels_ListCurrentByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$count", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity labels.", + "schema": { + "$ref": "#/definitions/SensitivityLabelListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/SensitivityLabel", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the current sensitivity labels of a given database": { + "$ref": "./examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json" + } + } + }, + "patch": { + "tags": [ + "SensitivityLabels" + ], + "description": "Update sensitivity labels of a given database using an operations batch.", + "operationId": "SensitivityLabels_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SensitivityLabelUpdateList" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated sensitivity labels." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelsBatch - The specified sensitivity labels batch is not valid. Please provide batch operations\n\n * 400 SensitivityLabelsMissingSchema - Operation[{0}]: Missing schema information\n\n * 400 SensitivityLabelsMissingTable - Operation[{0}]: Missing table information\n\n * 400 SensitivityLabelsMissingColumn - Operation[{0}]: Missing column information\n\n * 400 SensitivityLabelsUpdateSameColumnMoreThanOnce - The column {0} can not be updated more than once in a single command\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Update sensitivity labels of a given database using an operations batch.": { + "$ref": "./examples/SensitivityLabelsCurrentUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels": { + "get": { + "tags": [ + "SensitivityLabels" + ], + "description": "Gets the sensitivity labels of a given database", + "operationId": "SensitivityLabels_ListRecommendedByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "includeDisabledRecommendations", + "in": "query", + "description": "Specifies whether to include disabled recommendations or not.", + "required": false, + "type": "boolean" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity labels.", + "schema": { + "$ref": "#/definitions/SensitivityLabelListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/SensitivityLabel", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the recommended sensitivity labels of a given database": { + "$ref": "./examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json" + } + } + }, + "patch": { + "tags": [ + "SensitivityLabels" + ], + "description": "Update recommended sensitivity labels states of a given database using an operations batch.", + "operationId": "RecommendedSensitivityLabels_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdateList" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated recommended sensitivity labels." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidRecommendedSensitivityLabelsBatch - The specified recommended sensitivity labels operations are not valid\n\n * 400 SensitivityLabelsMissingSchema - Operation[{0}]: Missing schema information\n\n * 400 SensitivityLabelsMissingTable - Operation[{0}]: Missing table information\n\n * 400 SensitivityLabelsMissingColumn - Operation[{0}]: Missing column information\n\n * 400 SensitivityLabelsUpdateSameColumnMoreThanOnce - The column {0} can not be updated more than once in a single command\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Update recommended sensitivity labels of a given database using an operations batch.": { + "$ref": "./examples/SensitivityLabelsRecommendedUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable": { + "post": { + "tags": [ + "SensitivityLabels" + ], + "description": "Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns)", + "operationId": "SensitivityLabels_EnableRecommendation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully enabled the sensitivity recommendations on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + } + }, + "x-ms-examples": { + "Enables sensitivity recommendations on a given column": { + "$ref": "./examples/RecommendedColumnSensitivityLabelEnable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable": { + "post": { + "tags": [ + "SensitivityLabels" + ], + "description": "Disables sensitivity recommendations on a given column", + "operationId": "SensitivityLabels_DisableRecommendation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled the sensitivity recommendation on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + } + }, + "x-ms-examples": { + "Disables sensitivity recommendations on a given column": { + "$ref": "./examples/RecommendedColumnSensitivityLabelDisable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}": { + "get": { + "tags": [ + "SensitivityLabels" + ], + "description": "Gets the sensitivity label of a given column", + "operationId": "SensitivityLabels_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current", + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + } + }, + "x-ms-examples": { + "Gets the sensitivity label of a given column": { + "$ref": "./examples/ColumnSensitivityLabelGet.json" + } + } + }, + "put": { + "tags": [ + "SensitivityLabels" + ], + "description": "Creates or updates the sensitivity label of a given column", + "operationId": "SensitivityLabels_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "WritableSensitivityLabelSource", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The column sensitivity label resource.", + "required": true, + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + }, + "201": { + "description": "Successfully created the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + } + }, + "x-ms-examples": { + "Updates the sensitivity label of a given column with all parameters": { + "$ref": "./examples/ColumnSensitivityLabelCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "SensitivityLabels" + ], + "description": "Deletes the sensitivity label of a given column", + "operationId": "SensitivityLabels_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "WritableSensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the sensitivity label." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + } + }, + "x-ms-examples": { + "Deletes the sensitivity label of a given column": { + "$ref": "./examples/ColumnSensitivityLabelDelete.json" + } + } + } + } + }, + "definitions": { + "SensitivityLabelProperties": { + "description": "Properties of a sensitivity label.", + "type": "object", + "properties": { + "schemaName": { + "description": "The schema name.", + "type": "string", + "readOnly": true + }, + "tableName": { + "description": "The table name.", + "type": "string", + "readOnly": true + }, + "columnName": { + "description": "The column name.", + "type": "string", + "readOnly": true + }, + "labelName": { + "description": "The label name.", + "type": "string" + }, + "labelId": { + "description": "The label ID.", + "type": "string" + }, + "informationType": { + "description": "The information type.", + "type": "string" + }, + "informationTypeId": { + "description": "The information type ID.", + "type": "string" + }, + "isDisabled": { + "description": "Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.", + "type": "boolean", + "readOnly": true + }, + "rank": { + "enum": [ + "None", + "Low", + "Medium", + "High", + "Critical" + ], + "type": "string", + "x-ms-enum": { + "name": "SensitivityLabelRank", + "modelAsString": false + } + } + } + }, + "SensitivityLabel": { + "description": "A sensitivity label.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "managedBy": { + "description": "Resource that manages the sensitivity label.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SensitivityLabelProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SensitivityLabelListResult": { + "description": "A list of sensitivity labels.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SensitivityLabel" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SensitivityLabelUpdateList": { + "description": "A list of sensitivity label update operations.", + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/SensitivityLabelUpdate" + } + } + } + }, + "SensitivityLabelUpdateProperties": { + "description": "Properties of an operation executed on a sensitivity label.", + "required": [ + "op", + "schema", + "table", + "column" + ], + "type": "object", + "properties": { + "op": { + "enum": [ + "set", + "remove" + ], + "type": "string", + "x-ms-enum": { + "name": "SensitivityLabelUpdateKind", + "modelAsString": false + } + }, + "schema": { + "description": "Schema name of the column to update.", + "type": "string" + }, + "table": { + "description": "Table name of the column to update.", + "type": "string" + }, + "column": { + "description": "Column name to update.", + "type": "string" + }, + "sensitivityLabel": { + "$ref": "#/definitions/SensitivityLabel", + "description": "The sensitivity label information to apply on a column." + } + } + }, + "SensitivityLabelUpdate": { + "description": "A sensitivity label update operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SensitivityLabelUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RecommendedSensitivityLabelUpdateList": { + "description": "A list of recommended sensitivity label update operations.", + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdate" + } + } + } + }, + "RecommendedSensitivityLabelUpdateProperties": { + "description": "Properties of an operation executed on a recommended sensitivity label.", + "required": [ + "op", + "schema", + "table", + "column" + ], + "type": "object", + "properties": { + "op": { + "enum": [ + "enable", + "disable" + ], + "type": "string", + "x-ms-enum": { + "name": "RecommendedSensitivityLabelUpdateKind", + "modelAsString": false + } + }, + "schema": { + "description": "Schema name of the column to update.", + "type": "string" + }, + "table": { + "description": "Table name of the column to update.", + "type": "string" + }, + "column": { + "description": "Column name to update.", + "type": "string" + } + } + }, + "RecommendedSensitivityLabelUpdate": { + "description": "A recommended sensitivity label update operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAdvisors.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAdvisors.json new file mode 100644 index 000000000000..5ae2156cc64b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAdvisors.json @@ -0,0 +1,646 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors": { + "get": { + "tags": [ + "ServerAdvisors" + ], + "description": "Gets a list of server advisors.", + "operationId": "ServerAdvisors_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of server advisors.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Advisor" + } + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "List of server advisors": { + "$ref": "./examples/ServerAdvisorList.json" + }, + "List of server recommended actions for all advisors": { + "$ref": "./examples/ServerRecommendedActionListExpand.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}": { + "get": { + "tags": [ + "ServerAdvisors" + ], + "description": "Gets a server advisor.", + "operationId": "ServerAdvisors_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Server Advisor.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved details of specified server advisor.", + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Get server advisor": { + "$ref": "./examples/ServerAdvisorGet.json" + } + } + }, + "patch": { + "tags": [ + "ServerAdvisors" + ], + "description": "Updates a server advisor.", + "operationId": "ServerAdvisors_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Server Advisor.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested advisor resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the specified server advisor.", + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 400 InvalidAdvisorUpsertRequest - The update advisor request body does not exist or has no properties object.\n\n * 400 InvalidAdvisorAutoExecuteStatus - Specified auto-execute status for the advisor is not allowed.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 AutomaticTuningOptionNotFound - The requested automatic tuning option was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 409 DefaultAdvisorStateNotAllowedInCustomServerMode - DEFAULT advisor state not allowed in CUSTOM mode\n\n * 409 UpdateNotAllowedIfServerAutotuningUpdateOperationInProgress - Automatic tuning settings from previous request have not propagated to all user databases.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Update server advisor": { + "$ref": "./examples/ServerAdvisorUpdate.json" + } + } + } + } + }, + "definitions": { + "AdvisorProperties": { + "description": "Properties for a Database, Server or Elastic Pool Advisor.", + "required": [ + "autoExecuteStatus" + ], + "type": "object", + "properties": { + "advisorStatus": { + "description": "Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'.", + "enum": [ + "GA", + "PublicPreview", + "LimitedPublicPreview", + "PrivatePreview" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AdvisorStatus", + "modelAsString": false + } + }, + "autoExecuteStatus": { + "description": "Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'", + "enum": [ + "Enabled", + "Disabled", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "AutoExecuteStatus", + "modelAsString": false + } + }, + "autoExecuteStatusInheritedFrom": { + "description": "Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level).", + "enum": [ + "Default", + "Subscription", + "Server", + "ElasticPool", + "Database" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutoExecuteStatusInheritedFrom", + "modelAsString": false + } + }, + "recommendationsStatus": { + "description": "Gets that status of recommendations for this advisor and reason for not having any recommendations. Possible values include, but are not limited to, 'Ok' (Recommendations available),LowActivity (not enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc.", + "type": "string", + "readOnly": true + }, + "lastChecked": { + "format": "date-time", + "description": "Gets the time when the current resource was analyzed for recommendations by this advisor.", + "type": "string", + "readOnly": true + }, + "recommendedActions": { + "description": "Gets the recommended actions for this advisor.", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedAction" + }, + "readOnly": true + } + } + }, + "RecommendedActionProperties": { + "description": "Properties for a Database, Server or Elastic Pool Recommended Action.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "recommendationReason": { + "description": "Gets the reason for recommending this action. e.g., DuplicateIndex", + "type": "string", + "readOnly": true + }, + "validSince": { + "format": "date-time", + "description": "Gets the time since when this recommended action is valid.", + "type": "string", + "readOnly": true + }, + "lastRefresh": { + "format": "date-time", + "description": "Gets time when this recommended action was last refreshed.", + "type": "string", + "readOnly": true + }, + "state": { + "$ref": "#/definitions/RecommendedActionStateInfo", + "description": "Gets the info of the current state the recommended action is in." + }, + "isExecutableAction": { + "description": "Gets if this recommended action is actionable by user", + "type": "boolean", + "readOnly": true + }, + "isRevertableAction": { + "description": "Gets if changes applied by this recommended action can be reverted by user", + "type": "boolean", + "readOnly": true + }, + "isArchivedAction": { + "description": "Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a new recommended action again.", + "type": "boolean", + "readOnly": true + }, + "executeActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started applying this recommended action on the user resource. e.g., index creation start time", + "type": "string", + "readOnly": true + }, + "executeActionDuration": { + "description": "Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation", + "type": "string", + "readOnly": true + }, + "revertActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started reverting changes of this recommended action on user resource. e.g., time when index drop is executed.", + "type": "string", + "readOnly": true + }, + "revertActionDuration": { + "description": "Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for dropping the created index.", + "type": "string", + "readOnly": true + }, + "executeActionInitiatedBy": { + "description": "Gets if approval for applying this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "executeActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for execution.", + "type": "string", + "readOnly": true + }, + "revertActionInitiatedBy": { + "description": "Gets if approval for reverting this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "revertActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for revert.", + "type": "string", + "readOnly": true + }, + "score": { + "format": "int32", + "description": "Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High Impact", + "type": "integer", + "readOnly": true + }, + "implementationDetails": { + "$ref": "#/definitions/RecommendedActionImplementationInfo", + "description": "Gets the implementation details of this recommended action for user to apply it manually.", + "readOnly": true + }, + "errorDetails": { + "$ref": "#/definitions/RecommendedActionErrorInfo", + "description": "Gets the error details if and why this recommended action is put to error state.", + "readOnly": true + }, + "estimatedImpact": { + "description": "Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "observedImpact": { + "description": "Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "timeSeries": { + "description": "Gets the time series info of metrics for this recommended action e.g., CPU consumption time series", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionMetricInfo" + }, + "readOnly": true + }, + "linkedObjects": { + "description": "Gets the linked objects, if any.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "details": { + "description": "Gets additional details specific to this recommended action.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true + } + } + }, + "RecommendedActionStateInfo": { + "description": "Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "required": [ + "currentValue" + ], + "type": "object", + "properties": { + "currentValue": { + "description": "Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action. ", + "enum": [ + "Active", + "Pending", + "Executing", + "Verifying", + "PendingRevert", + "RevertCancelled", + "Reverting", + "Reverted", + "Ignored", + "Expired", + "Monitoring", + "Resolved", + "Success", + "Error" + ], + "type": "string", + "x-ms-enum": { + "name": "RecommendedActionCurrentState", + "modelAsString": true + } + }, + "actionInitiatedBy": { + "description": "Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity notified system to apply the recommended action. System -> When auto-execute status of this advisor was set to 'Enabled', in which case the system applied it.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "lastModified": { + "format": "date-time", + "description": "Gets the time when the state was last modified", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionImplementationInfo": { + "description": "Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "method": { + "description": "Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell.", + "enum": [ + "TSql", + "AzurePowerShell" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ImplementationMethod", + "modelAsString": false + } + }, + "script": { + "description": "Gets the manual implementation script. e.g., T-SQL script that could be executed on the database.", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionErrorInfo": { + "description": "Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "errorCode": { + "description": "Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists", + "type": "string", + "readOnly": true + }, + "isRetryable": { + "description": "Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No", + "enum": [ + "Yes", + "No" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "IsRetryable", + "modelAsString": false + } + } + } + }, + "RecommendedActionImpactRecord": { + "description": "Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "dimensionName": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "absoluteValue": { + "format": "double", + "description": "Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected", + "type": "number", + "readOnly": true + }, + "changeValueAbsolute": { + "format": "double", + "description": "Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes", + "type": "number", + "readOnly": true + }, + "changeValueRelative": { + "format": "double", + "description": "Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedActionMetricInfo": { + "description": "Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "metricName": { + "description": "Gets the name of the metric. e.g., CPU, Number of Queries.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the unit in which metric is measured. e.g., DTU, Frequency", + "type": "string", + "readOnly": true + }, + "timeGrain": { + "description": "Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour)", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Gets the start time of time interval given by this MetricInfo.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "double", + "description": "Gets the value of the metric in the time interval given by this MetricInfo.", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedAction": { + "description": "Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/RecommendedActionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "Advisor": { + "description": "Database, Server or Elastic Pool Advisor.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/AdvisorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAutomaticTuning.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAutomaticTuning.json new file mode 100644 index 000000000000..dadf5df2d6be --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAutomaticTuning.json @@ -0,0 +1,239 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current": { + "get": { + "tags": [ + "ServerAutomaticTuning" + ], + "description": "Retrieves server automatic tuning options.", + "operationId": "ServerAutomaticTuning_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved server automatic tuning properties.", + "schema": { + "$ref": "#/definitions/ServerAutomaticTuning" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Get a server's automatic tuning settings": { + "$ref": "./examples/ServerAutomaticTuningGet.json" + } + } + }, + "patch": { + "tags": [ + "ServerAutomaticTuning" + ], + "description": "Update automatic tuning options on server.", + "operationId": "ServerAutomaticTuning_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested automatic tuning resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAutomaticTuning" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server-level automatic tuning options.", + "schema": { + "$ref": "#/definitions/ServerAutomaticTuning" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidAutomaticTuningUpsertRequest - The update automatic tuning request body does not exist or has no properties object.\n\n * 400 InvalidAdvisorAutoExecuteStatus - Specified auto-execute status for the advisor is not allowed.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 AutomaticTuningOptionNotFound - The requested automatic tuning option was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 DefaultAdvisorStateNotAllowedInCustomServerMode - DEFAULT advisor state not allowed in CUSTOM mode\n\n * 409 UpdateNotAllowedIfServerAutotuningUpdateOperationInProgress - Automatic tuning settings from previous request have not propagated to all user databases.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Updates server automatic tuning settings with minimal properties": { + "$ref": "./examples/ServerAutomaticTuningUpdateMin.json" + }, + "Updates server automatic tuning settings with all properties": { + "$ref": "./examples/ServerAutomaticTuningUpdateMax.json" + } + } + } + } + }, + "definitions": { + "AutomaticTuningServerProperties": { + "description": "Server-level Automatic Tuning properties.", + "type": "object", + "properties": { + "desiredState": { + "description": "Automatic tuning desired state.", + "enum": [ + "Custom", + "Auto", + "Unspecified" + ], + "type": "string", + "x-ms-enum": { + "name": "AutomaticTuningServerMode", + "modelAsString": false + } + }, + "actualState": { + "description": "Automatic tuning actual state.", + "enum": [ + "Custom", + "Auto", + "Unspecified" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningServerMode", + "modelAsString": false + } + }, + "options": { + "description": "Automatic tuning options definition.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AutomaticTuningServerOptions" + } + } + } + }, + "AutomaticTuningServerOptions": { + "description": "Automatic tuning properties for individual advisors.", + "type": "object", + "properties": { + "desiredState": { + "description": "Automatic tuning option desired state.", + "enum": [ + "Off", + "On", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "AutomaticTuningOptionModeDesired", + "modelAsString": false + } + }, + "actualState": { + "description": "Automatic tuning option actual state.", + "enum": [ + "Off", + "On" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningOptionModeActual", + "modelAsString": false + } + }, + "reasonCode": { + "format": "int32", + "description": "Reason code if desired and actual state are different.", + "type": "integer", + "readOnly": true + }, + "reasonDesc": { + "description": "Reason description if desired and actual state are different.", + "enum": [ + "Default", + "Disabled", + "AutoConfigured" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningServerReason", + "modelAsString": false + } + } + } + }, + "ServerAutomaticTuning": { + "description": "Server-level Automatic Tuning.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/AutomaticTuningServerProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAzureADAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAzureADAdministrators.json new file mode 100644 index 000000000000..fbb5fcdeedd2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAzureADAdministrators.json @@ -0,0 +1,339 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}": { + "get": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Gets a Azure Active Directory administrator.", + "operationId": "ServerAzureADAdministrators_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "description": "The name of server active directory administrator.", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified Azure Active Directory administrator.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAdministratorTypePropertyName - Server active directory administrator type should be ActiveDirectory\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorGet.json" + } + } + }, + "put": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Creates or updates an existing Azure Active Directory administrator.", + "operationId": "ServerAzureADAdministrators_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "description": "The name of server active directory administrator.", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested Azure Active Directory administrator Resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated a Azure Active Directory administrator.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAdministratorTypePropertyName - Server active directory administrator type should be ActiveDirectory\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 400 ServerAdministratorNameAlreadyExists - User tried to set the external admin and the principal name already exists in the 'master' database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created a Azure Active Directory administrator.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates an existing Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Deletes the Azure Active Directory administrator with the given name.", + "operationId": "ServerAzureADAdministrators_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "description": "The name of server active directory administrator.", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the Azure Active Directory administrator." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAdministratorTypePropertyName - Server active directory administrator type should be ActiveDirectory\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified Azure Active Directory administrator does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators": { + "get": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Gets a list of Azure Active Directory administrators in a server.", + "operationId": "ServerAzureADAdministrators_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of Azure Active Directory administrators.", + "schema": { + "$ref": "#/definitions/AdministratorListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAdministratorTypePropertyName - Server active directory administrator type should be ActiveDirectory\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorList.json" + } + } + } + } + }, + "definitions": { + "AdministratorProperties": { + "description": "Properties of a active directory administrator.", + "required": [ + "administratorType", + "login", + "sid" + ], + "type": "object", + "properties": { + "administratorType": { + "description": "Type of the sever administrator.", + "enum": [ + "ActiveDirectory" + ], + "type": "string", + "x-ms-enum": { + "name": "AdministratorType", + "modelAsString": true + } + }, + "login": { + "description": "Login name of the server administrator.", + "type": "string" + }, + "sid": { + "format": "uuid", + "description": "SID (object ID) of the server administrator.", + "type": "string" + }, + "tenantId": { + "format": "uuid", + "description": "Tenant ID of the administrator.", + "type": "string" + }, + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean", + "readOnly": true + } + } + }, + "ServerAzureADAdministrator": { + "description": "Azure Active Directory administrator.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/AdministratorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "AdministratorListResult": { + "description": "A list of active directory administrators.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerAzureADAdministrator" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAzureADOnlyAuthentications.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAzureADOnlyAuthentications.json new file mode 100644 index 000000000000..ee79321fd8d8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerAzureADOnlyAuthentications.json @@ -0,0 +1,311 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}": { + "get": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Gets a specific Azure Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified Azure Active Directory only authentication properties.", + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAADOnlyAuthTypePropertyName - Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a Azure Active Directory only authentication property.": { + "$ref": "./examples/AzureADOnlyAuthGet.json" + } + } + }, + "put": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Sets Server Active Directory only authentication property or updates an existing server Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating an Active Directory only authentication property.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated a Azure Active Directory only authentication property.", + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAADOnlyAuthTypePropertyName - Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully updated Azure Active Directory only authentication property.", + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Deletes an existing server Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the Azure Active Directory only property." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAADOnlyAuthTypePropertyName - Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified Azure Active Directory only property does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications": { + "get": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Gets a list of server Azure Active Directory only authentications.", + "operationId": "ServerAzureADOnlyAuthentications_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of Azure Active Directory only authentication objects.", + "schema": { + "$ref": "#/definitions/AzureADOnlyAuthListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthList.json" + } + } + } + } + }, + "definitions": { + "AzureADOnlyAuthProperties": { + "description": "Properties of a active directory only authentication.", + "required": [ + "azureADOnlyAuthentication" + ], + "type": "object", + "properties": { + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean" + } + } + }, + "ServerAzureADOnlyAuthentication": { + "description": "Azure Active Directory only authentication.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/AzureADOnlyAuthProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "AzureADOnlyAuthListResult": { + "description": "A list of active directory only authentications.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerDevOpsAudit.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerDevOpsAudit.json new file mode 100644 index 000000000000..98f5516437e5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerDevOpsAudit.json @@ -0,0 +1,277 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}": { + "get": { + "tags": [ + "ServerDevOpsAudit" + ], + "description": "Gets a server's DevOps audit settings.", + "operationId": "ServerDevOpsAuditSettings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "devOpsAuditingSettingsName", + "in": "path", + "description": "The name of the devops audit settings. This should always be 'default'.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server DevOps audit settings.", + "schema": { + "$ref": "#/definitions/ServerDevOpsAuditingSettings" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get a server's DevOps audit settings": { + "$ref": "./examples/ServerDevOpsAuditGet.json" + } + } + }, + "put": { + "tags": [ + "ServerDevOpsAudit" + ], + "description": "Creates or updates a server's DevOps audit settings.", + "operationId": "ServerDevOpsAuditSettings_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "devOpsAuditingSettingsName", + "in": "path", + "description": "The name of the devops audit settings. This should always be 'default'.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "Properties of DevOps audit settings", + "required": true, + "schema": { + "$ref": "#/definitions/ServerDevOpsAuditingSettings" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the DevOps audit settings.", + "schema": { + "$ref": "#/definitions/ServerDevOpsAuditingSettings" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerDevOpsAuditSettingsCreateRequest - The create server DevOps audit policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidServerDevOpsAuditSettingsName - Invalid server DevOps policy name.\n\n * 400 DevOpsAuditInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ServerDevOpsAuditSettingsInProgress - Set server DevOps audit is already in progress." + }, + "202": { + "description": "Updating the audit DevOps settings is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update a server's DevOps audit settings with minimal input": { + "$ref": "./examples/ServerDevOpsAuditCreateMin.json" + }, + "Update a server's DevOps audit settings with all params": { + "$ref": "./examples/ServerDevOpsAuditCreateMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings": { + "get": { + "tags": [ + "ServerDevOpsAudit" + ], + "description": "Lists DevOps audit settings of a server.", + "operationId": "ServerDevOpsAuditSettings_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved server DevOps audit settings.", + "schema": { + "$ref": "#/definitions/ServerDevOpsAuditSettingsListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List DevOps audit settings of a server": { + "$ref": "./examples/ServerDevOpsAuditSettingsList.json" + } + } + } + } + }, + "definitions": { + "ServerDevOpsAuditSettingsProperties": { + "description": "Properties of a server DevOps audit settings.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "isAzureMonitorTargetEnabled": { + "description": "Specifies whether DevOps audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should be also created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "state": { + "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "BlobAuditingPolicyState", + "modelAsString": false + } + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountSubscriptionId": { + "format": "uuid", + "description": "Specifies the blob storage subscription Id.", + "type": "string" + } + } + }, + "ServerDevOpsAuditingSettings": { + "description": "A server DevOps auditing settings.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of ServerDevOpsAuditSettingsResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ServerDevOpsAuditSettingsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerDevOpsAuditSettingsListResult": { + "description": "A list of server DevOps audit settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerDevOpsAuditingSettings" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerDnsAliases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerDnsAliases.json new file mode 100644 index 000000000000..9509a07f76c2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerDnsAliases.json @@ -0,0 +1,361 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}": { + "get": { + "tags": [ + "ServerDnsAliases" + ], + "description": "Gets a server DNS alias.", + "operationId": "ServerDnsAliases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server that the alias is pointing to.", + "required": true, + "type": "string" + }, + { + "name": "dnsAliasName", + "in": "path", + "description": "The name of the server dns alias.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified server DNS alias.", + "schema": { + "$ref": "#/definitions/ServerDnsAlias" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Get server DNS alias": { + "$ref": "./examples/ServerDnsAliasGet.json" + } + } + }, + "put": { + "tags": [ + "ServerDnsAliases" + ], + "description": "Creates a server DNS alias.", + "operationId": "ServerDnsAliases_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server that the alias is pointing to.", + "required": true, + "type": "string" + }, + { + "name": "dnsAliasName", + "in": "path", + "description": "The name of the server dns alias.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The server DNS alias already exists.", + "schema": { + "$ref": "#/definitions/ServerDnsAlias" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created a server DNS alias.", + "schema": { + "$ref": "#/definitions/ServerDnsAlias" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create server DNS alias": { + "$ref": "./examples/ServerDnsAliasCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ServerDnsAliases" + ], + "description": "Deletes the server DNS alias with the given name.", + "operationId": "ServerDnsAliases_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server that the alias is pointing to.", + "required": true, + "type": "string" + }, + { + "name": "dnsAliasName", + "in": "path", + "description": "The name of the server dns alias.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the server DNS alias." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified server DNS alias does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete server DNS alias": { + "$ref": "./examples/ServerDnsAliasDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases": { + "get": { + "tags": [ + "ServerDnsAliases" + ], + "description": "Gets a list of server DNS aliases for a server.", + "operationId": "ServerDnsAliases_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server that the alias is pointing to.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of server DNS aliases.", + "schema": { + "$ref": "#/definitions/ServerDnsAliasListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List server DNS aliases": { + "$ref": "./examples/ServerDnsAliasList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}/acquire": { + "post": { + "tags": [ + "ServerDnsAliases" + ], + "description": "Acquires server DNS alias from another server.", + "operationId": "ServerDnsAliases_Acquire", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server that the alias is pointing to.", + "required": true, + "type": "string" + }, + { + "name": "dnsAliasName", + "in": "path", + "description": "The name of the server dns alias.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServerDnsAliasAcquisition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully acquired server DNS alias.", + "schema": { + "$ref": "#/definitions/ServerDnsAlias" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Acquire server DNS alias": { + "$ref": "./examples/ServerDnsAliasAcquire.json" + } + } + } + } + }, + "definitions": { + "ServerDnsAliasProperties": { + "description": "Properties of a server DNS alias.", + "type": "object", + "properties": { + "azureDnsRecord": { + "description": "The fully qualified DNS record for alias", + "type": "string", + "readOnly": true + } + } + }, + "ServerDnsAlias": { + "description": "A server DNS alias.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerDnsAliasProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerDnsAliasListResult": { + "description": "A list of server DNS aliases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerDnsAlias" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerDnsAliasAcquisition": { + "description": "A server dns alias acquisition request.", + "required": [ + "oldServerDnsAliasId" + ], + "type": "object", + "properties": { + "oldServerDnsAliasId": { + "description": "The id of the server alias that will be acquired to point to this server instead.", + "type": "string" + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerKeys.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerKeys.json new file mode 100644 index 000000000000..5caad3fb5ba3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerKeys.json @@ -0,0 +1,339 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys": { + "get": { + "tags": [ + "ServerKeys" + ], + "description": "Gets a list of server keys.", + "operationId": "ServerKeys_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of server keys.", + "schema": { + "$ref": "#/definitions/ServerKeyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the server keys by server": { + "$ref": "./examples/ServerKeyList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}": { + "get": { + "tags": [ + "ServerKeys" + ], + "description": "Gets a server key.", + "operationId": "ServerKeys_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the server key to be retrieved.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified server key.", + "schema": { + "$ref": "#/definitions/ServerKey" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the server key": { + "$ref": "./examples/ServerKeyGet.json" + } + } + }, + "put": { + "tags": [ + "ServerKeys" + ], + "description": "Creates or updates a server key.", + "operationId": "ServerKeys_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the server key to be operated on (updated or created). The key name is required to be in the format of 'vault_key_version'. For example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be formatted as: YourVaultName_YourKeyName_YourKeyVersion", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested server key resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerKey" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server key.", + "schema": { + "$ref": "#/definitions/ServerKey" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information ." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the server key.", + "schema": { + "$ref": "#/definitions/ServerKey" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates a server key": { + "$ref": "./examples/ServerKeyCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ServerKeys" + ], + "description": "Deletes the server key with the given name.", + "operationId": "ServerKeys_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the server key to be deleted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the server key." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information ." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified server key does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the server key": { + "$ref": "./examples/ServerKeyDelete.json" + } + } + } + } + }, + "definitions": { + "ServerKeyListResult": { + "description": "A list of server keys.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerKey" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerKeyProperties": { + "description": "Properties for a server key execution.", + "required": [ + "serverKeyType" + ], + "type": "object", + "properties": { + "subregion": { + "description": "Subregion of the server key.", + "type": "string", + "readOnly": true + }, + "serverKeyType": { + "description": "The server key type like 'ServiceManaged', 'AzureKeyVault'.", + "enum": [ + "ServiceManaged", + "AzureKeyVault" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "uri": { + "description": "The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "thumbprint": { + "description": "Thumbprint of the server key.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The server key creation date.", + "type": "string", + "readOnly": true + }, + "autoRotationEnabled": { + "description": "Key auto rotation opt-in flag. Either true or false.", + "type": "boolean", + "readOnly": true + } + } + }, + "ServerKey": { + "description": "A server key.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Kind of encryption protector. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ServerKeyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerOperations.json new file mode 100644 index 000000000000..ee22b61ef1e2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerOperations.json @@ -0,0 +1,208 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/operations": { + "get": { + "tags": [ + "ServerOperations" + ], + "description": "Gets a list of operations performed on the server.", + "operationId": "ServerOperations_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for getting server operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/ServerOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PECsNotExistingToDenyPublicNetworkAccess - Unable to set Deny Public Network Access to Yes since there is no private endpoint enabled to access the server. Please set up private endpoints and retry the operation (https://docs.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database).\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 UpsertLogicalServerRequestAlreadyInProgress - An ongoing logical server request is already in progress, please try your request again later.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 DropLogicalServerAlreadyInProgress - Server is already being dropped.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the server management operations": { + "$ref": "./examples/ListServerOperations.json" + } + } + } + } + }, + "definitions": { + "ServerOperationListResult": { + "description": "The response to a list server operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerOperationProperties": { + "description": "The properties of a server operation.", + "type": "object", + "properties": { + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "serverName": { + "description": "The name of the server.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagementOperationState", + "modelAsString": true + } + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + } + } + }, + "ServerOperation": { + "description": "A server operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerSecurityAlertPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerSecurityAlertPolicies.json new file mode 100644 index 000000000000..9c3a7455c0a3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerSecurityAlertPolicies.json @@ -0,0 +1,303 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}": { + "get": { + "tags": [ + "ServerSecurityAlertPolicies" + ], + "description": "Get a server's security alert policy.", + "operationId": "ServerSecurityAlertPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server threat detection policy.", + "schema": { + "$ref": "#/definitions/ServerSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-examples": { + "Get a server's threat detection policy": { + "$ref": "./examples/ServerSecurityAlertsGet.json" + } + } + }, + "put": { + "tags": [ + "ServerSecurityAlertPolicies" + ], + "description": "Creates or updates a threat detection policy.", + "operationId": "ServerSecurityAlertPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the threat detection policy.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The server security alert policy.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerSecurityAlertPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the threat detection policy.", + "schema": { + "$ref": "#/definitions/ServerSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later" + }, + "202": { + "description": "Created request to set the server threat detection policy." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a server's threat detection policy with minimal parameters": { + "$ref": "./examples/ServerSecurityAlertsCreateMin.json" + }, + "Update a server's threat detection policy with all parameters": { + "$ref": "./examples/ServerSecurityAlertsCreateMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies": { + "get": { + "tags": [ + "ServerSecurityAlertPolicies" + ], + "description": "Get the server's threat detection policies.", + "operationId": "ServerSecurityAlertPolicies_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server threat detection policies.", + "schema": { + "$ref": "#/definitions/LogicalServerSecurityAlertPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the server's threat detection policies": { + "$ref": "./examples/ServerSecurityAlertsListByServer.json" + } + } + } + } + }, + "definitions": { + "SecurityAlertsPolicyProperties": { + "description": "Properties of a security alert policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SecurityAlertsPolicyState", + "modelAsString": false + } + }, + "disabledAlerts": { + "description": "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAddresses": { + "description": "Specifies an array of e-mail addresses to which the alert is sent.", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAccountAdmins": { + "description": "Specifies that the alert is sent to the account administrators.", + "type": "boolean" + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the Threat Detection audit storage account.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the Threat Detection audit logs.", + "type": "integer" + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "ServerSecurityAlertPolicy": { + "description": "A server security alert policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SecurityAlertPolicyResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SecurityAlertsPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "LogicalServerSecurityAlertPolicyListResult": { + "description": "A list of the server's security alert policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerSecurityAlertPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerTrustGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerTrustGroups.json new file mode 100644 index 000000000000..76e32f63e18b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerTrustGroups.json @@ -0,0 +1,376 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}": { + "get": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Gets a server trust group.", + "operationId": "ServerTrustGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "serverTrustGroupName", + "in": "path", + "description": "The name of the server trust group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the the specified server trust group.", + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get server trust group": { + "$ref": "./examples/ServerTrustGroupGet.json" + } + } + }, + "put": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Creates or updates a server trust group.", + "operationId": "ServerTrustGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "serverTrustGroupName", + "in": "path", + "description": "The name of the server trust group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The server trust group parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server trust group.", + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ServerTrustGroupCreateRequestInvalid - The resource or resource properties in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembers - The group members property in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembersCount - The group members property has an invalid number of servers\n\n * 400 ServerTrustGroupCreateRequestInvalidServer - The given serverId field in create server trust group request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestDuplicateServer - One or more of the provided servers are duplicates.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopes - The trust scope property in the request body is empty or invalid.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopesValue - The trust scope property in the request body has an invalid value.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the server trust group.", + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create server trust group": { + "$ref": "./examples/ServerTrustGroupCreate.json" + } + } + }, + "delete": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Deletes a server trust group.", + "operationId": "ServerTrustGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "serverTrustGroupName", + "in": "path", + "description": "The name of the server trust group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the server trust group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ServerTrustGroupCreateRequestInvalid - The resource or resource properties in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembers - The group members property in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembersCount - The group members property has an invalid number of servers\n\n * 400 ServerTrustGroupCreateRequestInvalidServer - The given serverId field in create server trust group request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestDuplicateServer - One or more of the provided servers are duplicates.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopes - The trust scope property in the request body is empty or invalid.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopesValue - The trust scope property in the request body has an invalid value.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified server trust group does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Drop server trust group": { + "$ref": "./examples/ServerTrustGroupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups": { + "get": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Lists a server trust group.", + "operationId": "ServerTrustGroups_ListByLocation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server trust groups.", + "schema": { + "$ref": "#/definitions/ServerTrustGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List server trust groups": { + "$ref": "./examples/ServerTrustGroupList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups": { + "get": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Gets a server trust groups by instance name.", + "operationId": "ServerTrustGroups_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server trust groups.", + "schema": { + "$ref": "#/definitions/ServerTrustGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List server trust groups by managed instance": { + "$ref": "./examples/ServerTrustGroupListByManagedInstance.json" + } + } + } + } + }, + "definitions": { + "ServerTrustGroupProperties": { + "description": "Properties of a server trust group.", + "required": [ + "groupMembers", + "trustScopes" + ], + "type": "object", + "properties": { + "groupMembers": { + "description": "Group members information for the server trust group.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerInfo" + } + }, + "trustScopes": { + "description": "Trust scope of the server trust group.", + "type": "array", + "items": { + "enum": [ + "GlobalTransactions", + "ServiceBroker" + ], + "type": "string" + } + } + } + }, + "ServerInfo": { + "description": "Server info for the server trust group.", + "required": [ + "serverId" + ], + "type": "object", + "properties": { + "serverId": { + "description": "Server Id.", + "type": "string" + } + } + }, + "ServerTrustGroup": { + "description": "A server trust group.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerTrustGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerTrustGroupListResult": { + "description": "A list of server trust groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerTrustGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerVulnerabilityAssessments.json new file mode 100644 index 000000000000..16791f54359c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ServerVulnerabilityAssessments.json @@ -0,0 +1,364 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "ServerVulnerabilityAssessments" + ], + "description": "Gets the server's vulnerability assessment.", + "operationId": "ServerVulnerabilityAssessments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Get a server's vulnerability assessment": { + "$ref": "./examples/ServerVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "ServerVulnerabilityAssessments" + ], + "description": "Creates or updates the server's vulnerability assessment.", + "operationId": "ServerVulnerabilityAssessments_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + }, + "201": { + "description": "Successfully created the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a server's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified": { + "$ref": "./examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json" + }, + "Create a server's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified": { + "$ref": "./examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json" + }, + "Create a server's vulnerability assessment with all parameters": { + "$ref": "./examples/ServerVulnerabilityAssessmentCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "ServerVulnerabilityAssessments" + ], + "description": "Removes the server's vulnerability assessment.", + "operationId": "ServerVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the server vulnerability assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Remove a server's vulnerability assessment": { + "$ref": "./examples/ServerVulnerabilityAssessmentDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments": { + "get": { + "tags": [ + "ServerVulnerabilityAssessments" + ], + "description": "Lists the vulnerability assessment policies associated with a server.", + "operationId": "ServerVulnerabilityAssessments_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server vulnerability assessment policies.", + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of allowed FQDNs. The outbound firewall rules will block the request.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a server's vulnerability assessment policies": { + "$ref": "./examples/ServerVulnerabilityAssessmentListByServer.json" + } + } + } + } + }, + "definitions": { + "ServerVulnerabilityAssessmentProperties": { + "description": "Properties of a server Vulnerability Assessment.", + "required": [ + "storageContainerPath" + ], + "type": "object", + "properties": { + "storageContainerPath": { + "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageContainerSasKey": { + "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "recurringScans": { + "$ref": "#/definitions/VulnerabilityAssessmentRecurringScansProperties", + "description": "The recurring scans settings" + } + } + }, + "VulnerabilityAssessmentRecurringScansProperties": { + "description": "Properties of a Vulnerability Assessment recurring scans.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Recurring scans state.", + "type": "boolean" + }, + "emailSubscriptionAdmins": { + "description": "Specifies that the schedule scan notification will be is sent to the subscription administrators.", + "default": true, + "type": "boolean" + }, + "emails": { + "description": "Specifies an array of e-mail addresses to which the scan notification is sent.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ServerVulnerabilityAssessment": { + "description": "A server vulnerability assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerVulnerabilityAssessmentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerVulnerabilityAssessmentListResult": { + "description": "A list of the server's vulnerability assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Servers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Servers.json new file mode 100644 index 000000000000..a54f852ae472 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Servers.json @@ -0,0 +1,1087 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers": { + "get": { + "tags": [ + "Servers" + ], + "description": "Gets a list of servers in a resource groups.", + "operationId": "Servers_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of servers.", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List servers by resource group": { + "$ref": "./examples/ServerListByResourceGroup.json" + }, + "List servers by resource group with $expand=administrators": { + "$ref": "./examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}": { + "get": { + "tags": [ + "Servers" + ], + "description": "Gets a server.", + "operationId": "Servers_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified server.", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get server": { + "$ref": "./examples/ServerGet.json" + }, + "Get server with $expand=administrators": { + "$ref": "./examples/ServerGetWithExpandEqualsAdministrators.json" + } + } + }, + "put": { + "tags": [ + "Servers" + ], + "description": "Creates or updates a server.", + "operationId": "Servers_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested server resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/Server" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server.", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PECsNotExistingToDenyPublicNetworkAccess - Unable to set Deny Public Network Access to Yes since there is no private endpoint enabled to access the server. Please set up private endpoints and retry the operation (https://docs.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database).\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidExternalAdministratorLogin - Invalid or missing external administrator login name.\n\n * 400 InvalidExternalAdministratorSid - Invalid or missing external administrator object id.\n\n * 400 InvalidExternalAdministratorTenantId - Invalid or missing external administrator tenant id.\n\n * 400 ExternalAdministratorPrincipalType - Invalid or missing external administrator principal type. Please select from User, Application or Group.\n\n * 400 MissingExternalAdministratorWithAadOnlyAuth - In order to use Azure AD Only Authentication, please provide details of an external administrator.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 UpsertLogicalServerRequestAlreadyInProgress - An ongoing logical server request is already in progress, please try your request again later.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the server.", + "schema": { + "$ref": "#/definitions/Server" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create server": { + "$ref": "./examples/ServerCreate.json" + } + } + }, + "delete": { + "tags": [ + "Servers" + ], + "description": "Deletes a server.", + "operationId": "Servers_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the server." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 DropLogicalServerAlreadyInProgress - Server is already being dropped.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified server does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete server": { + "$ref": "./examples/ServerDelete.json" + } + } + }, + "patch": { + "tags": [ + "Servers" + ], + "description": "Updates a server.", + "operationId": "Servers_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested server resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server.", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PECsNotExistingToDenyPublicNetworkAccess - Unable to set Deny Public Network Access to Yes since there is no private endpoint enabled to access the server. Please set up private endpoints and retry the operation (https://docs.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database).\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidExternalAdministratorLogin - Invalid or missing external administrator login name.\n\n * 400 InvalidExternalAdministratorSid - Invalid or missing external administrator object id.\n\n * 400 InvalidExternalAdministratorTenantId - Invalid or missing external administrator tenant id.\n\n * 400 ExternalAdministratorPrincipalType - Invalid or missing external administrator principal type. Please select from User, Application or Group.\n\n * 400 MissingExternalAdministratorWithAadOnlyAuth - In order to use Azure AD Only Authentication, please provide details of an external administrator.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 UpsertLogicalServerRequestAlreadyInProgress - An ongoing logical server request is already in progress, please try your request again later.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a server": { + "$ref": "./examples/ServerUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers": { + "get": { + "tags": [ + "Servers" + ], + "description": "Gets a list of all servers in the subscription.", + "operationId": "Servers_List", + "parameters": [ + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of servers.", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List servers": { + "$ref": "./examples/ServerList.json" + }, + "List servers with expand equals administrators": { + "$ref": "./examples/ServerListWithExpandEqualsAdministrators.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import": { + "post": { + "tags": [ + "Servers" + ], + "description": "Imports a bacpac into a new database.", + "operationId": "Servers_ImportDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The database import request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ImportNewDatabaseDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully imported the database.", + "schema": { + "$ref": "#/definitions/ImportExportOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database." + }, + "202": { + "description": "Importing the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Imports to a new database.": { + "$ref": "./examples/ImportNewDatabase.json" + }, + "Imports to a new database, using private link for the SQL server and storage account.": { + "$ref": "./examples/ImportNewDatabaseWithNetworkIsolation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability": { + "post": { + "tags": [ + "Servers" + ], + "description": "Determines whether a resource can be created with the specified name.", + "operationId": "Servers_CheckNameAvailability", + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "The name availability request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityRequest" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed the availability check.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidNameAvailabilityRequest - The check name availability request is invalid.\n\n * 400 UnknownNameType - Unknown resource type specified for a subscription level name availability check." + } + }, + "x-ms-examples": { + "Check for a server name that already exists": { + "$ref": "./examples/CheckNameAvailabilityServerAlreadyExists.json" + }, + "Check for a server name that is available": { + "$ref": "./examples/CheckNameAvailabilityServerAvailable.json" + }, + "Check for a server name that is invalid": { + "$ref": "./examples/CheckNameAvailabilityServerInvalid.json" + } + } + } + } + }, + "definitions": { + "ServerListResult": { + "description": "A list of servers.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Server" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ResourceIdentityWithUserAssignedIdentities": { + "description": "Azure Active Directory identity configuration for a resource.", + "type": "object", + "properties": { + "userAssignedIdentities": { + "description": "The resource ids of the user assigned identities to use", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UserIdentity" + } + }, + "principalId": { + "format": "uuid", + "description": "The Azure Active Directory principal id.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.", + "enum": [ + "None", + "SystemAssigned", + "UserAssigned" + ], + "type": "string", + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + }, + "tenantId": { + "format": "uuid", + "description": "The Azure Active Directory tenant id.", + "type": "string", + "readOnly": true + } + } + }, + "ServerProperties": { + "description": "The properties of a server.", + "type": "object", + "properties": { + "administratorLogin": { + "description": "Administrator username for the server. Once created it cannot be changed.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "administratorLoginPassword": { + "description": "The administrator login password (required for server creation).", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "version": { + "description": "The version of the server.", + "type": "string" + }, + "state": { + "description": "The state of the server.", + "type": "string", + "readOnly": true + }, + "fullyQualifiedDomainName": { + "description": "The fully qualified domain name of the server.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnections": { + "description": "List of private endpoint connections on a server", + "type": "array", + "items": { + "$ref": "#/definitions/ServerPrivateEndpointConnection" + }, + "readOnly": true + }, + "minimalTlsVersion": { + "description": "Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'", + "type": "string" + }, + "publicNetworkAccess": { + "description": "Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerNetworkAccessFlag", + "modelAsString": true + } + }, + "workspaceFeature": { + "description": "Whether or not existing server has a workspace created and if it allows connection from workspace", + "enum": [ + "Connected", + "Disconnected" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ServerWorkspaceFeature", + "modelAsString": true + } + }, + "primaryUserAssignedIdentityId": { + "description": "The resource id of a user assigned identity to be used by default.", + "type": "string" + }, + "federatedClientId": { + "format": "uuid", + "description": "The Client id used for cross tenant CMK scenario", + "type": "string" + }, + "keyId": { + "description": "A CMK URI of the key to use for encryption.", + "type": "string" + }, + "administrators": { + "$ref": "#/definitions/ServerExternalAdministrator", + "description": "The Azure Active Directory identity of the server.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "restrictOutboundNetworkAccess": { + "description": "Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerNetworkAccessFlag", + "modelAsString": true + } + } + } + }, + "UserIdentity": { + "description": "Azure Active Directory identity configuration for a resource.", + "type": "object", + "properties": { + "principalId": { + "format": "uuid", + "description": "The Azure Active Directory principal id.", + "type": "string", + "readOnly": true + }, + "clientId": { + "format": "uuid", + "description": "The Azure Active Directory client id.", + "type": "string", + "readOnly": true + } + } + }, + "ServerPrivateEndpointConnection": { + "description": "A private endpoint connection under a server", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "description": "Private endpoint connection properties", + "readOnly": true + } + } + }, + "ServerExternalAdministrator": { + "description": "Properties of a active directory administrator.", + "type": "object", + "properties": { + "administratorType": { + "description": "Type of the sever administrator.", + "enum": [ + "ActiveDirectory" + ], + "type": "string", + "x-ms-enum": { + "name": "AdministratorType", + "modelAsString": true + } + }, + "principalType": { + "description": "Principal Type of the sever administrator.", + "enum": [ + "User", + "Group", + "Application" + ], + "type": "string", + "x-ms-enum": { + "name": "PrincipalType", + "modelAsString": true + } + }, + "login": { + "description": "Login name of the server administrator.", + "type": "string" + }, + "sid": { + "format": "uuid", + "description": "SID (object ID) of the server administrator.", + "type": "string" + }, + "tenantId": { + "format": "uuid", + "description": "Tenant ID of the administrator.", + "type": "string" + }, + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean" + } + } + }, + "PrivateEndpointConnectionProperties": { + "description": "Properties of a private endpoint connection.", + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpointProperty", + "description": "Private endpoint which the connection belongs to." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionStateProperty", + "description": "Connection state of the private endpoint connection." + }, + "provisioningState": { + "description": "State of the private endpoint connection.", + "enum": [ + "Approving", + "Ready", + "Dropping", + "Failed", + "Rejecting" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PrivateEndpointProvisioningState", + "modelAsString": true + } + } + } + }, + "PrivateEndpointProperty": { + "type": "object", + "properties": { + "id": { + "description": "Resource id of the private endpoint.", + "type": "string" + } + }, + "x-ms-azure-resource": true + }, + "PrivateLinkServiceConnectionStateProperty": { + "required": [ + "status", + "description" + ], + "type": "object", + "properties": { + "status": { + "description": "The private link service connection status.", + "enum": [ + "Approved", + "Pending", + "Rejected", + "Disconnected" + ], + "type": "string", + "x-ms-enum": { + "name": "PrivateLinkServiceConnectionStateStatus", + "modelAsString": true + } + }, + "description": { + "description": "The private link service connection description.", + "type": "string" + }, + "actionsRequired": { + "description": "The actions required for private link service connection.", + "enum": [ + "None" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PrivateLinkServiceConnectionStateActionsRequire", + "modelAsString": true + } + } + } + }, + "Server": { + "description": "An Azure SQL Database server.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "identity": { + "$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities", + "description": "The Azure Active Directory identity of the server.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "kind": { + "description": "Kind of sql server. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ServerProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerUpdate": { + "description": "An update request for an Azure SQL Database server.", + "type": "object", + "properties": { + "identity": { + "$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities", + "description": "Server identity" + }, + "properties": { + "$ref": "#/definitions/ServerProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ImportNewDatabaseDefinition": { + "description": "Contains the information necessary to perform import operation for new database.", + "required": [ + "storageKeyType", + "storageKey", + "storageUri", + "administratorLogin", + "administratorLoginPassword" + ], + "type": "object", + "properties": { + "databaseName": { + "description": "Name of the import database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "edition": { + "description": "Edition of the import database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "serviceObjectiveName": { + "description": "Service level objective name of the import database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "maxSizeBytes": { + "description": "Max size in bytes for the import database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageKeyType": { + "description": "Storage key type.", + "enum": [ + "SharedAccessKey", + "StorageAccessKey" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageKey": { + "description": "Storage key.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageUri": { + "description": "Storage Uri.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLogin": { + "description": "Administrator login name.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLoginPassword": { + "description": "Administrator login password.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "authenticationType": { + "description": "Authentication type.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "networkIsolation": { + "$ref": "#/definitions/NetworkIsolationSettings", + "description": "Optional resource information to enable network isolation for request.", + "x-ms-mutability": [ + "create" + ] + } + } + }, + "NetworkIsolationSettings": { + "description": "Contains the ARM resources for which to create private endpoint connection.", + "type": "object", + "properties": { + "storageAccountResourceId": { + "description": "The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "sqlServerResourceId": { + "description": "The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + } + } + }, + "ImportExportOperationResultProperties": { + "description": "Contains the operation result properties for import/export operation.", + "type": "object", + "properties": { + "requestId": { + "format": "uuid", + "description": "Request Id.", + "type": "string", + "readOnly": true + }, + "requestType": { + "description": "Request type.", + "type": "string", + "readOnly": true + }, + "queuedTime": { + "description": "Queued time.", + "type": "string", + "readOnly": true + }, + "lastModifiedTime": { + "description": "Last modified time.", + "type": "string", + "readOnly": true + }, + "blobUri": { + "description": "Blob Uri.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "Database name.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Operation status.", + "type": "string", + "readOnly": true + }, + "errorMessage": { + "description": "Error message.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnections": { + "description": "Gets the status of private endpoints associated with this request.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnectionRequestStatus" + }, + "readOnly": true + } + } + }, + "PrivateEndpointConnectionRequestStatus": { + "description": "Contains the private endpoint connection requests status.", + "type": "object", + "properties": { + "privateLinkServiceId": { + "description": "Resource id for which the private endpoint is created.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnectionName": { + "description": "The connection name for the private endpoint.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Status of this private endpoint connection.", + "type": "string", + "readOnly": true + } + } + }, + "ImportExportOperationResult": { + "description": "An ImportExport operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ImportExportOperationResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "CheckNameAvailabilityRequest": { + "description": "A request to check whether the specified name for a resource is available.", + "required": [ + "name", + "type" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "enum": [ + "Microsoft.Sql/servers" + ], + "type": "string", + "x-ms-enum": { + "name": "CheckNameAvailabilityResourceType", + "modelAsString": false + } + } + } + }, + "CheckNameAvailabilityResponse": { + "description": "The result of a name availability check.", + "type": "object", + "properties": { + "name": { + "description": "The name whose availability was checked.", + "type": "string", + "readOnly": true + }, + "available": { + "description": "True if the name is available, otherwise false.", + "type": "boolean", + "readOnly": true + }, + "reason": { + "description": "The reason code explaining why the name is unavailable. Will be undefined if the name is available.", + "enum": [ + "Invalid", + "AlreadyExists" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CheckNameAvailabilityReason", + "modelAsString": false + } + }, + "message": { + "description": "A message explaining why the name is unavailable. Will be undefined if the name is available.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SqlAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SqlAgent.json new file mode 100644 index 000000000000..d7a1882f1018 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SqlAgent.json @@ -0,0 +1,157 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/sqlAgent/current": { + "get": { + "tags": [ + "SqlAgent" + ], + "description": "Gets current instance sql agent configuration.", + "operationId": "SqlAgent_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved current sql agent configuration.", + "schema": { + "$ref": "#/definitions/SqlAgentConfiguration" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlAgentManagedServerNotFound - User tried to configure sql agent of unknown managed instance." + } + }, + "x-ms-examples": { + "Gets current instance sql agent configuration.": { + "$ref": "./examples/SqlAgentConfigurationGet.json" + } + } + }, + "put": { + "tags": [ + "SqlAgent" + ], + "description": "Puts new sql agent configuration to instance.", + "operationId": "SqlAgent_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SqlAgentConfiguration" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully put sql agent configuration", + "schema": { + "$ref": "#/definitions/SqlAgentConfiguration" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlAgentManagedServerNotFound - User tried to configure sql agent of unknown managed instance." + } + }, + "x-ms-examples": { + "Puts new sql agent configuration to instance.": { + "$ref": "./examples/SqlAgentConfigurationPut.json" + } + } + } + } + }, + "definitions": { + "SqlAgentConfigurationProperties": { + "description": "Sql agent configuration properties.", + "type": "object", + "properties": { + "state": { + "description": "The state of Sql Agent.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string" + } + } + }, + "SqlAgentConfiguration": { + "description": "A recoverable managed database resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlAgentConfigurationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SubscriptionUsages.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SubscriptionUsages.json new file mode 100644 index 000000000000..ee88b26650e0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SubscriptionUsages.json @@ -0,0 +1,187 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages": { + "get": { + "tags": [ + "SubscriptionUsages" + ], + "description": "Gets all subscription usage metrics in a given location.", + "operationId": "SubscriptionUsages_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the subscription location usages.", + "schema": { + "$ref": "#/definitions/SubscriptionUsageListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 SubscriptionNotFound - The requested subscription was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List subscription usages in the given location.": { + "$ref": "./examples/SubscriptionUsageListByLocation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}": { + "get": { + "tags": [ + "SubscriptionUsages" + ], + "description": "Gets a subscription usage metric.", + "operationId": "SubscriptionUsages_Get", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "usageName", + "in": "path", + "description": "Name of usage metric to return.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved particular subscription location usage.", + "schema": { + "$ref": "#/definitions/SubscriptionUsage" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get specific subscription usage in the given location.": { + "$ref": "./examples/SubscriptionUsageGet.json" + } + } + } + } + }, + "definitions": { + "SubscriptionUsageListResult": { + "description": "A list of subscription usage metrics in a location.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionUsage" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SubscriptionUsageProperties": { + "description": "Properties of a subscription usage.", + "type": "object", + "properties": { + "displayName": { + "description": "User-readable name of the metric.", + "type": "string", + "readOnly": true + }, + "currentValue": { + "format": "double", + "description": "Current value of the metric.", + "type": "number", + "readOnly": true + }, + "limit": { + "format": "double", + "description": "Boundary value of the metric.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit of the metric.", + "type": "string", + "readOnly": true + } + } + }, + "SubscriptionUsage": { + "description": "Usage Metric of a Subscription in a Location.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SubscriptionUsageProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncAgents.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncAgents.json new file mode 100644 index 000000000000..8ffd4165f4f0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncAgents.json @@ -0,0 +1,531 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}": { + "get": { + "tags": [ + "SyncAgents" + ], + "description": "Gets a sync agent.", + "operationId": "SyncAgents_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncAgentName", + "in": "path", + "description": "The name of the sync agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified sync agent.", + "schema": { + "$ref": "#/definitions/SyncAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists." + } + }, + "x-ms-examples": { + "Get a sync agent": { + "$ref": "./examples/SyncAgentGet.json" + } + } + }, + "put": { + "tags": [ + "SyncAgents" + ], + "description": "Creates or updates a sync agent.", + "operationId": "SyncAgents_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncAgentName", + "in": "path", + "description": "The name of the sync agent.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested sync agent resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/SyncAgent" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sync agent.", + "schema": { + "$ref": "#/definitions/SyncAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists." + }, + "202": { + "description": "Creating or updating the sync agent is in progress." + }, + "201": { + "description": "Successfully created the sync agent.", + "schema": { + "$ref": "#/definitions/SyncAgent" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a new sync agent": { + "$ref": "./examples/SyncAgentCreate.json" + }, + "Update a sync agent": { + "$ref": "./examples/SyncAgentUpdate.json" + } + } + }, + "delete": { + "tags": [ + "SyncAgents" + ], + "description": "Deletes a sync agent.", + "operationId": "SyncAgents_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncAgentName", + "in": "path", + "description": "The name of the sync agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the sync agent." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists." + }, + "202": { + "description": "Deleting the sync agent is in progress." + }, + "204": { + "description": "The specified sync agent does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a sync agent": { + "$ref": "./examples/SyncAgentDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents": { + "get": { + "tags": [ + "SyncAgents" + ], + "description": "Lists sync agents in a server.", + "operationId": "SyncAgents_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of sync agents.", + "schema": { + "$ref": "#/definitions/SyncAgentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get sync agents under a server": { + "$ref": "./examples/SyncAgentListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/generateKey": { + "post": { + "tags": [ + "SyncAgents" + ], + "description": "Generates a sync agent key.", + "operationId": "SyncAgents_GenerateKey", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncAgentName", + "in": "path", + "description": "The name of the sync agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully generate a sync agent key.", + "schema": { + "$ref": "#/definitions/SyncAgentKeyProperties" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists." + } + }, + "x-ms-examples": { + "Generate a sync agent key": { + "$ref": "./examples/SyncAgentGenerateKey.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases": { + "get": { + "tags": [ + "SyncAgents" + ], + "description": "Lists databases linked to a sync agent.", + "operationId": "SyncAgents_ListLinkedDatabases", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncAgentName", + "in": "path", + "description": "The name of the sync agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved sync agent linked SQL server databases.", + "schema": { + "$ref": "#/definitions/SyncAgentLinkedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get sync agent linked databases": { + "$ref": "./examples/SyncAgentGetLinkedDatabases.json" + } + } + } + } + }, + "definitions": { + "SyncAgentProperties": { + "description": "Properties of an Azure SQL Database sync agent.", + "type": "object", + "properties": { + "name": { + "description": "Name of the sync agent.", + "type": "string", + "readOnly": true + }, + "syncDatabaseId": { + "description": "ARM resource id of the sync database in the sync agent.", + "type": "string" + }, + "lastAliveTime": { + "format": "date-time", + "description": "Last alive time of the sync agent.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "State of the sync agent.", + "enum": [ + "Online", + "Offline", + "NeverConnected" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SyncAgentState", + "modelAsString": true + } + }, + "isUpToDate": { + "description": "If the sync agent version is up to date.", + "type": "boolean", + "readOnly": true + }, + "expiryTime": { + "format": "date-time", + "description": "Expiration time of the sync agent version.", + "type": "string", + "readOnly": true + }, + "version": { + "description": "Version of the sync agent.", + "type": "string", + "readOnly": true + } + } + }, + "SyncAgent": { + "description": "An Azure SQL Database sync agent.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SyncAgentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SyncAgentListResult": { + "description": "A list of sync agents.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncAgent" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncAgentKeyProperties": { + "description": "Properties of an Azure SQL Database sync agent key.", + "type": "object", + "properties": { + "syncAgentKey": { + "description": "Key of sync agent.", + "type": "string", + "readOnly": true + } + } + }, + "SyncAgentLinkedDatabaseListResult": { + "description": "A list of sync agent linked databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncAgentLinkedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncAgentLinkedDatabaseProperties": { + "description": "Properties of an Azure SQL Database sync agent linked database.", + "type": "object", + "properties": { + "databaseType": { + "description": "Type of the sync agent linked database.", + "enum": [ + "AzureSqlDatabase", + "SqlServerDatabase" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SyncMemberDbType", + "modelAsString": true + } + }, + "databaseId": { + "description": "Id of the sync agent linked database.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Description of the sync agent linked database.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name of the sync agent linked database.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "Database name of the sync agent linked database.", + "type": "string", + "readOnly": true + }, + "userName": { + "description": "User name of the sync agent linked database.", + "type": "string", + "readOnly": true + } + } + }, + "SyncAgentLinkedDatabase": { + "description": "An Azure SQL Database sync agent linked database.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SyncAgentLinkedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncGroups.json new file mode 100644 index 000000000000..6ac2186bdb66 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncGroups.json @@ -0,0 +1,1065 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds": { + "get": { + "tags": [ + "SyncGroups" + ], + "description": "Gets a collection of sync database ids.", + "operationId": "SyncGroups_ListSyncDatabaseIds", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved collection of sync database ids.", + "schema": { + "$ref": "#/definitions/SyncDatabaseIdListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a sync database ID": { + "$ref": "./examples/SyncGroupGetSyncDatabaseId.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema": { + "post": { + "tags": [ + "SyncGroups" + ], + "description": "Refreshes a hub database schema.", + "operationId": "SyncGroups_RefreshHubSchema", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully refreshed a sync hub schema." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "The sync hub schema refresh operation is on going." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Refresh a hub database schema.": { + "$ref": "./examples/SyncGroupRefreshHubSchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas": { + "get": { + "tags": [ + "SyncGroups" + ], + "description": "Gets a collection of hub database schemas.", + "operationId": "SyncGroups_ListHubSchemas", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get a sync group hub database schema.", + "schema": { + "$ref": "#/definitions/SyncFullSchemaPropertiesListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a hub database schema.": { + "$ref": "./examples/SyncGroupGetHubSchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs": { + "get": { + "tags": [ + "SyncGroups" + ], + "description": "Gets a collection of sync group logs.", + "operationId": "SyncGroups_ListLogs", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "name": "startTime", + "in": "query", + "description": "Get logs generated after this time.", + "required": true, + "type": "string" + }, + { + "name": "endTime", + "in": "query", + "description": "Get logs generated before this time.", + "required": true, + "type": "string" + }, + { + "name": "type", + "in": "query", + "description": "The types of logs to retrieve.", + "required": true, + "type": "string", + "enum": [ + "All", + "Error", + "Warning", + "Success" + ] + }, + { + "name": "continuationToken", + "in": "query", + "description": "The continuation token for this operation.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved sync group logs.", + "schema": { + "$ref": "#/definitions/SyncGroupLogListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get sync group logs": { + "$ref": "./examples/SyncGroupGetLog.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync": { + "post": { + "tags": [ + "SyncGroups" + ], + "description": "Cancels a sync group synchronization.", + "operationId": "SyncGroups_CancelSync", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully cancel a sync group synchronization." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + } + }, + "x-ms-examples": { + "Cancel a sync group synchronization": { + "$ref": "./examples/SyncGroupCancelSync.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync": { + "post": { + "tags": [ + "SyncGroups" + ], + "description": "Triggers a sync group synchronization.", + "operationId": "SyncGroups_TriggerSync", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully triggered a sync group synchronization." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + } + }, + "x-ms-examples": { + "Trigger a sync group synchronization.": { + "$ref": "./examples/SyncGroupTriggerSync.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}": { + "get": { + "tags": [ + "SyncGroups" + ], + "description": "Gets a sync group.", + "operationId": "SyncGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified sync group.", + "schema": { + "$ref": "#/definitions/SyncGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + } + }, + "x-ms-examples": { + "Get a sync group": { + "$ref": "./examples/SyncGroupGet.json" + } + } + }, + "put": { + "tags": [ + "SyncGroups" + ], + "description": "Creates or updates a sync group.", + "operationId": "SyncGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested sync group resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/SyncGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sync group.", + "schema": { + "$ref": "#/definitions/SyncGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + }, + "202": { + "description": "Creating or updating the sync group is in progress." + }, + "201": { + "description": "Successfully created the sync group.", + "schema": { + "$ref": "#/definitions/SyncGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a sync group": { + "$ref": "./examples/SyncGroupCreate.json" + }, + "Update a sync group": { + "$ref": "./examples/SyncGroupUpdate.json" + } + } + }, + "delete": { + "tags": [ + "SyncGroups" + ], + "description": "Deletes a sync group.", + "operationId": "SyncGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the sync group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + }, + "202": { + "description": "Deleting the sync group is in progress." + }, + "204": { + "description": "The specified sync group does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a sync group": { + "$ref": "./examples/SyncGroupDelete.json" + } + } + }, + "patch": { + "tags": [ + "SyncGroups" + ], + "description": "Updates a sync group.", + "operationId": "SyncGroups_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested sync group resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/SyncGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sync group.", + "schema": { + "$ref": "#/definitions/SyncGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + }, + "202": { + "description": "Updating the sync group is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a sync group": { + "$ref": "./examples/SyncGroupPatch.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups": { + "get": { + "tags": [ + "SyncGroups" + ], + "description": "Lists sync groups under a hub database.", + "operationId": "SyncGroups_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of sync groups.", + "schema": { + "$ref": "#/definitions/SyncGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List sync groups under a given database": { + "$ref": "./examples/SyncGroupListByDatabase.json" + } + } + } + } + }, + "definitions": { + "SyncDatabaseIdListResult": { + "description": "A list of sync database ID properties.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncDatabaseIdProperties" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncDatabaseIdProperties": { + "description": "Properties of the sync database id.", + "type": "object", + "properties": { + "id": { + "description": "ARM resource id of sync database.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaPropertiesListResult": { + "description": "A list of sync schema properties.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaProperties" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaProperties": { + "description": "Properties of the database full schema.", + "type": "object", + "properties": { + "tables": { + "description": "List of tables in the database full schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaTable" + }, + "readOnly": true + }, + "lastUpdateTime": { + "format": "date-time", + "description": "Last update time of the database schema.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaTable": { + "description": "Properties of the table in the database full schema.", + "type": "object", + "properties": { + "columns": { + "description": "List of columns in the table of database full schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaTableColumn" + }, + "readOnly": true + }, + "errorId": { + "description": "Error id of the table.", + "type": "string", + "readOnly": true + }, + "hasError": { + "description": "If there is error in the table.", + "type": "boolean", + "readOnly": true + }, + "name": { + "description": "Name of the table.", + "type": "string", + "readOnly": true + }, + "quotedName": { + "description": "Quoted name of the table.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaTableColumn": { + "description": "Properties of the column in the table of database full schema.", + "type": "object", + "properties": { + "dataSize": { + "description": "Data size of the column.", + "type": "string", + "readOnly": true + }, + "dataType": { + "description": "Data type of the column.", + "type": "string", + "readOnly": true + }, + "errorId": { + "description": "Error id of the column.", + "type": "string", + "readOnly": true + }, + "hasError": { + "description": "If there is error in the table.", + "type": "boolean", + "readOnly": true + }, + "isPrimaryKey": { + "description": "If it is the primary key of the table.", + "type": "boolean", + "readOnly": true + }, + "name": { + "description": "Name of the column.", + "type": "string", + "readOnly": true + }, + "quotedName": { + "description": "Quoted name of the column.", + "type": "string", + "readOnly": true + } + } + }, + "SyncGroupLogListResult": { + "description": "A list of sync group log properties.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncGroupLogProperties" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncGroupLogProperties": { + "description": "Properties of an Azure SQL Database sync group log.", + "type": "object", + "properties": { + "timestamp": { + "format": "date-time", + "description": "Timestamp of the sync group log.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Type of the sync group log.", + "enum": [ + "All", + "Error", + "Warning", + "Success" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SyncGroupLogType", + "modelAsString": true + } + }, + "source": { + "description": "Source of the sync group log.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Details of the sync group log.", + "type": "string", + "readOnly": true + }, + "tracingId": { + "format": "uuid", + "description": "TracingId of the sync group log.", + "type": "string", + "readOnly": true + }, + "operationStatus": { + "description": "OperationStatus of the sync group log.", + "type": "string", + "readOnly": true + } + } + }, + "SyncGroupProperties": { + "description": "Properties of a sync group.", + "type": "object", + "properties": { + "interval": { + "format": "int32", + "description": "Sync interval of the sync group.", + "type": "integer" + }, + "lastSyncTime": { + "format": "date-time", + "description": "Last sync time of the sync group.", + "type": "string", + "readOnly": true + }, + "conflictResolutionPolicy": { + "description": "Conflict resolution policy of the sync group.", + "enum": [ + "HubWin", + "MemberWin" + ], + "type": "string", + "x-ms-enum": { + "name": "SyncConflictResolutionPolicy", + "modelAsString": true + } + }, + "syncDatabaseId": { + "description": "ARM resource id of the sync database in the sync group.", + "type": "string" + }, + "hubDatabaseUserName": { + "description": "User name for the sync group hub database credential.", + "type": "string" + }, + "hubDatabasePassword": { + "description": "Password for the sync group hub database credential.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "syncState": { + "description": "Sync state of the sync group.", + "enum": [ + "NotReady", + "Error", + "Warning", + "Progressing", + "Good" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SyncGroupState", + "modelAsString": true + } + }, + "schema": { + "$ref": "#/definitions/SyncGroupSchema", + "description": "Sync schema of the sync group." + }, + "enableConflictLogging": { + "description": "If conflict logging is enabled.", + "type": "boolean" + }, + "conflictLoggingRetentionInDays": { + "format": "int32", + "description": "Conflict logging retention period.", + "type": "integer" + }, + "usePrivateLinkConnection": { + "description": "If use private link connection is enabled.", + "type": "boolean" + }, + "privateEndpointName": { + "description": "Private endpoint name of the sync group if use private link connection is enabled.", + "type": "string", + "readOnly": true + } + } + }, + "SyncGroupSchema": { + "description": "Properties of sync group schema.", + "type": "object", + "properties": { + "tables": { + "description": "List of tables in sync group schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncGroupSchemaTable" + } + }, + "masterSyncMemberName": { + "description": "Name of master sync member where the schema is from.", + "type": "string" + } + } + }, + "SyncGroupSchemaTable": { + "description": "Properties of table in sync group schema.", + "type": "object", + "properties": { + "columns": { + "description": "List of columns in sync group schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncGroupSchemaTableColumn" + } + }, + "quotedName": { + "description": "Quoted name of sync group schema table.", + "type": "string" + } + } + }, + "SyncGroupSchemaTableColumn": { + "description": "Properties of column in sync group table.", + "type": "object", + "properties": { + "quotedName": { + "description": "Quoted name of sync group table column.", + "type": "string" + }, + "dataSize": { + "description": "Data size of the column.", + "type": "string" + }, + "dataType": { + "description": "Data type of the column.", + "type": "string" + } + } + }, + "SyncGroup": { + "description": "An Azure SQL Database sync group.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and capacity of the SKU." + }, + "properties": { + "$ref": "#/definitions/SyncGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SyncGroupListResult": { + "description": "A list of sync groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncMembers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncMembers.json new file mode 100644 index 000000000000..c30dadfd6950 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/SyncMembers.json @@ -0,0 +1,747 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}": { + "get": { + "tags": [ + "SyncMembers" + ], + "description": "Gets a sync member.", + "operationId": "SyncMembers_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified sync member.", + "schema": { + "$ref": "#/definitions/SyncMember" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists." + } + }, + "x-ms-examples": { + "Get a sync member": { + "$ref": "./examples/SyncMemberGet.json" + } + } + }, + "put": { + "tags": [ + "SyncMembers" + ], + "description": "Creates or updates a sync member.", + "operationId": "SyncMembers_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested sync member resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/SyncMember" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sync member.", + "schema": { + "$ref": "#/definitions/SyncMember" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists." + }, + "202": { + "description": "Creating or updating the sync member is in progress." + }, + "201": { + "description": "Successfully created the sync member.", + "schema": { + "$ref": "#/definitions/SyncMember" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a new sync member": { + "$ref": "./examples/SyncMemberCreate.json" + }, + "Update a sync member": { + "$ref": "./examples/SyncMemberUpdate.json" + } + } + }, + "delete": { + "tags": [ + "SyncMembers" + ], + "description": "Deletes a sync member.", + "operationId": "SyncMembers_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the sync member." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists." + }, + "202": { + "description": "Deleting the sync member is in progress." + }, + "204": { + "description": "The specified sync member does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a sync member": { + "$ref": "./examples/SyncMemberDelete.json" + } + } + }, + "patch": { + "tags": [ + "SyncMembers" + ], + "description": "Updates an existing sync member.", + "operationId": "SyncMembers_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested sync member resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/SyncMember" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sync member.", + "schema": { + "$ref": "#/definitions/SyncMember" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists." + }, + "202": { + "description": "Updating the sync member is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update an existing sync member": { + "$ref": "./examples/SyncMemberPatch.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers": { + "get": { + "tags": [ + "SyncMembers" + ], + "description": "Lists sync members in the given sync group.", + "operationId": "SyncMembers_ListBySyncGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of sync members.", + "schema": { + "$ref": "#/definitions/SyncMemberListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List sync members under a sync group": { + "$ref": "./examples/SyncMemberListBySyncGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas": { + "get": { + "tags": [ + "SyncMembers" + ], + "description": "Gets a sync member database schema.", + "operationId": "SyncMembers_ListMemberSchemas", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get a sync member schema.", + "schema": { + "$ref": "#/definitions/SyncFullSchemaPropertiesListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a sync member schema": { + "$ref": "./examples/SyncMemberGetSchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema": { + "post": { + "tags": [ + "SyncMembers" + ], + "description": "Refreshes a sync member database schema.", + "operationId": "SyncMembers_RefreshMemberSchema", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully refreshed a sync member schema." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "The sync member schema refresh operation is on going." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Refresh a sync member database schema": { + "$ref": "./examples/SyncMemberRefreshSchema.json" + } + } + } + } + }, + "definitions": { + "SyncMemberProperties": { + "description": "Properties of a sync member.", + "type": "object", + "properties": { + "databaseType": { + "description": "Database type of the sync member.", + "enum": [ + "AzureSqlDatabase", + "SqlServerDatabase" + ], + "type": "string", + "x-ms-enum": { + "name": "SyncMemberDbType", + "modelAsString": true + } + }, + "syncAgentId": { + "description": "ARM resource id of the sync agent in the sync member.", + "type": "string" + }, + "sqlServerDatabaseId": { + "format": "uuid", + "description": "SQL Server database id of the sync member.", + "type": "string" + }, + "syncMemberAzureDatabaseResourceId": { + "description": "ARM resource id of the sync member logical database, for sync members in Azure.", + "type": "string" + }, + "usePrivateLinkConnection": { + "description": "Whether to use private link connection.", + "type": "boolean" + }, + "privateEndpointName": { + "description": "Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name of the member database in the sync member", + "type": "string" + }, + "databaseName": { + "description": "Database name of the member database in the sync member.", + "type": "string" + }, + "userName": { + "description": "User name of the member database in the sync member.", + "type": "string" + }, + "password": { + "description": "Password of the member database in the sync member.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "syncDirection": { + "description": "Sync direction of the sync member.", + "enum": [ + "Bidirectional", + "OneWayMemberToHub", + "OneWayHubToMember" + ], + "type": "string", + "x-ms-enum": { + "name": "SyncDirection", + "modelAsString": true + } + }, + "syncState": { + "description": "Sync state of the sync member.", + "enum": [ + "SyncInProgress", + "SyncSucceeded", + "SyncFailed", + "DisabledTombstoneCleanup", + "DisabledBackupRestore", + "SyncSucceededWithWarnings", + "SyncCancelling", + "SyncCancelled", + "UnProvisioned", + "Provisioning", + "Provisioned", + "ProvisionFailed", + "DeProvisioning", + "DeProvisioned", + "DeProvisionFailed", + "Reprovisioning", + "ReprovisionFailed", + "UnReprovisioned" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SyncMemberState", + "modelAsString": true + } + } + } + }, + "SyncMember": { + "description": "An Azure SQL Database sync member.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SyncMemberProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SyncMemberListResult": { + "description": "A list of Azure SQL Database sync members.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncMember" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaPropertiesListResult": { + "description": "A list of sync schema properties.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaProperties" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaProperties": { + "description": "Properties of the database full schema.", + "type": "object", + "properties": { + "tables": { + "description": "List of tables in the database full schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaTable" + }, + "readOnly": true + }, + "lastUpdateTime": { + "format": "date-time", + "description": "Last update time of the database schema.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaTable": { + "description": "Properties of the table in the database full schema.", + "type": "object", + "properties": { + "columns": { + "description": "List of columns in the table of database full schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaTableColumn" + }, + "readOnly": true + }, + "errorId": { + "description": "Error id of the table.", + "type": "string", + "readOnly": true + }, + "hasError": { + "description": "If there is error in the table.", + "type": "boolean", + "readOnly": true + }, + "name": { + "description": "Name of the table.", + "type": "string", + "readOnly": true + }, + "quotedName": { + "description": "Quoted name of the table.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaTableColumn": { + "description": "Properties of the column in the table of database full schema.", + "type": "object", + "properties": { + "dataSize": { + "description": "Data size of the column.", + "type": "string", + "readOnly": true + }, + "dataType": { + "description": "Data type of the column.", + "type": "string", + "readOnly": true + }, + "errorId": { + "description": "Error id of the column.", + "type": "string", + "readOnly": true + }, + "hasError": { + "description": "If there is error in the table.", + "type": "boolean", + "readOnly": true + }, + "isPrimaryKey": { + "description": "If it is the primary key of the table.", + "type": "boolean", + "readOnly": true + }, + "name": { + "description": "Name of the column.", + "type": "string", + "readOnly": true + }, + "quotedName": { + "description": "Quoted name of the column.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TdeCertificates.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TdeCertificates.json new file mode 100644 index 000000000000..1956f9f42e74 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TdeCertificates.json @@ -0,0 +1,133 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/tdeCertificates": { + "post": { + "tags": [ + "TdeCertificates" + ], + "description": "Creates a TDE certificate for a given server.", + "operationId": "TdeCertificates_Create", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested TDE certificate to be created or updated.", + "required": true, + "schema": { + "$ref": "#/definitions/TdeCertificate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created the TDE certificate." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MissingPrivateBlob - The private blob is missing.\n\n * 400 InvalidPrivateBlobOrPassword - Invalid private blob or password specified.\n\n * 400 PrivateBlobWithoutPrivateKey - The provided blob does not contain private key.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Upload a TDE certificate": { + "$ref": "./examples/SqlTdeCertificateCreate.json" + } + } + } + } + }, + "definitions": { + "TdeCertificateProperties": { + "description": "Properties of a TDE certificate.", + "required": [ + "privateBlob" + ], + "type": "object", + "properties": { + "privateBlob": { + "description": "The base64 encoded certificate private blob.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "certPassword": { + "description": "The certificate password.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + } + } + }, + "TdeCertificate": { + "description": "A TDE certificate that can be uploaded into a server.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/TdeCertificateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TimeZones.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TimeZones.json new file mode 100644 index 000000000000..19036f58641a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TimeZones.json @@ -0,0 +1,172 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones": { + "get": { + "tags": [ + "TimeZones" + ], + "description": "Gets a list of managed instance time zones by location.", + "operationId": "TimeZones_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of time zones.", + "schema": { + "$ref": "#/definitions/TimeZoneListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed instance time zones by location": { + "$ref": "./examples/ManagedInstanceTimeZoneListByLocation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones/{timeZoneId}": { + "get": { + "tags": [ + "TimeZones" + ], + "description": "Gets a managed instance time zone.", + "operationId": "TimeZones_Get", + "parameters": [ + { + "name": "locationName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "timeZoneId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified time zone.", + "schema": { + "$ref": "#/definitions/TimeZone" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Get managed instance time zone": { + "$ref": "./examples/ManagedInstanceTimeZoneGet.json" + } + } + } + } + }, + "definitions": { + "TimeZoneListResult": { + "description": "A list of time zones.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/TimeZone" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "TimeZoneProperties": { + "description": "The properties of a time zone.", + "type": "object", + "properties": { + "timeZoneId": { + "description": "The time zone id", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "The time zone display name", + "type": "string", + "readOnly": true + } + } + }, + "TimeZone": { + "description": "Time Zone.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/TimeZoneProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TransparentDataEncryptions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TransparentDataEncryptions.json new file mode 100644 index 000000000000..7b857543ed5b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/TransparentDataEncryptions.json @@ -0,0 +1,287 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}": { + "get": { + "tags": [ + "TransparentDataEncryptions" + ], + "description": "Gets a logical database's transparent data encryption.", + "operationId": "TransparentDataEncryptions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the logical database for which the transparent data encryption is defined.", + "required": true, + "type": "string" + }, + { + "name": "tdeName", + "in": "path", + "description": "The name of the transparent data encryption configuration.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "TransparentDataEncryptionName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the Logical database transparent data encryption.", + "schema": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryption" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 401 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + } + }, + "x-ms-examples": { + "Get a database's transparent data encryption": { + "$ref": "./examples/TransparentDataEncryptionGet.json" + } + } + }, + "put": { + "tags": [ + "TransparentDataEncryptions" + ], + "description": "Updates a logical database's transparent data encryption configuration.", + "operationId": "TransparentDataEncryptions_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the logical database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "tdeName", + "in": "path", + "description": "The name of the transparent data encryption configuration.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "TransparentDataEncryptionName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The database transparent data encryption.", + "required": true, + "schema": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryption" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database Transparent Data Encryption state.", + "schema": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryption" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 400 InvalidTransparentDataEncryptionUpdateRequest - Please enter a valid state. Please use \"Enabled\" or \"Disabled\".\n\n * 400 InvalidTransparentDataEncryptionName - The transparent data encryption key name is not supported.\n\n * 401 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + }, + "201": { + "description": "Successfully created the database transparent data encryption state.", + "schema": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryption" + } + }, + "202": { + "description": "Creating or updating the database transparent data encryption configuration is in progress." + } + }, + "x-ms-examples": { + "Update a database's Transparent Data Encryption state with minimal parameters": { + "$ref": "./examples/TransparentDataEncryptionUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption": { + "get": { + "tags": [ + "TransparentDataEncryptions" + ], + "description": "Gets a list of the logical database's transparent data encryption.", + "operationId": "TransparentDataEncryptions_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the logical database for which the transparent data encryption is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of Logical database transparent data encryption.", + "schema": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryptionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 401 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a list of the database's transparent data encryption": { + "$ref": "./examples/TransparentDataEncryptionList.json" + } + } + } + } + }, + "definitions": { + "TransparentDataEncryptionProperties": { + "description": "Properties of a transparent data encryption.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the transparent data encryption.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "TransparentDataEncryptionState", + "modelAsString": false + } + } + } + }, + "LogicalDatabaseTransparentDataEncryption": { + "description": "A logical database transparent data encryption state.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/TransparentDataEncryptionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "LogicalDatabaseTransparentDataEncryptionListResult": { + "description": "A list of transparent data encryptions", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryption" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Usages.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Usages.json new file mode 100644 index 000000000000..996818f0f03b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/Usages.json @@ -0,0 +1,167 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages": { + "get": { + "tags": [ + "Usages" + ], + "description": "Gets all instance pool usage metrics", + "operationId": "Usages_ListByInstancePool", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the instance pool to be retrieved.", + "required": true, + "type": "string" + }, + { + "name": "expandChildren", + "in": "query", + "description": "Optional request parameter to include managed instance usages within the instance pool.", + "required": false, + "type": "boolean" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the instance pool usages.", + "schema": { + "$ref": "#/definitions/UsageListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstancePoolWrongUsageName - Request for an instance pool's usage has an unsupported usage name\n\n * 400 InstancePoolManagedInstanceInfoUnavailable - Information for managed instances inside this instance pool is not available\n\n * 404 InstancePoolNotFound - An instance pool cannot be found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List instance pool usages.": { + "$ref": "./examples/ListInstancePoolUsage.json" + }, + "List instance pool usages expanded with children.": { + "$ref": "./examples/ListInstancePoolUsageExpanded.json" + } + } + } + } + }, + "definitions": { + "UsageListResult": { + "description": "A list of usages.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Usage" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "Usage": { + "description": "ARM usage.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "$ref": "#/definitions/Name", + "description": "Resource name.", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Usage unit.", + "type": "string", + "readOnly": true + }, + "currentValue": { + "format": "int32", + "description": "Usage current value.", + "type": "integer", + "readOnly": true + }, + "limit": { + "format": "int32", + "description": "Usage limit.", + "type": "integer", + "readOnly": true + }, + "requestedLimit": { + "format": "int32", + "description": "Usage requested limit.", + "type": "integer", + "readOnly": true + } + } + }, + "Name": { + "description": "ARM Usage Name", + "type": "object", + "properties": { + "value": { + "description": "Usage name value", + "type": "string" + }, + "localizedValue": { + "description": "Usage name localized value.", + "type": "string" + } + } + } + }, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/VirtualClusters.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/VirtualClusters.json new file mode 100644 index 000000000000..b70efcfc3217 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/VirtualClusters.json @@ -0,0 +1,405 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}/updateManagedInstanceDnsServers": { + "post": { + "tags": [ + "VirtualClusters" + ], + "description": "Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster.", + "operationId": "VirtualClusters_UpdateDnsServers", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/VirtualClusterNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully synchronized the DNS server settings.", + "schema": { + "$ref": "#/definitions/UpdateManagedInstanceDnsServersOperation" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name." + } + }, + "x-ms-examples": { + "Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster.": { + "$ref": "./examples/UpdateManagedInstanceDnsServers.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters": { + "get": { + "tags": [ + "VirtualClusters" + ], + "description": "Gets a list of all virtualClusters in the subscription.", + "operationId": "VirtualClusters_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of virtual clusters.", + "schema": { + "$ref": "#/definitions/VirtualClusterListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List virtualClusters": { + "$ref": "./examples/VirtualClusterList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters": { + "get": { + "tags": [ + "VirtualClusters" + ], + "description": "Gets a list of virtual clusters in a resource group.", + "operationId": "VirtualClusters_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of virtual clusters.", + "schema": { + "$ref": "#/definitions/VirtualClusterListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotEnabledForFeature - User subscription not enabled for feature user attempted to use.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 VirtualClusterDoesNotExist - The virtual cluster does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - Specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 VirtualClusterRemovalAlreadyInProgress - Removal of virtual cluster is already in progress with request\n\n * 409 VirtualClusterRemovalFailed - Request to drop virtual cluster failed. Check if there are active dependent resources.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List virtual clusters by resource group": { + "$ref": "./examples/VirtualClusterListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}": { + "get": { + "tags": [ + "VirtualClusters" + ], + "description": "Gets a virtual cluster.", + "operationId": "VirtualClusters_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/VirtualClusterNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified virtual cluster.", + "schema": { + "$ref": "#/definitions/VirtualCluster" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotEnabledForFeature - User subscription not enabled for feature user attempted to use.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 VirtualClusterDoesNotExist - The virtual cluster does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - Specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 VirtualClusterRemovalAlreadyInProgress - Removal of virtual cluster is already in progress with request\n\n * 409 VirtualClusterRemovalFailed - Request to drop virtual cluster failed. Check if there are active dependent resources.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription." + } + }, + "x-ms-examples": { + "Get virtual cluster": { + "$ref": "./examples/VirtualClusterGet.json" + } + } + }, + "delete": { + "tags": [ + "VirtualClusters" + ], + "description": "Deletes a virtual cluster.", + "operationId": "VirtualClusters_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/VirtualClusterNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the virtual cluster." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotEnabledForFeature - User subscription not enabled for feature user attempted to use.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 VirtualClusterDoesNotExist - The virtual cluster does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - Specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 VirtualClusterRemovalAlreadyInProgress - Removal of virtual cluster is already in progress with request\n\n * 409 VirtualClusterRemovalFailed - Request to drop virtual cluster failed. Check if there are active dependent resources.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Deleting the virtual cluster is in progress." + }, + "204": { + "description": "The specified virtual cluster does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete virtual cluster": { + "$ref": "./examples/VirtualClusterDelete.json" + } + } + }, + "patch": { + "tags": [ + "VirtualClusters" + ], + "description": "Updates a virtual cluster.", + "operationId": "VirtualClusters_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/VirtualClusterNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested virtual cluster resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualClusterUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the virtual cluster.", + "schema": { + "$ref": "#/definitions/VirtualCluster" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotEnabledForFeature - User subscription not enabled for feature user attempted to use.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 InvalidMaintenanceWindowSettings - Invalid maintenance window settings.\n\n * 400 InvalidMaintenanceWindowProperty - Invalid maintenance window property was specified.\n\n * 400 InvalidMaintenanceWindowPropertyNull - Invalid maintenance window with required properties null.\n\n * 400 InvalidMaintenanceWindowTypeWithPropertySpecified - Maintenance window type must not have certain properties specified.\n\n * 404 VirtualClusterDoesNotExist - The virtual cluster does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - Specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 VirtualClusterRemovalAlreadyInProgress - Removal of virtual cluster is already in progress with request\n\n * 409 VirtualClusterRemovalFailed - Request to drop virtual cluster failed. Check if there are active dependent resources.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription." + }, + "202": { + "description": "Updating virtual cluster is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update virtual cluster with tags": { + "$ref": "./examples/VirtualClusterUpdate.json" + } + } + } + } + }, + "definitions": { + "DnsRefreshConfigurationProperties": { + "description": "DNS refresh configuration properties.", + "type": "object", + "properties": { + "status": { + "description": "The status of the DNS refresh operation.", + "enum": [ + "Succeeded", + "Failed" + ], + "type": "string", + "readOnly": true + } + } + }, + "UpdateManagedInstanceDnsServersOperation": { + "description": "A recoverable managed database resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DnsRefreshConfigurationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VirtualClusterListResult": { + "description": "A list of virtual clusters.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/VirtualCluster" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "VirtualClusterProperties": { + "description": "The properties of a virtual cluster.", + "type": "object", + "properties": { + "subnetId": { + "description": "Subnet resource ID for the virtual cluster.", + "type": "string", + "readOnly": true + }, + "family": { + "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here.", + "type": "string" + }, + "childResources": { + "description": "List of resources in this virtual cluster.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "maintenanceConfigurationId": { + "description": "Specifies maintenance configuration id to apply to this virtual cluster.", + "type": "string", + "x-ms-mutability": [ + "read", + "update" + ] + } + } + }, + "VirtualCluster": { + "description": "An Azure SQL virtual cluster.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/VirtualClusterProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VirtualClusterUpdate": { + "description": "An update request for an Azure SQL Database virtual cluster.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/VirtualClusterProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "parameters": { + "VirtualClusterNameParameter": { + "name": "virtualClusterName", + "in": "path", + "description": "The name of the virtual cluster.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/VirtualNetworkRules.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/VirtualNetworkRules.json new file mode 100644 index 000000000000..5787c70ac943 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/VirtualNetworkRules.json @@ -0,0 +1,311 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}": { + "get": { + "tags": [ + "VirtualNetworkRules" + ], + "description": "Gets a virtual network rule.", + "operationId": "VirtualNetworkRules_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "virtualNetworkRuleName", + "in": "path", + "description": "The name of the virtual network rule.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified virtual network rule.", + "schema": { + "$ref": "#/definitions/VirtualNetworkRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a virtual network rule": { + "$ref": "./examples/VirtualNetworkRulesGet.json" + } + } + }, + "put": { + "tags": [ + "VirtualNetworkRules" + ], + "description": "Creates or updates an existing virtual network rule.", + "operationId": "VirtualNetworkRules_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "virtualNetworkRuleName", + "in": "path", + "description": "The name of the virtual network rule.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested virtual Network Rule Resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualNetworkRule" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated a virtual network rule.", + "schema": { + "$ref": "#/definitions/VirtualNetworkRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 NullVirtualNetworkRequest - Virtual Network Request is Null\n\n * 400 NullVirtualNetworkRequestParameters - Virtual Network Request Parameters are Null\n\n * 400 FirewallChangesDeniedBecausePublicEndpointDisabled - Unable to create or modify firewall rules when public network access for the server is disabled. (https://docs.microsoft.com/en-us/azure/azure-sql/database/connectivity-settings#deny-public-network-access)\n\n * 400 VirtualNetworkRuleBadRequest - Azure SQL Server Virtual Network Rule encountered an user error\n\n * 400 VirtualNetworkRuleWithFailoverGroupsNotSupported - Virtual network firewall rules are not currently supported on servers with failover groups configured with automatic failover policy. Please configure the failover groups on the server with manual failover policy.\n\n * 400 NullVirtualNetworkSubnetId - The Virtual Network Subnet Id is null\n\n * 403 VirtualNetworkRuleAccessDenied - Azure SQL Server Virtual Network Rule encountered permissions error\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 VirtualNetworkRuleNotEnabled - Azure SQL Server Virtual Network Rule feature is not enabled\n\n * 404 VirtualNetworkRuleResourceNotFound - Azure SQL Server Virtual Network Rule encountered a resource not found error\n\n * 404 VirtualNetworkRuleSubscriptionNotFound - Azure SQL Server Virtual Network Subscription id not found or is in disabled state \n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 504 VirtualNetworkRuleTimedOut - Azure SQL Server Virtual Network Rule encountered a timeout" + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created a virtual network rule.", + "schema": { + "$ref": "#/definitions/VirtualNetworkRule" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or update a virtual network rule": { + "$ref": "./examples/VirtualNetworkRulesCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "VirtualNetworkRules" + ], + "description": "Deletes the virtual network rule with the given name.", + "operationId": "VirtualNetworkRules_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "virtualNetworkRuleName", + "in": "path", + "description": "The name of the virtual network rule.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the virtual network rule." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 NullVirtualNetworkRequest - Virtual Network Request is Null\n\n * 400 NullVirtualNetworkRequestParameters - Virtual Network Request Parameters are Null\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified virtual network rule does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a virtual network rule": { + "$ref": "./examples/VirtualNetworkRulesDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules": { + "get": { + "tags": [ + "VirtualNetworkRules" + ], + "description": "Gets a list of virtual network rules in a server.", + "operationId": "VirtualNetworkRules_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of virtual network rules.", + "schema": { + "$ref": "#/definitions/VirtualNetworkRuleListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List virtual network rules": { + "$ref": "./examples/VirtualNetworkRulesList.json" + } + } + } + } + }, + "definitions": { + "VirtualNetworkRuleProperties": { + "description": "Properties of a virtual network rule.", + "required": [ + "virtualNetworkSubnetId" + ], + "type": "object", + "properties": { + "virtualNetworkSubnetId": { + "description": "The ARM resource id of the virtual network subnet.", + "type": "string" + }, + "ignoreMissingVnetServiceEndpoint": { + "description": "Create firewall rule before the virtual network has vnet service endpoint enabled.", + "type": "boolean" + }, + "state": { + "description": "Virtual Network Rule State", + "enum": [ + "Initializing", + "InProgress", + "Ready", + "Failed", + "Deleting", + "Unknown" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VirtualNetworkRuleState", + "modelAsString": true + } + } + } + }, + "VirtualNetworkRule": { + "description": "A virtual network rule.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/VirtualNetworkRuleProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VirtualNetworkRuleListResult": { + "description": "A list of virtual network rules.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/VirtualNetworkRule" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/WorkloadClassifiers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/WorkloadClassifiers.json new file mode 100644 index 000000000000..3c7b2c0de4fc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/WorkloadClassifiers.json @@ -0,0 +1,361 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}": { + "get": { + "tags": [ + "WorkloadClassifiers" + ], + "description": "Gets a workload classifier", + "operationId": "WorkloadClassifiers_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group from which to receive the classifier from.", + "required": true, + "type": "string" + }, + { + "name": "workloadClassifierName", + "in": "path", + "description": "The name of the workload classifier.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specifies workload classifier.", + "schema": { + "$ref": "#/definitions/WorkloadClassifier" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Gets a workload classifier for a data warehouse": { + "$ref": "./examples/GetWorkloadClassifier.json" + } + } + }, + "put": { + "tags": [ + "WorkloadClassifiers" + ], + "description": "Creates or updates a workload classifier.", + "operationId": "WorkloadClassifiers_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group from which to receive the classifier from.", + "required": true, + "type": "string" + }, + { + "name": "workloadClassifierName", + "in": "path", + "description": "The name of the workload classifier to create/update.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The properties of the workload classifier.", + "required": true, + "schema": { + "$ref": "#/definitions/WorkloadClassifier" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the workload classifier.", + "schema": { + "$ref": "#/definitions/WorkloadClassifier" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidMemberNameParameter - Invalid member name parameter for this workload classifier.\n\n * 400 InvalidStartTimeAndEndTimeParameters - Invalid start time and end time parameters for the workload classifier.\n\n * 400 InvalidImportanceParameter - Importance must be one of the following strings: Low, Below_Normal, Normal, Above_Normal, High.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Create or update for the workload classifier is in progress." + }, + "201": { + "description": "Successfully created the workload classifier.", + "schema": { + "$ref": "#/definitions/WorkloadClassifier" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a workload group with the required properties specified.": { + "$ref": "./examples/CreateOrUpdateWorkloadClassifierMin.json" + }, + "Create a workload group with all properties specified.": { + "$ref": "./examples/CreateOrUpdateWorkloadClassifierMax.json" + } + } + }, + "delete": { + "tags": [ + "WorkloadClassifiers" + ], + "description": "Deletes a workload classifier.", + "operationId": "WorkloadClassifiers_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group from which to receive the classifier from.", + "required": true, + "type": "string" + }, + { + "name": "workloadClassifierName", + "in": "path", + "description": "The name of the workload classifier to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the workload classifier." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Deleting the workload classifier is in progress." + }, + "204": { + "description": "The specified workload classifier does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a workload classifier": { + "$ref": "./examples/DeleteWorkloadClassifier.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers": { + "get": { + "tags": [ + "WorkloadClassifiers" + ], + "description": "Gets the list of workload classifiers for a workload group", + "operationId": "WorkloadClassifiers_ListByWorkloadGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group from which to receive the classifiers from.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of workload groups.", + "schema": { + "$ref": "#/definitions/WorkloadClassifierListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the list of workload classifiers for a workload group": { + "$ref": "./examples/GetWorkloadClassifierList.json" + } + } + } + } + }, + "definitions": { + "WorkloadClassifierProperties": { + "description": "Workload classifier definition. For more information look at sys.workload_management_workload_classifiers (DMV).", + "required": [ + "memberName" + ], + "type": "object", + "properties": { + "memberName": { + "description": "The workload classifier member name.", + "type": "string" + }, + "label": { + "description": "The workload classifier label.", + "type": "string" + }, + "context": { + "description": "The workload classifier context.", + "type": "string" + }, + "startTime": { + "description": "The workload classifier start time for classification.", + "type": "string" + }, + "endTime": { + "description": "The workload classifier end time for classification.", + "type": "string" + }, + "importance": { + "description": "The workload classifier importance.", + "type": "string" + } + } + }, + "WorkloadClassifier": { + "description": "Workload classifier operations for a data warehouse", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/WorkloadClassifierProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "WorkloadClassifierListResult": { + "description": "A list of workload classifiers for a workload group.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/WorkloadClassifier" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/WorkloadGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/WorkloadGroups.json new file mode 100644 index 000000000000..96de35c2c31c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/WorkloadGroups.json @@ -0,0 +1,340 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}": { + "get": { + "tags": [ + "WorkloadGroups" + ], + "description": "Gets a workload group", + "operationId": "WorkloadGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specifies workload group.", + "schema": { + "$ref": "#/definitions/WorkloadGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Gets a workload group for a data warehouse": { + "$ref": "./examples/GetWorkloadGroup.json" + } + } + }, + "put": { + "tags": [ + "WorkloadGroups" + ], + "description": "Creates or updates a workload group.", + "operationId": "WorkloadGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested workload group state.", + "required": true, + "schema": { + "$ref": "#/definitions/WorkloadGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the workload group.", + "schema": { + "$ref": "#/definitions/WorkloadGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidWorkloadGroupNameParameter - Invalid workload group name\n\n * 400 InvalidMinResourcePercentParameter - Invalid min resource percent for this workload group.\n\n * 400 InvalidMinResourcePercentPerRequestParameter - Invalid min resource percent per query for this workload group.\n\n * 400 InvalidMaxResourcePercentParameter - Invalid max resource percent to allocate for this workload group.\n\n * 400 InvalidMaxResourcePercentPerRequestParameter - Invalid max resource percent per query for this workload group.\n\n * 400 InvalidImportanceParameter - Importance must be one of the following strings: Low, Below_Normal, Normal, Above_Normal, High.\n\n * 400 InvalidQueryExecutionTimeoutParameter - Invalid query execution timeout value for this workload group.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Create or update for the workload group accepted." + }, + "201": { + "description": "Successfully created the workload group.", + "schema": { + "$ref": "#/definitions/WorkloadGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a workload group with the required properties specified.": { + "$ref": "./examples/CreateOrUpdateWorkloadGroupMin.json" + }, + "Create a workload group with all properties specified.": { + "$ref": "./examples/CreateOrUpdateWorkloadGroupMax.json" + } + } + }, + "delete": { + "tags": [ + "WorkloadGroups" + ], + "description": "Deletes a workload group.", + "operationId": "WorkloadGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the workload group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Deleting the workload group is in progress." + }, + "204": { + "description": "The specified workload group does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a workload group": { + "$ref": "./examples/DeleteWorkloadGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups": { + "get": { + "tags": [ + "WorkloadGroups" + ], + "description": "Gets the list of workload groups", + "operationId": "WorkloadGroups_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of workload groups.", + "schema": { + "$ref": "#/definitions/WorkloadGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the list of workload groups for a data warehouse": { + "$ref": "./examples/GetWorkloadGroupList.json" + } + } + } + } + }, + "definitions": { + "WorkloadGroupProperties": { + "description": "Workload group definition. For more information look at sys.workload_management_workload_groups (DMV).", + "required": [ + "minResourcePercent", + "maxResourcePercent", + "minResourcePercentPerRequest" + ], + "type": "object", + "properties": { + "minResourcePercent": { + "format": "int32", + "description": "The workload group minimum percentage resource.", + "type": "integer" + }, + "maxResourcePercent": { + "format": "int32", + "description": "The workload group cap percentage resource.", + "type": "integer" + }, + "minResourcePercentPerRequest": { + "format": "double", + "description": "The workload group request minimum grant percentage.", + "type": "number" + }, + "maxResourcePercentPerRequest": { + "format": "double", + "description": "The workload group request maximum grant percentage.", + "type": "number" + }, + "importance": { + "description": "The workload group importance level.", + "type": "string" + }, + "queryExecutionTimeout": { + "format": "int32", + "description": "The workload group query execution timeout.", + "type": "integer" + } + } + }, + "WorkloadGroup": { + "description": "Workload group operations for a data warehouse", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/WorkloadGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "WorkloadGroupListResult": { + "description": "A list of workload groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/WorkloadGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorCreateOrUpdate.json new file mode 100644 index 000000000000..6f79300d9026 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorCreateOrUpdate.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2021-02-01-preview", + "name": "ActiveDirectory", + "parameters": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "activeDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorDelete.json new file mode 100644 index 000000000000..c05fc526ab60 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorGet.json new file mode 100644 index 000000000000..9ed596a339ce --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorList.json new file mode 100644 index 000000000000..c40f9459dfd1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AdministratorList.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json new file mode 100644 index 000000000000..ab9db87e6493 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2021-02-01-preview", + "name": "Default", + "parameters": { + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthDelete.json new file mode 100644 index 000000000000..7cde9df674c2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthGet.json new file mode 100644 index 000000000000..adc1dc52a769 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": true + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthList.json new file mode 100644 index 000000000000..166feafe53b6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/AzureADOnlyAuthList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": true + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelDatabaseOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelDatabaseOperation.json new file mode 100644 index 000000000000..1aa179a22610 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelDatabaseOperation.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-6661", + "databaseName": "testdb", + "operationId": "f779414b-e748-4925-8cfe-c8598f7660ae", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelElasticPoolOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelElasticPoolOperation.json new file mode 100644 index 000000000000..b93cf94b835b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelElasticPoolOperation.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-6661", + "elasticPoolName": "testpool", + "operationId": "f779414b-e748-4925-8cfe-c8598f7660ae", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelJobExecution.json new file mode 100644 index 000000000000..f12a29440f57 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelJobExecution.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelManagedInstanceOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelManagedInstanceOperation.json new file mode 100644 index 000000000000..72c253f6287e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelManagedInstanceOperation.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "operationId": "11111111-1111-1111-1111-111111111111", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json new file mode 100644 index 000000000000..2e87ec83a8d3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2021-02-01-preview", + "parameters": { + "name": "server1", + "type": "Microsoft.Sql/servers" + } + }, + "responses": { + "200": { + "body": { + "name": "server1", + "available": false, + "reason": "AlreadyExists", + "message": "Specified server name is already used" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAvailable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAvailable.json new file mode 100644 index 000000000000..701da5dee6bc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAvailable.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2021-02-01-preview", + "parameters": { + "name": "server1", + "type": "Microsoft.Sql/servers" + } + }, + "responses": { + "200": { + "body": { + "name": "server1", + "available": true + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerInvalid.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerInvalid.json new file mode 100644 index 000000000000..f604ffe3b5bf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerInvalid.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2021-02-01-preview", + "parameters": { + "name": "SERVER1", + "type": "Microsoft.Sql/servers" + } + }, + "responses": { + "200": { + "body": { + "name": "SERVER1", + "available": false, + "reason": "Invalid", + "message": "Specified server name contains unsupported characters or is too long. Server name must be no longer than 63 characters long, contain only lower-case characters or digits, cannot contain '.' or '_' characters and can't start or end with '-' character." + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelCreateMax.json new file mode 100644 index 000000000000..4ee735311f45 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelCreateMax.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "Low" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "Medium" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelDelete.json new file mode 100644 index 000000000000..cd3c412e1c9a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelGet.json new file mode 100644 index 000000000000..61d69d4b4d35 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnSensitivityLabelGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnsListByDatabaseMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnsListByDatabaseMax.json new file mode 100644 index 000000000000..c055dc9a71fc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnsListByDatabaseMax.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview", + "schema": [ + "dbo" + ], + "table": [ + "customer", + "address" + ], + "column": [ + "username" + ], + "orderBy": [ + "schema asc", + "table", + "column desc" + ], + "$skip": "5", + "$top": "50" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "columnType": "nvarchar", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/customer/columns/username", + "name": "username", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnsListByDatabaseMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnsListByDatabaseMin.json new file mode 100644 index 000000000000..97aabd5977fe --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ColumnsListByDatabaseMin.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "columnType": "int", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1", + "name": "col1", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns" + }, + { + "properties": { + "columnType": "bit", + "temporalType": "SystemVersionedTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2", + "name": "col2", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json new file mode 100644 index 000000000000..73ef632f3b0a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "requestedBackupStorageRedundancy": "Zone" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Zone", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Zone", + "requestedServiceObjectiveName": "S0", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Zone", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Zone", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "isLedgerOn": false, + "isInfraEncryptionEnabled": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseCopyMode.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseCopyMode.json new file mode 100644 index 000000000000..16fb33de6f35 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseCopyMode.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "dbcopy", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "S0", + "tier": "Standard" + }, + "properties": { + "createMode": "Copy", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy", + "name": "dbcopy", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy", + "name": "dbcopy", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseDefaultMode.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseDefaultMode.json new file mode 100644 index 000000000000..4155a4bdfabf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseDefaultMode.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "S0", + "tier": "Standard" + }, + "properties": { + "createMode": "Default", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824 + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseLedger.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseLedger.json new file mode 100644 index 000000000000..a8f371f55075 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseLedger.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "isLedgerOn": true + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S0", + "currentBackupStorageRedundancy": "Geo", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "isLedgerOn": true + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Zone", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Zone", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json new file mode 100644 index 000000000000..09c6192c9963 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "S2", + "tier": "Standard" + }, + "properties": { + "createMode": "Default", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "S2", + "tier": "Standard" + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "earliestRestoreDate": "2020-08-29T06:41:18.283Z", + "readScale": "Disabled", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 50 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "S2", + "tier": "Standard" + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "earliestRestoreDate": "2020-08-29T06:41:18.283Z", + "readScale": "Disabled", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 50 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseMin.json new file mode 100644 index 000000000000..41e57ead93a3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseMin.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S0", + "currentBackupStorageRedundancy": "Geo", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseNamedReplica.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseNamedReplica.json new file mode 100644 index 000000000000..af77a9b0febe --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseNamedReplica.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "capacity": 2 + }, + "properties": { + "createMode": "Secondary", + "secondaryType": "Named", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/primarydb" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user,vcore,hyperscale", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": -1, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 2 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "HS_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "HS_Gen4_2", + "highAvailabilityReplicaCount": 0, + "licenseType": "LicenseIncluded", + "secondaryType": "Named", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user,vcore,hyperscale", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": -1, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 2 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "HS_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "HS_Gen4_2", + "highAvailabilityReplicaCount": 0, + "licenseType": "LicenseIncluded", + "secondaryType": "Named", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabasePITRMode.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabasePITRMode.json new file mode 100644 index 000000000000..1ed49a9f4119 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabasePITRMode.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "dbpitr", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "createMode": "PointInTimeRestore", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "restorePointInTime": "2020-10-22T05:35:31.503Z" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "2463ef48-53e2-4c26-9781-2d7138080bfd", + "creationDate": "2020-10-23T20:31:35.807Z", + "currentServiceObjectiveName": "S0", + "requestedServiceObjectiveName": "S0", + "defaultSecondaryLocation": "SoutheastAsia", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "earliestRestoreDate": "2020-10-23T20:47:37Z", + "readScale": "Disabled", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false + }, + "location": "SoutheastAsia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr", + "name": "dbpitr", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "2463ef48-53e2-4c26-9781-2d7138080bfd", + "creationDate": "2020-10-23T20:31:35.807Z", + "currentServiceObjectiveName": "S0", + "requestedServiceObjectiveName": "S0", + "defaultSecondaryLocation": "SoutheastAsia", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "earliestRestoreDate": "2020-10-23T20:47:37Z", + "readScale": "Disabled", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false + }, + "location": "SoutheastAsia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr", + "name": "dbpitr", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseSecondaryMode.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseSecondaryMode.json new file mode 100644 index 000000000000..b129a3fcb932 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateDatabaseSecondaryMode.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "S0", + "tier": "Standard" + }, + "properties": { + "createMode": "Secondary", + "secondaryType": "Geo", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "secondaryType": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "secondaryType": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateJobExecution.json new file mode 100644 index 000000000000..f9729e8d86bb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateJobExecution.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2016-09-23T01:00:00Z", + "currentAttempts": 0, + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateDatabaseExtensions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateDatabaseExtensions.json new file mode 100644 index 000000000000..e289ca1e3b3d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateDatabaseExtensions.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "a1c0814d-3c18-4e1e-a247-c128c12b1677", + "resourceGroupName": "rg_20cbe0f0-c2d9-4522-9177-5469aad53029", + "serverName": "srv_1ffd1cf8-9951-47fb-807d-a9c384763849", + "databaseName": "878e303f-1ea0-4f17-aa3d-a22ac5e9da08", + "extensionName": "polybaseimport", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "operationMode": "PolybaseImport", + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "storageUri": "https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml" + } + } + }, + "responses": { + "202": {}, + "200": { + "body": { + "properties": { + "requestId": "10000000-0000-0000-0000-000000000002", + "requestType": "PolybaseImport", + "lastModifiedTime": "lastModifiedTime", + "serverName": "srv_1ffd1cf8-9951-47fb-807d-a9c384763849", + "databaseName": "878e303f-1ea0-4f17-aa3d-a22ac5e9da08", + "status": "succeeded" + }, + "id": "10000000-0000-0000-0000-000000000002", + "name": "10000000-0000-0000-0000-000000000002", + "type": "Microsoft.Sql/servers/databases/extensions" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateInstancePoolMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateInstancePoolMax.json new file mode 100644 index 000000000000..2f58fd7632f8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateInstancePoolMax.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2021-02-01-preview", + "parameters": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + }, + "201": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateInstancePoolMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateInstancePoolMin.json new file mode 100644 index 000000000000..27cc43f0083c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateInstancePoolMin.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2021-02-01-preview", + "parameters": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "location": "japaneast", + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": {}, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + }, + "201": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": {}, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobAgent.json new file mode 100644 index 000000000000..faf9a255a283 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobAgent.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "Agent", + "capacity": 100 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "Agent", + "capacity": 100 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobCredential.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobCredential.json new file mode 100644 index 000000000000..009425cf38b3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobCredential.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "credentialName": "cred1", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "username": "myuser", + "password": "" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name": "cred1", + "type": "Microsoft.Sql/servers/jobAccounts/credentials", + "properties": { + "username": "myuser" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name": "cred1", + "type": "Microsoft.Sql/servers/jobAccounts/credentials", + "properties": { + "username": "myuser" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobExecution.json new file mode 100644 index 000000000000..e8715791991a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobExecution.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-12-18T19:02:00.8707045Z", + "currentAttempts": 0, + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + }, + "201": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-05-04T19:02:00.8707045Z", + "currentAttempts": 0, + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobMax.json new file mode 100644 index 000000000000..8ecc4cd126b5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobMax.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "description": "my favourite job", + "schedule": { + "startTime": "2015-09-24T18:30:01Z", + "endTime": "2015-09-24T23:59:59Z", + "type": "Recurring", + "interval": "PT5M", + "enabled": true + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "my favourite job", + "version": 0, + "schedule": { + "startTime": "2015-09-24T18:30:01Z", + "endTime": "2015-09-24T23:59:59Z", + "type": "Recurring", + "interval": "PT5M", + "enabled": true + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "my favourite job", + "version": 0, + "schedule": { + "startTime": "2015-09-24T18:30:01Z", + "endTime": "2015-09-24T23:59:59Z", + "type": "Recurring", + "interval": "PT5M", + "enabled": true + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobMin.json new file mode 100644 index 000000000000..78a6461aecda --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobMin.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2021-02-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "", + "version": 0, + "schedule": { + "startTime": "0001-01-01T00:00:00Z", + "endTime": "9999-12-31T11:59:59Z", + "type": "Once", + "enabled": false + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "", + "version": 0, + "schedule": { + "startTime": "0001-01-01T00:00:00Z", + "endTime": "9999-12-31T11:59:59Z", + "type": "Once", + "enabled": false + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobStepMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobStepMax.json new file mode 100644 index 000000000000..be6ad7b26b81 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobStepMax.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "stepName": "step1", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + }, + "201": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobStepMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobStepMin.json new file mode 100644 index 000000000000..f9d8d8c73735 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobStepMin.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "stepName": "step1", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0", + "action": { + "value": "select 1" + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 1" + }, + "executionOptions": { + "timeoutSeconds": 43200, + "retryAttempts": 10, + "initialRetryIntervalSeconds": 1, + "maximumRetryIntervalSeconds": 120, + "retryIntervalBackoffMultiplier": 2.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + }, + "201": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 1" + }, + "executionOptions": { + "timeoutSeconds": 43200, + "retryAttempts": 10, + "initialRetryIntervalSeconds": 1, + "maximumRetryIntervalSeconds": 120, + "retryIntervalBackoffMultiplier": 2.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json new file mode 100644 index 000000000000..4f182ed89586 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "targetGroupName": "targetGroup1", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "members": [ + { + "membershipType": "Exclude", + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + }, + { + "membershipType": "Include", + "type": "SqlServer", + "serverName": "server1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlElasticPool", + "serverName": "server2", + "elasticPoolName": "pool1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlShardMap", + "serverName": "server3", + "shardMapName": "shardMap1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "members": [ + { + "membershipType": "Exclude", + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + }, + { + "membershipType": "Include", + "type": "SqlServer", + "serverName": "server1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlElasticPool", + "serverName": "server2", + "elasticPoolName": "pool1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlShardMap", + "serverName": "server3", + "shardMapName": "shardMap1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + }, + "201": { + "body": { + "properties": { + "members": [ + { + "membershipType": "Exclude", + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + }, + { + "membershipType": "Include", + "type": "SqlServer", + "serverName": "server1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlElasticPool", + "serverName": "server2", + "elasticPoolName": "pool1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlShardMap", + "serverName": "server3", + "shardMapName": "shardMap1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json new file mode 100644 index 000000000000..d94319ff8a16 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "targetGroupName": "targetGroup1", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "members": [] + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "members": [] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + }, + "201": { + "body": { + "properties": { + "members": [] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateMaintenanceWindows.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateMaintenanceWindows.json new file mode 100644 index 000000000000..05fe0cb1ff91 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateMaintenanceWindows.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdwdb", + "maintenanceWindowName": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "timeRanges": [ + { + "dayOfWeek": "Saturday", + "startTime": "00:00:00", + "duration": "PT60M" + } + ] + } + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json new file mode 100644 index 000000000000..305f702cf97c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "workloadClassifierName": "wlm_workloadclassifier", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "memberName": "dbo", + "label": "test_label", + "context": "test_context", + "startTime": "12:00", + "endTime": "14:00", + "importance": "high" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "memberName": "dbo", + "label": "test_label", + "context": "test_context", + "startTime": "12:00", + "endTime": "14:00", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier", + "name": "wlm_workloadclassifier", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + }, + "201": { + "body": { + "properties": { + "memberName": "dbo", + "label": "test_label", + "context": "test_context", + "startTime": "12:00", + "endTime": "14:00", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier", + "name": "wlm_workloadclassifier", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json new file mode 100644 index 000000000000..5650c8b46089 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "workloadClassifierName": "wlm_workloadclassifier", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "memberName": "dbo" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "memberName": "dbo", + "label": "", + "context": "", + "startTime": "", + "endTime": "", + "importance": "" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier", + "name": "wlm_workloadclassifier", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + }, + "201": { + "body": { + "properties": { + "memberName": "dbo", + "label": "", + "context": "", + "startTime": "", + "endTime": "", + "importance": "" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier", + "name": "wlm_workloadclassifier", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json new file mode 100644 index 000000000000..674f8df8803a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "smallrc", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + }, + "201": { + "body": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json new file mode 100644 index 000000000000..ce33c86267f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "smallrc", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0 + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + }, + "201": { + "body": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json new file mode 100644 index 000000000000..9dac00d7d9e2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "BC", + "family": "Gen4", + "capacity": 2 + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "readScale": "Enabled", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "readScale": "Enabled", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "isLedgerOn": false, + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json new file mode 100644 index 000000000000..143666a1c507 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "BC_Gen4", + "capacity": 2 + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "readScale": "Enabled", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "readScale": "Enabled", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DataWarehouseRestorePointsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DataWarehouseRestorePointsGet.json new file mode 100644 index 000000000000..634df7c1828a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DataWarehouseRestorePointsGet.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "restorePointName": "131546477590000000", + "location": "japaneast", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000", + "name": "131546477590000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-03-10T08:00:00Z", + "restorePointLabel": "mylabel" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json new file mode 100644 index 000000000000..16e791b5cf51 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "location": "japaneast", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000", + "name": "131546477590000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-03-10T08:00:00Z", + "restorePointLabel": "mylabel1" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131553636140000000", + "name": "131553636140000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-11-17T03:40:14Z", + "restorePointLabel": "mylabel2" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131553619750000000", + "name": "131553619750000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-11-17T03:12:55Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorGet.json new file mode 100644 index 000000000000..9a82ad8d945d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "recommendationsStatus": "Ok", + "lastChecked": "2017-06-20T00:24:39Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorList.json new file mode 100644 index 000000000000..626dc786c189 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorList.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "Ok", + "lastChecked": "2017-06-20T00:24:39Z" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex", + "name": "DropIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "DbSeemsTuned", + "lastChecked": "2017-06-19T20:42:43Z" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization", + "name": "DbParameterization", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Enabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "DbParameterizationIssue", + "lastChecked": "2017-06-19T19:13:03Z" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue", + "name": "SchemaIssue", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PublicPreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendationsStatus": "SchemaIsNotConsistent", + "lastChecked": "2017-06-20T14:00:32Z" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/ForceLastGoodPlan", + "name": "ForceLastGoodPlan", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PrivatePreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + } + ] + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorUpdate.json new file mode 100644 index 000000000000..69a7bb765be6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAdvisorUpdate.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "autoExecuteStatus": "Disabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "recommendationsStatus": "Ok", + "lastChecked": "2017-06-20T00:24:39Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAuditingSettingsList.json new file mode 100644 index 000000000000..bd0d1a02317b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAuditingSettingsList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-6852", + "serverName": "blobauditingtest-2080", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningGet.json new file mode 100644 index 000000000000..c003091ed672 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningGet.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "databaseName": "db1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "createIndex": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "dropIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json new file mode 100644 index 000000000000..f86018e95678 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "databaseName": "db1", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "desiredState": "Auto", + "options": { + "createIndex": { + "desiredState": "Off" + }, + "dropIndex": { + "desiredState": "On" + }, + "forceLastGoodPlan": { + "desiredState": "Default" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "createIndex": { + "desiredState": "Off", + "actualState": "Off" + }, + "dropIndex": { + "desiredState": "On", + "actualState": "On" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json new file mode 100644 index 000000000000..3d7c7c077759 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "databaseName": "db1", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "desiredState": "Auto" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "createIndex": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "dropIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json new file mode 100644 index 000000000000..13d7600ee8b3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true, + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true, + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingCreateMax.json new file mode 100644 index 000000000000..1d1e1ef3d459 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingCreateMax.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "isAzureMonitorTargetEnabled": true + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "isAzureMonitorTargetEnabled": true + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingCreateMin.json new file mode 100644 index 000000000000..e323dbaa4ac2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingCreateMin.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingGet.json new file mode 100644 index 000000000000..5f08762ed57d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseBlobAuditingGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-6852", + "serverName": "blobauditingtest-2080", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseColumnGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseColumnGet.json new file mode 100644 index 000000000000..4b6d715be98e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseColumnGet.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "columnName": "column1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/column1", + "name": "column1", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns", + "properties": { + "columnType": "bit", + "temporalType": "SystemVersionedTemporalTable", + "memoryOptimized": false, + "isComputed": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseColumnListByTable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseColumnListByTable.json new file mode 100644 index 000000000000..649e3de894e5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseColumnListByTable.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1", + "name": "col1", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns", + "properties": { + "columnType": "nvarchar", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2", + "name": "col2", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns", + "properties": { + "columnType": "bit", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseExtendedAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseExtendedAuditingSettingsList.json new file mode 100644 index 000000000000..3701b5afb40a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseExtendedAuditingSettingsList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-6852", + "serverName": "blobauditingtest-2080", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionGet.json new file mode 100644 index 000000000000..33128ee7c761 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionGet.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "recommendedActionName": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:04Z", + "lastRefresh": "2017-03-01T14:38:04Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 1440.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 209.3125 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money],[Power]", + "includedColumns": "[Hour], [System], [LastChanged]" + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionList.json new file mode 100644 index 000000000000..346ba3fbfe92 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionList.json @@ -0,0 +1,197 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:04Z", + "lastRefresh": "2017-03-01T14:38:04Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 1440.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 209.3125 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money],[Power]", + "includedColumns": "[Hour], [System], [LastChanged]" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "name": "IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "User", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC] ON [dbo].[DataPoints]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 5040.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 120.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.9 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.3175 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 12.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 1.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 130.742187 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money]", + "includedColumns": "[Power],[Pineapple]", + "indexActionStartTime": "2017-03-01T14:38:05.337", + "indexActionDuration": "00:01:00" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "name": "IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE] ON [dbo].[Employees] ([City], [State]) INCLUDE ([Postal]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 17.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 128.0 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[Employees]", + "indexColumns": "[City], [State]", + "includedColumns": "[Postal]" + } + } + } + ] + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionListExpand.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionListExpand.json new file mode 100644 index 000000000000..936f82454044 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionListExpand.json @@ -0,0 +1,625 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "api-version": "2021-02-01-preview", + "$expand": "recommendedActions" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "Ok", + "lastChecked": "2017-06-20T16:39:16Z", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:04Z", + "lastRefresh": "2017-03-01T14:38:04Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-06-20T15:15:40Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 1440.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 209.3125 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money],[Power]", + "includedColumns": "[Hour], [System], [LastChanged]" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "name": "IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "User", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC] ON [dbo].[DataPoints]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 5040.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 120.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.9 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.3175 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 12.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 1.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 130.742187 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money]", + "includedColumns": "[Power],[Pineapple]", + "indexActionStartTime": "2017-03-01T14:38:05.337", + "indexActionDuration": "00:01:00" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "name": "IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE] ON [dbo].[Employees] ([City], [State]) INCLUDE ([Postal]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 17.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 128.0 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[Employees]", + "indexColumns": "[City], [State]", + "includedColumns": "[Postal]" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex", + "name": "DropIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "DbSeemsTuned", + "lastChecked": "2017-06-19T20:42:43Z", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B", + "name": "IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Unused", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-03-23T14:14:35Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-23T14:14:35Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [IX_FF] ON [CRM].[DataPoints1]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 645.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "IX_FF", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints1]", + "indexColumns": "[Protocol],[SessionId]", + "includedColumns": "[Apple]" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A", + "name": "IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [MyIndex123] ON [CRM].[DataPoints1]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 803.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 144.6875 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "MyIndex123", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints1]", + "indexColumns": "[Cookies],[SessionId]", + "includedColumns": "[Apple]" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints2]_E4B21F229379807E531A", + "name": "IR_[CRM]_[DataPoints2]_E4B21F229379807E531A", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "User", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [MyIndex321] ON [CRM].[DataPoints2] ([Cookies],[SessionId],[Protocol]) INCLUDE ([Apple]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 705.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": -342.0 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "MyIndex321", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints2]", + "indexColumns": "[Cookies],[SessionId],[Protocol]", + "includedColumns": "[Apple]", + "indexActionStartTime": "2017-03-01T14:38:05.697", + "indexActionDuration": "00:01:00" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B", + "name": "IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "System", + "lastModified": "2017-02-28T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [IX_FF] ON [dbo].[FactFinance] ([FinanceKey],[DateKey]) INCLUDE ([OrganizationKey]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 705.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": -342.0 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "IX_FF", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[FactFinance]", + "indexColumns": "[FinanceKey],[DateKey]", + "includedColumns": "[OrganizationKey]", + "indexActionStartTime": "2017-03-01T14:38:05.837", + "indexActionDuration": "00:01:00" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization", + "name": "DbParameterization", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Enabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "DbParameterizationIssue", + "lastChecked": "2017-06-19T19:13:03Z", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization/recommendedActions/ForceDbParameterization", + "name": "ForceDbParameterization", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:37:44Z", + "lastRefresh": "2017-03-01T14:37:44Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-05-11T15:08:31Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-05-11T15:08:31Z", + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "ALTER DATABASE [IndexAdvisor_test_3] SET PARAMETERIZATION FORCED" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "CpuSavings", + "unit": "Percent", + "changeValueAbsolute": 22.5613696939135 + }, + { + "dimensionName": "QueryDurationDecrease", + "unit": "secs", + "changeValueAbsolute": 0.701823681806341 + } + ], + "observedImpact": [], + "timeSeries": [] + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue", + "name": "SchemaIssue", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PublicPreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendationsStatus": "SchemaIsNotConsistent", + "lastChecked": "2017-06-20T18:50:21Z", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue/recommendedActions/SchemaProblem_1A258C5714A7410C9D23", + "name": "SchemaProblem_1A258C5714A7410C9D23", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "SchemaProblem", + "validSince": "2017-03-01T14:37:48Z", + "lastRefresh": "2017-06-07T22:19:53Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:37:48Z" + }, + "isExecutableAction": false, + "isRevertableAction": false, + "isArchivedAction": false, + "score": 3, + "implementationDetails": {}, + "errorDetails": {}, + "estimatedImpact": [], + "observedImpact": [], + "timeSeries": [], + "details": { + "sqlErrorNumber": 208, + "sqlErrorMessage": "Invalid object name 'dbo.Companies'.", + "sqlErrorCount": 342482 + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/ForceLastGoodPlan", + "name": "ForceLastGoodPlan", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PrivatePreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendedActions": [] + } + } + ] + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionUpdate.json new file mode 100644 index 000000000000..43f4a93c14a3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRecommendedActionUpdate.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "recommendedActionName": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": { + "currentValue": "Pending" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:04Z", + "lastRefresh": "2017-03-01T14:38:04Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "User", + "lastModified": "2017-06-20T15:11:15Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-06-20T15:11:15Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 1440.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 209.3125 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money],[Power]", + "includedColumns": "[Hour], [System], [LastChanged]" + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsDelete.json new file mode 100644 index 000000000000..1df305126008 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "restorePointName": "131546477590000000", + "location": "japaneast", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsGet.json new file mode 100644 index 000000000000..e5284c72cbf7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "restorePointName": "131546477590000000", + "location": "japaneast", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/ContinuousRestorePoint", + "name": "ContinuousRestorePoint", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "CONTINUOUS", + "earliestRestoreDate": "2017-03-10T08:00:00Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsListByDatabase.json new file mode 100644 index 000000000000..50fb29862a4d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsListByDatabase.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6730", + "serverName": "sqlcrudtest-9007", + "databaseName": "3481", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-9007/databases/3481/restorepoints/ContinuousRestorePoint", + "name": "ContinuousRestorePoint", + "location": "West US", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "properties": { + "restorePointType": "CONTINUOUS", + "earliestRestoreDate": "2017-06-12T00:00:00Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsPost.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsPost.json new file mode 100644 index 000000000000..792573a0c818 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseRestorePointsPost.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "location": "japaneast", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "restorePointLabel": "mylabel" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000", + "name": "131546477590000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-03-10T08:00:00Z", + "restorePointLabel": "mylabel" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000", + "name": "131546477590000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "southeastasia", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-03-10T08:00:00Z", + "restorePointLabel": "mylabel" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSchemaGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSchemaGet.json new file mode 100644 index 000000000000..4aa52977ef95 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSchemaGet.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/servers/databases/schemas" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSchemaListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSchemaListByDatabase.json new file mode 100644 index 000000000000..925363f0ea0f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSchemaListByDatabase.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/servers/databases/schemas" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/schema2", + "name": "schema2", + "type": "Microsoft.Sql/servers/databases/schemas" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertCreateMax.json new file mode 100644 index 000000000000..ccc2ccd2814e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertCreateMax.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@microsoft.com", + "user@microsoft.com" + ], + "disabledAlerts": [ + "Sql_Injection", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@microsoft.com", + "user@microsoft.com" + ], + "disabledAlerts": [ + "Sql_Injection", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@microsoft.com", + "user@microsoft.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertCreateMin.json new file mode 100644 index 000000000000..0d387452e468 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertCreateMin.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [], + "disabledAlerts": [], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [], + "disabledAlerts": [], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertGet.json new file mode 100644 index 000000000000..87aef7f2d7a2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertGet.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-6852", + "serverName": "securityalert-2080", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/servers/securityalert-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com", + "user@consoto.com" + ], + "disabledAlerts": [ + "Usage_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "creationTime": "2020-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertListByDatabase.json new file mode 100644 index 000000000000..3f5b5b2124ab --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseSecurityAlertListByDatabase.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-6852", + "serverName": "securityalert-2080", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/servers/securityalert-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com", + "user@consoto.com" + ], + "disabledAlerts": [ + "Usage_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "", + "creationTime": "2020-04-03T04:41:33.937Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseTableGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseTableGet.json new file mode 100644 index 000000000000..a1704e596bca --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseTableGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/servers/databases/schemas/tables" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseTableListBySchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseTableListBySchema.json new file mode 100644 index 000000000000..725073fa94c2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseTableListBySchema.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/servers/databases/schemas/tables" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table2", + "name": "table2", + "type": "Microsoft.Sql/servers/databases/schemas/tables" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json new file mode 100644 index 000000000000..b38a3aa9a4cd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json new file mode 100644 index 000000000000..d4f9bc8a7fc4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json new file mode 100644 index 000000000000..e8333783e78e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..8589330936d0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..c751694ff75a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json new file mode 100644 index 000000000000..ca770f8bf0dd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json new file mode 100644 index 000000000000..b7a7edfc90d5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "baselineName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json new file mode 100644 index 000000000000..b17bb6cbe630 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "baselineName": "default", + "ruleId": "VA1001", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json new file mode 100644 index 000000000000..29346a8fc9d0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "baselineName": "master", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json new file mode 100644 index 000000000000..386d826abdf2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4799", + "serverName": "vulnerabilityassessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2021-02-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json new file mode 100644 index 000000000000..1e112268dc9a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json new file mode 100644 index 000000000000..3eae09546ac4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan002", + "name": "scan002", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan003", + "name": "scan003", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "FailedToRun", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [ + { + "code": "StorageNotFound", + "message": "Storage not found" + } + ], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 0 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json new file mode 100644 index 000000000000..ca7fd0d09c3c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan01", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteDatabase.json new file mode 100644 index 000000000000..1b80f863f31d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteDatabase.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "204": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteInstancePool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteInstancePool.json new file mode 100644 index 000000000000..0a0b9a4f35f3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteInstancePool.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJob.json new file mode 100644 index 000000000000..49b1056a5c04 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJob.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobAgent.json new file mode 100644 index 000000000000..bf8f0d03b3f7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobAgent.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobCredential.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobCredential.json new file mode 100644 index 000000000000..ae121813660f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobCredential.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "credentialName": "cred1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobStep.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobStep.json new file mode 100644 index 000000000000..fb539d1e7e80 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobStep.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "stepName": "step1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobTargetGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobTargetGroup.json new file mode 100644 index 000000000000..8e91baea3b22 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteJobTargetGroup.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "targetGroupName": "targetGroup1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteWorkloadClassifier.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteWorkloadClassifier.json new file mode 100644 index 000000000000..81db98f5a1ea --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteWorkloadClassifier.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "workloadClassifierName": "wlm_workloadclassifier", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteWorkloadGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteWorkloadGroup.json new file mode 100644 index 000000000000..3113e932347d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeleteWorkloadGroup.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerGet.json new file mode 100644 index 000000000000..9c36d01d74e5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "deletedServerName": "sqlcrudtest-d-1414", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414", + "name": "sqlcrudtest-d-1414", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-1414.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-15T11:20:00.345Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerList.json new file mode 100644 index 000000000000..b1adbf04b232 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerList.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414", + "name": "sqlcrudtest-d-1414", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-1414.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-15T20:20:00.345Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-2424", + "name": "sqlcrudtest-d-2424", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-2424.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-13T10:10:00.678Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-2424" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerListBySubscription.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerListBySubscription.json new file mode 100644 index 000000000000..87f88c7c6fb9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerListBySubscription.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414", + "name": "sqlcrudtest-d-1414", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-1414.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-15T20:20:00.345Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-2424", + "name": "sqlcrudtest-d-2424", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-2424.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-13T10:10:00.678Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-2424" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerRecover.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerRecover.json new file mode 100644 index 000000000000..785ffd02aac6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/DeletedServerRecover.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "deletedServerName": "sqlcrudtest-d-1414", + "api-version": "2021-02-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414", + "name": "sqlcrudtest-d-1414", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-1414.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-15T11:20:00.345Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateMax.json new file mode 100644 index 000000000000..59381f631458 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateMax.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "Japan East", + "sku": { + "name": "GP_Gen4_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 2.0 + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_Gen4_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 2.0 + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_Gen4_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 2.0 + } + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateMin.json new file mode 100644 index 000000000000..f4e1ba6b7b97 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateMin.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "Japan East" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "StandardPool", + "tier": "Standard", + "capacity": 100 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 100 + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "StandardPool", + "tier": "Standard", + "capacity": 100 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 100 + } + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json new file mode 100644 index 000000000000..d62fe4afac7c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "Japan East", + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "StandardPool", + "tier": "Standard", + "capacity": 100 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 100 + }, + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "StandardPool", + "tier": "Standard", + "capacity": 100 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 100 + }, + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolDelete.json new file mode 100644 index 000000000000..84253374c4eb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-3129", + "serverName": "sqlcrudtest-228", + "elasticPoolName": "sqlcrudtest-3851", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "204": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolGet.json new file mode 100644 index 000000000000..6948dca90d4c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolGet.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_Gen5_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-10-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 1.0 + }, + "zoneRedundant": true, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolListByServer.json new file mode 100644 index 000000000000..7c3fe4d37209 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolListByServer.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-2729", + "name": "sqlcrudtest-2729", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_Gen4_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:27:21.32Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 1.0 + }, + "zoneRedundant": true, + "licenseType": "LicenseIncluded" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-3191", + "name": "sqlcrudtest-3191", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BasicPool", + "tier": "Basic", + "capacity": 50 + }, + "properties": { + "creationDate": "2017-02-10T01:26:26.45Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 5 + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BasicPool", + "tier": "Basic", + "capacity": 50 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 5 + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json new file mode 100644 index 000000000000..bcfad9fe8153 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BasicPool", + "tier": "Basic", + "capacity": 50 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 5 + }, + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateMax.json new file mode 100644 index 000000000000..0afc2948819b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateMax.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2021-02-01-preview", + "parameters": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "properties": { + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 1.0 + }, + "zoneRedundant": true, + "licenseType": "LicenseIncluded" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:27:21.32Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 1.0 + }, + "zoneRedundant": true, + "licenseType": "LicenseIncluded" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateMin.json new file mode 100644 index 000000000000..0ae9c8e332f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateMin.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2021-02-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BasicPool", + "tier": "Basic", + "capacity": 50 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 5 + } + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json new file mode 100644 index 000000000000..8942ce38cc94 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BasicPool", + "tier": "Basic", + "capacity": 50 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 5 + } + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json new file mode 100644 index 000000000000..b5b4977d4589 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "serverKeyType": "AzureKeyVault", + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "autoRotationEnabled": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/servers/encryptionProtector", + "location": "West US", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "autoRotationEnabled": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json new file mode 100644 index 000000000000..7c51e068c866 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "serverKeyType": "ServiceManaged", + "serverKeyName": "ServiceManaged" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/servers/encryptionProtector", + "location": "West US", + "kind": "servicemanaged", + "properties": { + "serverKeyName": "ServiceManaged", + "serverKeyType": "ServiceManaged" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorGet.json new file mode 100644 index 000000000000..de120620c00a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorGet.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/servers/encryptionProtector", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901", + "autoRotationEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorList.json new file mode 100644 index 000000000000..361e43820188 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorList.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/servers/encryptionProtector", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorRevalidate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorRevalidate.json new file mode 100644 index 000000000000..e3bd6cd4305c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/EncryptionProtectorRevalidate.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExportDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExportDatabase.json new file mode 100644 index 000000000000..9267aadee25c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExportDatabase.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Export", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExportDatabaseWithNetworkIsolation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExportDatabaseWithNetworkIsolation.json new file mode 100644 index 000000000000..35165c40aa93 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExportDatabaseWithNetworkIsolation.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql", + "networkIsolation": { + "sqlServerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr", + "storageAccountResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Export", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json new file mode 100644 index 000000000000..01ba2a51e052 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true, + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true, + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json new file mode 100644 index 000000000000..7b6e81beee43 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": true + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": true + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json new file mode 100644 index 000000000000..577596c943dc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json new file mode 100644 index 000000000000..5cd2b10a62ff --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-6852", + "serverName": "blobauditingtest-2080", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json new file mode 100644 index 000000000000..6183288bef63 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": true + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json new file mode 100644 index 000000000000..eb33dd069c99 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": false + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingGet.json new file mode 100644 index 000000000000..b5501752c2f5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ExtendedServerBlobAuditingGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverDatabase.json new file mode 100644 index 000000000000..ea730748fbe2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverDatabase.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "testServer", + "databaseName": "testDatabase", + "replicaType": "Primary", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverElasticPool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverElasticPool.json new file mode 100644 index 000000000000..14cdc2aa4011 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverElasticPool.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "testServer", + "elasticPoolName": "testElasticPool", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupCreateOrUpdate.json new file mode 100644 index 000000000000..af7d7c6618fd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupCreateOrUpdate.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "failoverGroupName": "failover-group-test-3", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + } + ], + "databases": [ + "/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" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/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" + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/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" + ] + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupDelete.json new file mode 100644 index 000000000000..90819030d5df --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "failoverGroupName": "failover-group-test-1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupFailover.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupFailover.json new file mode 100644 index 000000000000..c38951952ab3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupFailover.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-secondary-server", + "failoverGroupName": "failover-group-test-3", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan West", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server", + "location": "Japan East", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-2" + ] + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json new file mode 100644 index 000000000000..c38951952ab3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-secondary-server", + "failoverGroupName": "failover-group-test-3", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan West", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server", + "location": "Japan East", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-2" + ] + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupGet.json new file mode 100644 index 000000000000..1a583ddc9000 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupGet.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "failoverGroupName": "failover-group-test", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test", + "name": "failover-group-test", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupList.json new file mode 100644 index 000000000000..967c18b9c95c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupList.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test", + "name": "failover-group-test", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-2", + "name": "failover-group-test-2", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupUpdate.json new file mode 100644 index 000000000000..a2331f4f2338 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverGroupUpdate.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "failoverGroupName": "failover-group-test-1", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1" + ] + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverManagedInstance.json new file mode 100644 index 000000000000..d490392542ba --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FailoverManagedInstance.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "managedInstanceName": "instanceName", + "replicaType": "Primary", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleCreate.json new file mode 100644 index 000000000000..2c73797bef3f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleCreate.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "firewallRuleName": "firewallrulecrudtest-5370", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "startIpAddress": "0.0.0.3", + "endIpAddress": "0.0.0.3" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.3", + "endIpAddress": "0.0.0.3" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "properties": { + "startIpAddress": "0.0.0.3", + "endIpAddress": "0.0.0.3" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleDelete.json new file mode 100644 index 000000000000..6ca54e4ea143 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-9886", + "serverName": "firewallrulecrudtest-2368", + "firewallRuleName": "firewallrulecrudtest-7011", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleGet.json new file mode 100644 index 000000000000..0859db112f7c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "firewallRuleName": "firewallrulecrudtest-2304", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-2304", + "name": "firewallrulecrudtest-2304", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleList.json new file mode 100644 index 000000000000..60d52621f2eb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleList.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-2304", + "name": "firewallrulecrudtest-2304", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927", + "name": "firewallrulecrudtest-3927", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.1", + "endIpAddress": "0.0.0.1" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.3", + "endIpAddress": "0.0.0.3" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5767", + "name": "firewallrulecrudtest-5767", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.2", + "endIpAddress": "0.0.0.2" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleReplace.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleReplace.json new file mode 100644 index 000000000000..de46c55ee165 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleReplace.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "api-version": "2021-02-01-preview", + "parameters": { + "values": [ + { + "name": "firewallrulecrudtest-5370 ", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "100.0.0.0" + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.3", + "endIpAddress": "0.0.0.3" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleUpdate.json new file mode 100644 index 000000000000..8e79f37f9693 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/FirewallRuleUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "firewallRuleName": "firewallrulecrudtest-3927", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "startIpAddress": "0.0.0.1", + "endIpAddress": "0.0.0.1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927", + "name": "firewallrulecrudtest-3927", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.1", + "endIpAddress": "0.0.0.1" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927", + "name": "firewallrulecrudtest-3927", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.1", + "endIpAddress": "0.0.0.1" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDataWarehouseUserActivities.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDataWarehouseUserActivities.json new file mode 100644 index 000000000000..efbcfaa29dcc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDataWarehouseUserActivities.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "dataWarehouseUserActivityName": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "activeQueriesCount": 0 + }, + "id": "subscriptions/326affc3-21f4-4471-a545-e37430b70113/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/testsvr/databases/dwdb01/dataWarehouseUserActivities/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/dataWarehouseUserActivities" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseExtensions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseExtensions.json new file mode 100644 index 000000000000..348bd3b10ccd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseExtensions.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "a3473687-7581-41e1-ac24-6bcca5843f07", + "resourceGroupName": "rg_a1f9d6f8-30d5-4228-9504-8a364361bca3", + "serverName": "srv_65858e0f-b1d1-4bdc-8351-a7da86ca4939", + "databaseName": "11aa6c5e-58ed-4693-b303-3b8e3131deaa", + "extensionName": "polybaseimport", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseUsages.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseUsages.json new file mode 100644 index 000000000000..883389656779 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseUsages.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "displayName": "Database Size", + "currentValue": 4194304.0, + "limit": 268435456000.0, + "unit": "Bytes" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/usages/database_size", + "name": "database_size", + "type": "Microsoft.Sql/servers/databases/usages" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetInstancePool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetInstancePool.json new file mode 100644 index 000000000000..0fe0467c09b1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetInstancePool.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJob.json new file mode 100644 index 000000000000..8114ac744aff --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJob.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "my favourite job", + "version": 0, + "schedule": { + "startTime": "2015-09-24T18:30:01Z", + "endTime": "2015-09-24T23:59:59Z", + "type": "Once", + "enabled": true + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobAgent.json new file mode 100644 index 000000000000..010f70be2c8f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobAgent.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "Agent", + "capacity": 400 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobCredential.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobCredential.json new file mode 100644 index 000000000000..9d1ed0acdeda --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobCredential.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "credentialName": "cred1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name": "cred1", + "type": "Microsoft.Sql/servers/jobAccounts/credentials", + "properties": { + "username": "myuser" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecution.json new file mode 100644 index 000000000000..a3f18be358d3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecution.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-12-21T19:02:00.8707045Z", + "startTime": "2017-12-21T19:12:00.8707045Z", + "endTime": "2017-12-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-11-13T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecutionStep.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecutionStep.json new file mode 100644 index 000000000000..fae004276d78 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecutionStep.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "stepName": "step1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "stepName": "step1", + "stepId": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-27T04:33:15.7189151Z", + "startTime": "2017-12-27T04:33:16.176937Z", + "endTime": "2017-12-27T04:33:19.0600862Z", + "currentAttempts": 1, + "currentAttemptStartTime": "2017-12-27T04:33:17.4840068Z", + "lastMessage": "Step 1 succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecutionTarget.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecutionTarget.json new file mode 100644 index 000000000000..8a563f33226f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobExecutionTarget.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "stepName": "step1", + "targetId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "stepName": "step1", + "stepId": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-11-05T04:33:17.5133333Z", + "startTime": "2017-11-05T04:33:18.1230403Z", + "endTime": "2017-11-05T04:33:18.7031029Z", + "currentAttempts": 1, + "currentAttemptStartTime": "2017-11-05T04:33:18.2391013Z", + "lastMessage": "Step 1 succeeded execution on target (server 'server1', database 'database1').", + "target": { + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1/targets/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobStepByJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobStepByJob.json new file mode 100644 index 000000000000..2e8a1422b4bf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobStepByJob.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "stepName": "step1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobStepByVersion.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobStepByVersion.json new file mode 100644 index 000000000000..8326106ca67d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobStepByVersion.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobVersion": "1", + "stepName": "step1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions/steps" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobTargetGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobTargetGroup.json new file mode 100644 index 000000000000..6f145b0fbd25 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobTargetGroup.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "targetGroupName": "targetGroup1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "members": [ + { + "membershipType": "Exclude", + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + }, + { + "membershipType": "Include", + "type": "SqlServer", + "serverName": "server1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlElasticPool", + "serverName": "server2", + "elasticPoolName": "pool1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlShardMap", + "serverName": "server3", + "shardMapName": "shardMap1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobVersion.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobVersion.json new file mode 100644 index 000000000000..091bcf8749b8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetJobVersion.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobVersion": "1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1", + "name": "1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetListManagedShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetListManagedShortTermRetentionPolicy.json new file mode 100644 index 000000000000..1592542e2e2d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetListManagedShortTermRetentionPolicy.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json new file mode 100644 index 000000000000..512acf0ca1a1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "testsvr", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetMaintenanceWindowOptions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetMaintenanceWindowOptions.json new file mode 100644 index 000000000000..b93a188bca9c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetMaintenanceWindowOptions.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "maintenanceWindowOptionsName": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "isEnabled": true, + "maintenanceWindowCycles": [ + { + "dayOfWeek": "Saturday", + "startTime": "00:00:00", + "duration": "PT60M" + } + ], + "minDurationInMinutes": 60, + "defaultDurationInMinutes": 120, + "minCycles": 2, + "timeGranularityInMinutes": 5, + "allowMultipleMaintenanceWindowsPerCycle": true + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/maintenancewindowoptions/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/maintenancewindows" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetMaintenanceWindows.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetMaintenanceWindows.json new file mode 100644 index 000000000000..5c0bda7c16f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetMaintenanceWindows.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "maintenanceWindowName": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "timeRanges": [ + { + "dayOfWeek": "Saturday", + "startTime": "00:00:00", + "duration": "PT60M" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/maintenancewindows/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/maintenancewindows" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedInstanceOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedInstanceOperation.json new file mode 100644 index 000000000000..2f33c122c3da --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedInstanceOperation.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "operationId": "00000000-1111-2222-3333-444444444444", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "Cancelled", + "isCancellable": false, + "operationSteps": { + "totalSteps": "5", + "currentStep": 2, + "stepsList": [ + { + "order": 1, + "name": "Request validation", + "status": "Completed" + }, + { + "order": 2, + "name": "New SQL Instance Startup", + "status": "Canceled" + }, + { + "order": 3, + "name": "Seeding database files", + "status": "NotStarted" + }, + { + "order": 4, + "name": "Preparing Failover and Failover", + "status": "NotStarted" + }, + { + "order": 5, + "name": "Old SQL Instance cleanup", + "status": "NotStarted" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/managedInstances/operations" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedShortTermRetentionPolicy.json new file mode 100644 index 000000000000..b6db70c60b67 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedShortTermRetentionPolicy.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json new file mode 100644 index 000000000000..0899a3b0beaf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "testsvr", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "policyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstance/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRecoverableManagedDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRecoverableManagedDatabase.json new file mode 100644 index 000000000000..e3e6c740ccdc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRecoverableManagedDatabase.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "recoverableDatabaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "lastAvailableBackupDate": "2017-05-26T01:06:29.78Z" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/managedInstances/recoverableDatabases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRestorableDroppedDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRestorableDroppedDatabase.json new file mode 100644 index 000000000000..0b7244f99bec --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRestorableDroppedDatabase.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen4_2", + "tier": "BusinessCritical" + }, + "properties": { + "databaseName": "testdb", + "maxSizeBytes": 268435456000, + "creationDate": "2017-05-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z", + "backupStorageRedundancy": "Geo" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb", + "name": "testdb,131403269876900000", + "type": "Microsoft.Sql/servers/restorableDroppedDatabases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRestorableDroppedManagedDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRestorableDroppedManagedDatabase.json new file mode 100644 index 000000000000..831ada3a883f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetRestorableDroppedManagedDatabase.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "databaseName": "testdb", + "creationDate": "2017-05-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000", + "name": "testdb,131403269876900000", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetShortTermRetentionPolicy.json new file mode 100644 index 000000000000..8941ad3194e1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetShortTermRetentionPolicy.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetVCoreDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetVCoreDatabase.json new file mode 100644 index 000000000000..1f134c6aef88 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetVCoreDatabase.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen5_2", + "requestedServiceObjectiveName": "BC_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1", + "currentSku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadClassifier.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadClassifier.json new file mode 100644 index 000000000000..461c78d6eafd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadClassifier.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "workloadClassifierName": "wlm_classifier", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "memberName": "dbo", + "label": "test_label", + "context": "test_context", + "startTime": "12:00", + "endTime": "14:00", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_classifier", + "name": "wlm_classifier", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadClassifierList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadClassifierList.json new file mode 100644 index 000000000000..e4eea809c730 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadClassifierList.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "memberName": "dbo", + "label": "", + "context": "", + "startTime": "", + "endTime": "", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier3", + "name": "classifier3", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + }, + { + "properties": { + "memberName": "dbo", + "label": "test_label", + "context": "test_context", + "startTime": "12:00", + "endTime": "14:00", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier1", + "name": "classifier1", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + }, + { + "properties": { + "memberName": "dbo", + "label": "", + "context": "", + "startTime": "11:00", + "endTime": "17:00", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier2", + "name": "classifier2", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadGroup.json new file mode 100644 index 000000000000..9683c4eb4979 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadGroup.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "smallrc", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadGroupList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadGroupList.json new file mode 100644 index 000000000000..075068c82752 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetWorkloadGroupList.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 5, + "maxResourcePercentPerRequest": 5, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + }, + { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 10, + "maxResourcePercentPerRequest": 10, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/mediumrc", + "name": "mediumrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + }, + { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 20, + "maxResourcePercentPerRequest": 20, + "importance": "high", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/largerc", + "name": "largerc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportDatabase.json new file mode 100644 index 000000000000..f9f68ff1cd72 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportDatabase.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Import", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportDatabaseWithNetworkIsolation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportDatabaseWithNetworkIsolation.json new file mode 100644 index 000000000000..3df1041a29c2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportDatabaseWithNetworkIsolation.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql", + "networkIsolation": { + "sqlServerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr", + "storageAccountResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Import", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabase.json new file mode 100644 index 000000000000..17f9648ee5bb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabase.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2021-02-01-preview", + "parameters": { + "databaseName": "testdb", + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Import", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json new file mode 100644 index 000000000000..3e9a5ebbb241 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2021-02-01-preview", + "parameters": { + "databaseName": "testdb", + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql", + "networkIsolation": { + "sqlServerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr", + "storageAccountResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Import", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json new file mode 100644 index 000000000000..d087bbe1f827 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1", + "location": "southeastasia", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Inaccessible" + }, + "type": "Microsoft.Sql/managedInstances/databases" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2", + "location": "southeastasia", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Inaccessible" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json new file mode 100644 index 000000000000..11078a65b798 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "failoverGroupName": "failover-group-test-3", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "partnerRegions": [ + { + "location": "Japan West" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/locations/failoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance" + } + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/locations/failoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance" + } + ] + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupDelete.json new file mode 100644 index 000000000000..5d80bbe73d77 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "failoverGroupName": "failover-group-test-1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupFailover.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupFailover.json new file mode 100644 index 000000000000..b884de705a2b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupFailover.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan West", + "failoverGroupName": "failover-group-test-3", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/locations/failoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan East", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance" + } + ] + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json new file mode 100644 index 000000000000..b884de705a2b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan West", + "failoverGroupName": "failover-group-test-3", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/locations/failoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan East", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance" + } + ] + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupGet.json new file mode 100644 index 000000000000..b6c3f93bd033 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupGet.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "failoverGroupName": "failover-group-test", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/locations/failoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance" + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupList.json new file mode 100644 index 000000000000..f4789261fa6e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/InstanceFailoverGroupList.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test", + "name": "failover-group-test", + "type": "Microsoft.Sql/locations/failoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance" + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-1", + "name": "failover-group-test-1", + "type": "Microsoft.Sql/locations/failoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance-1", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance-1" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsDisable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsDisable.json new file mode 100644 index 000000000000..6c24e9073a3c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsDisable.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "serverName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/ledgerDigestUpload/current/disable", + "name": "current", + "type": "Microsoft.Sql/servers/databases/ledgerDigestUploads", + "properties": { + "state": "Disabled" + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/locations/eastus/ledgerDigestUploadOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsEnable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsEnable.json new file mode 100644 index 000000000000..05ba92526a3f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsEnable.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "serverName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "digestStorageEndpoint": "https://MyAccount.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/ledgerDigestUpload/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/ledgerDigestUploads", + "properties": { + "digestStorageEndpoint": "https://mystorage.blob.core.windows.net", + "state": "Enabled" + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/locations/eastus/ledgerDigestUploadOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsGet.json new file mode 100644 index 000000000000..fd715ce420ff --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "serverName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/ledgerDigestUploads", + "properties": { + "digestStorageEndpoint": "https://mystorage.blob.core.windows.net", + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsList.json new file mode 100644 index 000000000000..c1ff1196e74d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "serverName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/ledgerDigestUploads", + "properties": { + "digestStorageEndpoint": "https://mystorage.blob.core.windows.net", + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDataWarehouseUserActivities.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDataWarehouseUserActivities.json new file mode 100644 index 000000000000..382466e030aa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDataWarehouseUserActivities.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/326affc3-21f4-4471-a545-e37430b70113/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/testsvr/databases/dwdb01/dataWarehouseUserActivities/current", + "type": "Microsoft.Sql/servers/databases/dataWarehouseUserActivities", + "properties": { + "activeQueriesCount": 0 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseExtensions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseExtensions.json new file mode 100644 index 000000000000..cf1f65cc8cc9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseExtensions.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "7b2515fe-f230-4017-8cf0-695163acab85", + "resourceGroupName": "rg_4007c5a9-b3b0-41e1-bd46-9eef38768a4a", + "serverName": "srv_3b67ec2a-519b-43a7-8533-fb62dce3431e", + "databaseName": "719d8fa4-bf0f-48fc-8cd3-ef40fe6ba1fe", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseOperations.json new file mode 100644 index 000000000000..cb80f6ff6f8a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseOperations.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/databases/testdb/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/servers/databases/operations", + "properties": { + "databaseName": "testdb", + "operation": "UpdateLogicalDatabase", + "operationFriendlyName": "ALTER DATABASE", + "percentComplete": 100, + "serverName": "sqlcrudtest-4645", + "startTime": "2017-06-01T09:10:08.1Z", + "state": "Succeeded" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/databases/testdb/operations/55555555-5555-5555-5555-555555555555", + "name": "55555555-5555-5555-5555-555555555555", + "type": "Microsoft.Sql/servers/databases/operations", + "properties": { + "databaseName": "testdb", + "operation": "UpdateLogicalDatabase", + "operationFriendlyName": "ALTER DATABASE", + "percentComplete": 19, + "serverName": "sqlcrudtest-4645", + "startTime": "2017-06-01T10:10:08.1Z", + "state": "InProgress" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabasesByElasticPool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabasesByElasticPool.json new file mode 100644 index 000000000000..84a73698e178 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabasesByElasticPool.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "elasticPoolName": "pool1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "ElasticPool", + "tier": "Standard" + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "elasticPoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/elasticPools/Pool1", + "status": "Online", + "databaseId": "bfe0735f-bc87-447f-b2c2-481f4b100614", + "creationDate": "2017-07-12T22:08:39.163Z", + "currentServiceObjectiveName": "ElasticPool", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/DB001", + "name": "DB001", + "type": "Microsoft.Sql/servers/databases" + }, + { + "sku": { + "name": "ElasticPool", + "tier": "Standard" + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "elasticPoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/elasticPools/Pool1", + "status": "Online", + "databaseId": "82246152-3177-4357-b81c-a16d87ce3593", + "creationDate": "2017-07-12T22:10:10.773Z", + "currentServiceObjectiveName": "ElasticPool", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/DB002", + "name": "DB002", + "type": "Microsoft.Sql/servers/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListElasticPoolOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListElasticPoolOperations.json new file mode 100644 index 000000000000..5ed4e9a55bed --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListElasticPoolOperations.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtestgroup", + "serverName": "sqlcrudtestserver", + "elasticPoolName": "testpool", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtestgroup/providers/Microsoft.Sql/servers/sqlcrudtestserver/elasticPools/testpool/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/servers/elasticPools/operations", + "properties": { + "elasticPoolName": "testpool", + "operation": "UPDATE", + "operationFriendlyName": "UPDATE", + "percentComplete": 100, + "serverName": "sqlcrudtestserver", + "startTime": "2017-10-30T09:10:08.1Z", + "state": "COMPLETED" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtestgroup/providers/Microsoft.Sql/servers/sqlcrudtestserver/elasticPools/testpool/operations/55555555-5555-5555-5555-555555555555", + "name": "55555555-5555-5555-5555-555555555555", + "type": "Microsoft.Sql/servers/elasticPools/operations", + "properties": { + "elasticPoolName": "testpool", + "operation": "UPDATE", + "operationFriendlyName": "UPDATE", + "percentComplete": 0, + "serverName": "sqlcrudtestserver", + "startTime": "2017-10-30T10:10:08.1Z", + "state": "IN_PROGRESS" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsage.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsage.json new file mode 100644 index 000000000000..ab0ed5d4d7a7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsage.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/vcore_utilization", + "name": { + "value": "VCore utilization", + "localizedValue": "VCore utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "VCores", + "currentValue": 12, + "limit": 16, + "requestedLimit": 40 + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/storage_utilization", + "name": { + "value": "Storage utilization", + "localizedValue": "Storage utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "VCores", + "currentValue": 384, + "limit": 8196, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/database_utilization", + "name": { + "value": "Database utilization", + "localizedValue": "Database utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "Number Of Databases", + "currentValue": 5, + "limit": 100, + "requestedLimit": null + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsageExpanded.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsageExpanded.json new file mode 100644 index 000000000000..eaaee697c51d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsageExpanded.json @@ -0,0 +1,125 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "expandChildren": true, + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/vcore_utilization", + "name": { + "value": "VCore utilization", + "localizedValue": "VCore utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "VCores", + "currentValue": 12, + "limit": 16, + "requestedLimit": 40 + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/storage_utilization", + "name": { + "value": "Storage utilization", + "localizedValue": "Storage utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "VCores", + "currentValue": 384, + "limit": 8196, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/database_utilization", + "name": { + "value": "Database utilization", + "localizedValue": "Database utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "Number Of Databases", + "currentValue": 5, + "limit": 100, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance1/usages/vcore_utilization", + "name": { + "value": "VCore utilization", + "localizedValue": "VCore utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "VCores", + "currentValue": null, + "limit": 4, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance2/usages/vcore_utilization", + "name": { + "value": "VCore utilization", + "localizedValue": "VCore utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "VCores", + "currentValue": null, + "limit": 4, + "requestedLimit": 8 + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance1/usages/storage_utilization", + "name": { + "value": "Storage utilization", + "localizedValue": "Storage utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "Gigabytes", + "currentValue": null, + "limit": 128, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance2/usages/storage_utilization", + "name": { + "value": "VCore utilization", + "localizedValue": "VCore utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "Gigabytes", + "currentValue": null, + "limit": 128, + "requestedLimit": 256 + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance1/usages/database_utilization", + "name": { + "value": "Database utilization", + "localizedValue": "Database utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "Number Of Databases", + "currentValue": 2, + "limit": 100, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance2/usages/database_utilization", + "name": { + "value": "Database utilization", + "localizedValue": "Database utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "Number Of Databases", + "currentValue": 3, + "limit": 100, + "requestedLimit": null + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolsByResourceGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolsByResourceGroup.json new file mode 100644 index 000000000000..c0420c04364d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolsByResourceGroup.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + }, + { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP2", + "name": "testIP2", + "type": "Microsoft.Sql/instancePools" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolsBySubscriptionId.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolsBySubscriptionId.json new file mode 100644 index 000000000000..feebebc5b5fa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolsBySubscriptionId.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + }, + { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group2/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group2/providers/Microsoft.Sql/instancePools/testIP2", + "name": "testIP2", + "type": "Microsoft.Sql/instancePools" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobAgentsByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobAgentsByServer.json new file mode 100644 index 000000000000..b4fc51d10772 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobAgentsByServer.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "Agent", + "capacity": 200 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/jobAgent2", + "name": "jobAgent2", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "Agent", + "capacity": 400 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db12" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobCredentialsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobCredentialsByAgent.json new file mode 100644 index 000000000000..3e7610b29c8d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobCredentialsByAgent.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name": "cred1", + "type": "Microsoft.Sql/servers/jobAccounts/credentials", + "properties": { + "username": "myuser" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred2", + "name": "cred2", + "type": "Microsoft.Sql/servers/jobAccounts/credentials", + "properties": { + "username": "anotherUser" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionSteps.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionSteps.json new file mode 100644 index 000000000000..d920e0499906 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionSteps.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "stepName": "step1", + "stepId": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-03T04:33:15.7189151Z", + "startTime": "2017-12-03T04:33:16.176937Z", + "endTime": "2017-12-03T04:33:19.0600862Z", + "currentAttempts": 1, + "currentAttemptStartTime": "2017-12-03T04:33:17.4840068Z", + "lastMessage": "Step 1 succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionTargetsByExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionTargetsByExecution.json new file mode 100644 index 000000000000..f60caa080197 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionTargetsByExecution.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "stepName": "step1", + "stepId": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-07-01T04:33:17.5133333Z", + "startTime": "2017-07-01T04:33:18.1230403Z", + "endTime": "2017-07-01T04:33:18.7031029Z", + "currentAttempts": 1, + "currentAttemptStartTime": "2017-07-01T04:33:18.2391013Z", + "lastMessage": "Step 1 succeeded execution on target (server 'server1', database 'database1').", + "target": { + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1/targets/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionTargetsByStep.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionTargetsByStep.json new file mode 100644 index 000000000000..330a60d82338 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionTargetsByStep.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "stepName": "step1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "stepName": "step1", + "stepId": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-07-01T04:33:17.5133333Z", + "startTime": "2017-07-01T04:33:18.1230403Z", + "endTime": "2017-07-01T04:33:18.7031029Z", + "currentAttempts": 1, + "currentAttemptStartTime": "2017-07-01T04:33:18.2391013Z", + "lastMessage": "Step 1 succeeded execution on target (server 'server1', database 'database1').", + "target": { + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1/targets/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByAgent.json new file mode 100644 index 000000000000..abe9352bb356 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByAgent.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-03-21T19:02:00.8707045Z", + "startTime": "2017-03-21T19:12:00.8707045Z", + "endTime": "2017-03-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-03-21T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + }, + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-15T19:02:00.8707045Z", + "startTime": "2017-12-15T19:12:00.8707045Z", + "endTime": "2017-12-15T19:22:00.8707045Z", + "currentAttempts": 1, + "lastMessage": "Job execution succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1//executions?api-version=2017-03-01-preview&%24skip=2" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByAgentWithFilter.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByAgentWithFilter.json new file mode 100644 index 000000000000..f8e2b165b01c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByAgentWithFilter.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2021-02-01-preview", + "createTimeMin": "2017-03-21T19:00:00Z", + "createTimeMax": "2017-03-21T19:05:00Z", + "endTimeMin": "2017-03-21T19:20:00Z", + "endTimeMax": "2017-03-21T19:25:00Z", + "isActive": false + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-03-21T19:02:00.8707045Z", + "startTime": "2017-03-21T19:12:00.8707045Z", + "endTime": "2017-03-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-03-21T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + }, + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-15T19:02:00.8707045Z", + "startTime": "2017-12-15T19:12:00.8707045Z", + "endTime": "2017-12-15T19:22:00.8707045Z", + "currentAttempts": 1, + "lastMessage": "Job execution succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1//executions?api-version=2017-03-01-preview&%24skip=2" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByJob.json new file mode 100644 index 000000000000..0a3f230f6652 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobExecutionsByJob.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-03-21T19:02:00.8707045Z", + "startTime": "2017-03-21T19:12:00.8707045Z", + "endTime": "2017-03-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-03-21T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + }, + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-15T19:02:00.8707045Z", + "startTime": "2017-12-15T19:12:00.8707045Z", + "endTime": "2017-12-15T19:22:00.8707045Z", + "currentAttempts": 1, + "lastMessage": "Job execution succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions?api-version=2017-03-01-preview&%24skip=2" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobStepsByJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobStepsByJob.json new file mode 100644 index 000000000000..c4052cb1a6be --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobStepsByJob.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + }, + { + "properties": { + "stepId": 2, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step2", + "name": "step2", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobStepsByVersion.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobStepsByVersion.json new file mode 100644 index 000000000000..9abe1d3d8e8c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobStepsByVersion.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobVersion": "1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions/steps" + }, + { + "properties": { + "stepId": 2, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step2", + "name": "step2", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions/steps" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobTargetGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobTargetGroups.json new file mode 100644 index 000000000000..20f60aa785ea --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobTargetGroups.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "members": [ + { + "membershipType": "Exclude", + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + }, + { + "membershipType": "Include", + "type": "SqlServer", + "serverName": "server1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlElasticPool", + "serverName": "server2", + "elasticPoolName": "pool1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlShardMap", + "serverName": "server3", + "shardMapName": "shardMap1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobVersions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobVersions.json new file mode 100644 index 000000000000..6a206ec460c8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobVersions.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1", + "name": "1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/2", + "name": "2", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobsByAgent.json new file mode 100644 index 000000000000..c64efd7fb500 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListJobsByAgent.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "my favourite job", + "version": 0, + "schedule": { + "startTime": "2015-09-24T18:30:01Z", + "endTime": "2015-09-24T23:59:59Z", + "type": "Recurring", + "interval": "PT5M", + "enabled": true + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job3", + "name": "job3", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "this job will be scheduled once", + "version": 1, + "schedule": { + "startTime": "2017-07-01T03:45:00Z", + "endTime": "2017-12-27T06:00:00Z", + "type": "Once", + "enabled": true + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2", + "name": "job2", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "this job will never be automatically scheduled", + "version": 1, + "schedule": { + "startTime": "2017-07-01T03:45:00Z", + "endTime": "2017-12-27T06:00:00Z", + "type": "Once", + "enabled": false + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListManagedInstanceOperations.json new file mode 100644 index 000000000000..437d42749c2f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListManagedInstanceOperations.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "Cancelled", + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 50, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "InProgress", + "isCancellable": true, + "operationParameters": { + "currentParameters": { + "family": "Gen4", + "tier": "GeneralPurpose", + "vCores": 8, + "storageSizeInGB": 32 + }, + "requestedParameters": { + "family": "Gen4", + "tier": "BusinessCritical", + "vCores": 8, + "storageSizeInGB": 128 + } + }, + "operationSteps": { + "totalSteps": "3", + "currentStep": 3, + "stepsList": [ + { + "order": 1, + "name": "Request validation", + "status": "Completed" + }, + { + "order": 2, + "name": "Virtual Cluster resize/creation", + "status": "Completed" + }, + { + "order": 3, + "name": "New SQL Instance Startup", + "status": "InProgress" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T14:48:34.583Z", + "state": "Failed", + "errorCode": 45157, + "errorDescription": "Server 'sqlcrudtest-4645' is busy with another operation. Please try your operation later.", + "errorSeverity": 16, + "isUserError": true, + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333", + "name": "33333333-3333-3333-3333-333333333333", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "MakeAllManagedDatabasesAccessible", + "operationFriendlyName": "MAKE ALL MANAGED DBS ACCESSIBLE", + "percentComplete": 100, + "startTime": "2017-06-01T09:00:08.1Z", + "state": "Succeeded", + "operationSteps": { + "totalSteps": "1", + "currentStep": 1, + "stepsList": [ + { + "order": 1, + "name": "Request validation", + "status": "Failed" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444", + "name": "44444444-4444-4444-4444-444444444444", + "type": "Microsoft.Sql/managedInstances/operations" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListRecoverableManagedDatabasesByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListRecoverableManagedDatabasesByServer.json new file mode 100644 index 000000000000..e572ae95beae --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListRecoverableManagedDatabasesByServer.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "lastAvailableBackupDate": "2017-05-26T01:06:29.78Z" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDaatabases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/managedInstances/recoverableDaatabases" + }, + { + "properties": { + "lastAvailableBackupDate": "2018-04-26T02:17:23.44Z" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDaatabases/testdb2", + "name": "testdb2", + "type": "Microsoft.Sql/managedInstances/recoverableDaatabases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListRestorableDroppedDatabasesByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListRestorableDroppedDatabasesByServer.json new file mode 100644 index 000000000000..ce69b6fb285f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListRestorableDroppedDatabasesByServer.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "BC_Gen4_2", + "tier": "BusinessCritical" + }, + "properties": { + "databaseName": "testdb", + "maxSizeBytes": 268435456000, + "creationDate": "2017-06-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z", + "backupStorageRedundancy": "Geo" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb", + "name": "testdb,131403269876900000", + "type": "Microsoft.Sql/servers/restorableDroppedDatabases" + }, + { + "sku": { + "name": "GP_Gen4_2", + "tier": "GeneralPurpose" + }, + "properties": { + "databaseName": "testdb2", + "maxSizeBytes": 268435456000, + "creationDate": "2017-06-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z", + "backupStorageRedundancy": "Geo" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb2", + "name": "testdb2,131403269876900000", + "type": "Microsoft.Sql/servers/restorableDroppedDatabases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListServerOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListServerOperations.json new file mode 100644 index 000000000000..1f791e52a1ff --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListServerOperations.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/servers/operations", + "properties": { + "operation": "MakeAllLogicalDatabasesAccessible", + "operationFriendlyName": "MAKE ALL DBS ACCESSIBLE", + "percentComplete": 0, + "serverName": "sqlcrudtest-4645", + "startTime": "2017-06-01T09:10:08.1Z", + "state": "InProgress" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.Sql/servers/operations", + "properties": { + "operation": "MakeAllLogicalDatabasesAccessible", + "operationFriendlyName": "MAKE ALL DBS ACCESSIBLE", + "percentComplete": 100, + "serverName": "sqlcrudtest-4645", + "startTime": "2017-06-01T09:00:08.1Z", + "state": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json new file mode 100644 index 000000000000..258eff2aef48 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListVCoreDatabasesByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListVCoreDatabasesByServer.json new file mode 100644 index 000000000000..f95b30077179 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListVCoreDatabasesByServer.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "requestedServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Zone", + "requestedBackupStorageRedundancy": "Zone", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + }, + { + "sku": { + "name": "System0", + "tier": "System", + "capacity": 0 + }, + "kind": "v12.0,system", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 32212254720, + "status": "Online", + "databaseId": "e6be351f-2cc9-4604-9e52-b0b28b2710b0", + "creationDate": "2017-06-07T04:23:42.537Z", + "currentServiceObjectiveName": "System0", + "requestedServiceObjectiveName": "System0", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Disabled", + "currentSku": { + "name": "System0", + "tier": "System", + "capacity": 0 + }, + "currentBackupStorageRedundancy": "Local", + "requestedBackupStorageRedundancy": "Local", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/master", + "name": "master", + "type": "Microsoft.Sql/servers/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json new file mode 100644 index 000000000000..b85abb5f959e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Inaccessible", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "readScale": "Enabled" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LocationCapabilityListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LocationCapabilityListByLocation.json new file mode 100644 index 000000000000..f137e48913f6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LocationCapabilityListByLocation.json @@ -0,0 +1,3164 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "eastus", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "name": "East US", + "supportedServerVersions": [ + { + "name": "12.0", + "supportedEditions": [ + { + "name": "Hyperscale", + "supportedServiceLevelObjectives": [ + { + "id": "9380cd0e-b025-4e9d-829c-c1918c1614bb", + "name": "HS_Gen4_1", + "performanceLevel": { + "value": 1, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 1 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "34497c3f-24b9-4cee-968d-6e5e854670fe", + "name": "HS_Gen4_2", + "performanceLevel": { + "value": 2, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 2 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "a420d2b2-ca32-4152-b1c6-dd8d4d9fd734", + "name": "HS_Gen5_2", + "performanceLevel": { + "value": 2, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 2 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Default" + }, + { + "id": "5de845d2-2055-428c-b507-94131358cdd7", + "name": "HS_Gen4_3", + "performanceLevel": { + "value": 3, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 3 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "d060b874-21f3-47b0-a9bd-a1a737cfcc6e", + "name": "HS_Gen4_4", + "performanceLevel": { + "value": 4, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 4 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "60dba88b-2dfa-4123-be57-bd0dbfd92a72", + "name": "HS_Gen5_4", + "performanceLevel": { + "value": 4, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 4 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "925a0916-15fb-4764-aa76-533d97f2d782", + "name": "HS_Gen4_5", + "performanceLevel": { + "value": 5, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 5 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "d7aa11c2-e4c7-442a-962e-308b371f5ec1", + "name": "HS_Gen4_6", + "performanceLevel": { + "value": 6, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 6 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "b9c594ec-a3fe-4bfe-808d-a595410d0a07", + "name": "HS_Gen5_6", + "performanceLevel": { + "value": 6, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 6 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "d77eef57-6c00-4003-b140-822509b8736a", + "name": "HS_Gen4_7", + "performanceLevel": { + "value": 7, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 7 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "694bf389-7cb2-4461-8fa2-0b06d8438315", + "name": "HS_Gen4_8", + "performanceLevel": { + "value": 8, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 8 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "efdfac5f-3f8e-4500-95b1-684c07349860", + "name": "HS_Gen5_8", + "performanceLevel": { + "value": 8, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 8 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "554ea52a-9ecc-4d87-bbc7-1e257705da3f", + "name": "HS_Gen4_9", + "performanceLevel": { + "value": 9, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 9 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "576f3f38-b950-4eaa-b74e-33d831193441", + "name": "HS_Gen4_10", + "performanceLevel": { + "value": 10, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 10 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "69697c3a-1946-4eb8-a5a4-a269168dde27", + "name": "HS_Gen5_10", + "performanceLevel": { + "value": 10, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 10 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "1bee9dc8-68b4-44df-b870-8ab0e4d71e94", + "name": "HS_Gen5_12", + "performanceLevel": { + "value": 12, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 12 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "07a8341d-c0b2-4000-bc7a-5b4dae2ad210", + "name": "HS_Gen5_14", + "performanceLevel": { + "value": 14, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 14 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "7fc1f700-a45d-499e-901f-2a00645c54db", + "name": "HS_Gen4_16", + "performanceLevel": { + "value": 16, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 16 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "6b56f70b-52e5-44ba-8cd5-4f63d224b206", + "name": "HS_Gen5_16", + "performanceLevel": { + "value": 16, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 16 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "ba0029f2-3ff4-4ef6-9e65-e8f77b5dd1e2", + "name": "HS_Gen5_18", + "performanceLevel": { + "value": 18, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 18 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "f1b2a082-f622-4fb8-bbef-e74deac3ec89", + "name": "HS_Gen5_20", + "performanceLevel": { + "value": 20, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 20 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "f016d419-a031-4b93-ab62-7f3d2a789376", + "name": "HS_Gen4_24", + "performanceLevel": { + "value": 24, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 24 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "222bc0ee-e195-4bbc-be05-3b849c3a8195", + "name": "HS_Gen5_24", + "performanceLevel": { + "value": 24, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 24 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "05366cca-cc70-486e-a697-bb3fab877f75", + "name": "HS_Gen5_32", + "performanceLevel": { + "value": 32, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 32 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "32542ef7-124d-4e66-8b41-9c6c0ab963c2", + "name": "HS_Gen5_40", + "performanceLevel": { + "value": 40, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 40 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "6509db45-febe-44dd-a079-35f11d477984", + "name": "HS_Gen5_80", + "performanceLevel": { + "value": 80, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 80 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + } + ], + "zoneRedundant": false, + "readScale": { + "maxNumberOfReplicas": 4 + }, + "supportedStorageCapabilities": [ + { + "storageAccountType": "GRS", + "status": "Default" + }, + { + "storageAccountType": "LRS", + "status": "Available" + }, + { + "storageAccountType": "ZRS", + "status": "Available", + "reason": "ZRS is available in multi-az regions" + } + ], + "status": "Available" + } + ], + "supportedElasticPoolEditions": [ + { + "name": "BusinessCritical", + "supportedElasticPoolPerformanceLevels": [ + { + "performanceLevel": { + "value": 3, + "unit": "VCores" + }, + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "family": "Gen4", + "capacity": 3 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "maxDatabaseCount": 100, + "supportedMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 1048576, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 1048576, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxPerformanceLevels": [ + { + "limit": 0.25, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 3, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 3, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Default" + } + ], + "zoneRedundant": false, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_1", + "status": "Available", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_2", + "status": "Available", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "performanceLevel": { + "value": 12, + "unit": "VCores" + }, + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "family": "Gen5", + "capacity": 12 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "maxDatabaseCount": 100, + "supportedMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3144704, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "logSize": { + "limit": 1048576, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3144704, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxPerformanceLevels": [ + { + "limit": 0.25, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 6, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 6, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 8, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 6, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 6, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 6, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Default" + } + ], + "zoneRedundant": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_1", + "status": "Available", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_2", + "status": "Available", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "performanceLevel": { + "value": 128, + "unit": "VCores" + }, + "sku": { + "name": "BC_M", + "tier": "BusinessCritical", + "family": "M", + "capacity": 128 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "maxDatabaseCount": 100, + "supportedMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3144704, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 4194304, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 1048576, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3144704, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 4194304, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxPerformanceLevels": [ + { + "limit": 8, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 40, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 40, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 64, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 40, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 64, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 80, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 40, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 64, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 80, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 128, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 40, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 64, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 80, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 128, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Default" + } + ], + "zoneRedundant": false, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_1", + "status": "Available", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_2", + "status": "Available", + "zoneRedundant": false + } + ], + "status": "Available" + } + ], + "zoneRedundant": false, + "status": "Available" + } + ], + "status": "Default" + } + ], + "supportedManagedInstanceVersions": [ + { + "name": "12.0", + "supportedEditions": [ + { + "name": "GeneralPurpose", + "supportedFamilies": [ + { + "name": "Gen4", + "sku": "GP_Gen4", + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "supportedVcoresValues": [ + { + "name": "8", + "value": 8, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Default" + }, + { + "name": "16", + "value": 16, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Available" + }, + { + "name": "24", + "value": 24, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Available" + } + ], + "status": "Available" + }, + { + "name": "Gen5", + "sku": "GP_Gen5", + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "supportedVcoresValues": [ + { + "name": "8", + "value": 8, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Default" + }, + { + "name": "16", + "value": 16, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Available" + }, + { + "name": "24", + "value": 24, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Available" + } + ], + "status": "Default" + } + ], + "supportedStorageCapabilities": [ + { + "storageAccountType": "GRS", + "status": "Default" + }, + { + "storageAccountType": "LRS", + "status": "Available" + }, + { + "storageAccountType": "ZRS", + "status": "Visible", + "reason": "ZRS is available in multi-az regions" + } + ], + "status": "Default" + }, + { + "name": "Hyperscale", + "supportedFamilies": [ + { + "name": "Gen4", + "sku": "HS_Gen4", + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "supportedVcoresValues": [ + { + "name": "4", + "value": 4, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "8", + "value": 8, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Default" + }, + { + "name": "16", + "value": 16, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "24", + "value": 24, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + } + ], + "status": "Default" + }, + { + "name": "Gen5", + "sku": "HS_Gen5", + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "supportedVcoresValues": [ + { + "name": "4", + "value": 4, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "8", + "value": 8, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Default" + }, + { + "name": "16", + "value": 16, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "24", + "value": 24, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "32", + "value": 32, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "40", + "value": 40, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "48", + "value": 48, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "64", + "value": 64, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "80", + "value": 80, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + } + ], + "status": "Available" + } + ], + "supportedStorageCapabilities": [ + { + "storageAccountType": "GRS", + "status": "Default" + }, + { + "storageAccountType": "LRS", + "status": "Available" + }, + { + "storageAccountType": "ZRS", + "status": "Available", + "reason": "ZRS is available in multi-az regions" + } + ], + "status": "Available" + } + ], + "supportedInstancePoolEditions": [ + { + "name": "GeneralPurpose", + "supportedFamilies": [ + { + "name": "Gen5", + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "supportedVcoresValues": [ + { + "name": "GP_Gen5_8", + "value": 8, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Default" + }, + { + "name": "GP_Gen5_16", + "value": 16, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "name": "GP_Gen5_24", + "value": 24, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "name": "GP_Gen5_32", + "value": 32, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "name": "GP_Gen5_40", + "value": 40, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "name": "GP_Gen5_64", + "value": 64, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "name": "GP_Gen5_80", + "value": 80, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "status": "Default" + } + ], + "status": "Default" + } + ], + "status": "Default" + } + ], + "status": "Available" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupCopy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupCopy.json new file mode 100644 index 000000000000..6cb1edeb52a6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupCopy.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "targetServerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2", + "targetDatabaseName": "testDatabase2", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "name": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "type": "Microsoft.Sql/locations/longTermRetentionBackupOperationResults", + "properties": { + "requestId": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "fromBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "operationType": "CopyBackup", + "status": "Succeeded", + "toBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver2/longterRetentionDatabases/testDatabase2/longTermRetentionBackups/55555555-6666-7777-8888-111111111111;131637960820000000", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupDelete.json new file mode 100644 index 000000000000..d27a76a01887 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupGet.json new file mode 100644 index 000000000000..ab179ab49967 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupGet.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/2017-03-10T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2017-09-06T08:00:00.000Z", + "name": "2017-03-10T08:00:00.000Z;55555555-6666-7777-8888-999999999999;131637960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByDatabase.json new file mode 100644 index 000000000000..b9e3dcb099a0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByDatabase.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131657960820000000", + "name": "55555555-6666-7777-8888-999999999999;131657960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131677960820000000", + "name": "55555555-6666-7777-8888-999999999999;131677960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": "2017-09-07T08:00:00Z", + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByLocation.json new file mode 100644 index 000000000000..858db5e36755 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByLocation.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver1", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver2/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000", + "name": "12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver2", + "serverCreateTime": "2017-04-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver3/longTermRetentionDatabases/testDatabase3/longTermRetentionBackups/43214321-4321-4321-4321-321321321321;131677960820000000", + "name": "43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver3", + "serverCreateTime": "2017-05-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByServer.json new file mode 100644 index 000000000000..480a220e7e69 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupListByServer.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000", + "name": "12341234-1234-1234-1234-123123123123;131657960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase3/longTermRetentionBackups/43214321-4321-4321-4321-321321321321;131677960820000000", + "name": "43214321-4321-4321-4321-321321321321;131667960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupUpdate.json new file mode 100644 index 000000000000..ef329a81d992 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionBackupUpdate.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "requestedBackupStorageRedundancy": "Geo" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "name": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "type": "Microsoft.Sql/locations/longTermRetentionBackupOperationResults", + "properties": { + "requestId": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "fromBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "operationType": "UpdateBackup", + "status": "Succeeded", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json new file mode 100644 index 000000000000..a318e296b0a2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "serverName": "testserver", + "databaseName": "testDatabase", + "policyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/servers/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyGet.json new file mode 100644 index 000000000000..9d696b2d395e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "serverName": "testserver", + "databaseName": "testDatabase", + "policyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/servers/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyListByDatabase.json new file mode 100644 index 000000000000..c9ec210c2c06 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LongTermRetentionPolicyListByDatabase.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/servers/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedColumnsListByDatabaseMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedColumnsListByDatabaseMax.json new file mode 100644 index 000000000000..4f231ce304ca --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedColumnsListByDatabaseMax.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "serverName", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview", + "schema": [ + "dbo" + ], + "table": [ + "customer", + "address" + ], + "column": [ + "username" + ], + "orderBy": [ + "schema asc", + "table", + "column desc" + ], + "$skip": "5", + "$top": "50" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "columnType": "nvarchar", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/serverName/databases/myDatabase/schemas/dbo/tables/customer/columns/username", + "name": "username", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedColumnsListByDatabaseMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedColumnsListByDatabaseMin.json new file mode 100644 index 000000000000..d67584cb7ea1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedColumnsListByDatabaseMin.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "serverName", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "columnType": "int", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1", + "name": "col1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns" + }, + { + "properties": { + "columnType": "bit", + "temporalType": "SystemVersionedTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2", + "name": "col2", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnGet.json new file mode 100644 index 000000000000..4ca56aa3164b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "columnName": "column1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/column1", + "name": "column1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns", + "properties": { + "columnType": "bit" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnListByTable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnListByTable.json new file mode 100644 index 000000000000..408a16a35665 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnListByTable.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1", + "name": "col1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns", + "properties": { + "columnType": "nvarchar" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2", + "name": "col2", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns", + "properties": { + "columnType": "bit" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json new file mode 100644 index 000000000000..84fdaeeb6da5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json new file mode 100644 index 000000000000..73c1b7173397 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json new file mode 100644 index 000000000000..1ddad9f6e0e4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "Low" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json new file mode 100644 index 000000000000..4a5ea355a00a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "lastBackupName": "testdb1_log4" + } + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateMax.json new file mode 100644 index 000000000000..900158ea3714 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateMax.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateMin.json new file mode 100644 index 000000000000..74781bd5a074 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateMin.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json new file mode 100644 index 000000000000..02ce166e5145 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "createMode": "PointInTimeRestore", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb", + "restorePointInTime": "2017-07-14T05:35:31.503Z" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRecovery.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRecovery.json new file mode 100644 index 000000000000..1125b72977da --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRecovery.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "server1", + "databaseName": "testdb_recovered", + "api-version": "2021-02-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "createMode": "Recovery", + "recoverableDatabaseId": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-WestEurope/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/server1/recoverableDatabases/testdb_recovered", + "name": "testdb_recovered", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2018-11-07T04:41:33.937Z" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb_recovered", + "name": "testdb_recovered", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2018-11-07T04:41:33.937Z" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json new file mode 100644 index 000000000000..9a69ca4c49aa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "createMode": "RestoreExternalBackup", + "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups", + "storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "autoCompleteRestore": true, + "lastBackupName": "last_backup_name" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json new file mode 100644 index 000000000000..d2d3b5f39cd2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "createMode": "RestoreExternalBackup", + "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups", + "storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234", + "collation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseDelete.json new file mode 100644 index 000000000000..0ae07e737026 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseGet.json new file mode 100644 index 000000000000..765163f3cc48 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1", + "location": "southeastasia", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Online" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseListByManagedInstance.json new file mode 100644 index 000000000000..55d3dfce1fd2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseListByManagedInstance.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1", + "location": "southeastasia", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Online" + }, + "type": "Microsoft.Sql/managedInstances/databases" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2", + "location": "southeastasia", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Online" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json new file mode 100644 index 000000000000..db16052625ff --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json new file mode 100644 index 000000000000..db16052625ff --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRestoreDetails.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRestoreDetails.json new file mode 100644 index 000000000000..caafabf5f8e4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseRestoreDetails.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "restoreDetailsName": "Default", + "api-version": "2021-02-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "status": "Restoring", + "currentRestoringFileName": "full_0", + "percentCompleted": 0.0, + "unrestorableFiles": [], + "numberOfFilesDetected": 26, + "lastUploadedFileName": "log2_3", + "lastUploadedFileTime": "2018-06-15T11:38:33Z" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/testdb/restoreDetails/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/restoreDetails" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSchemaGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSchemaGet.json new file mode 100644 index 000000000000..4fafef740484 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSchemaGet.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/managedInstances/databases/schemas" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json new file mode 100644 index 000000000000..da2223809d51 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/managedInstances/databases/schemas" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/schema2", + "name": "schema2", + "type": "Microsoft.Sql/managedInstances/databases/schemas" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json new file mode 100644 index 000000000000..a52b36293063 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@contoso.com", + "user@contoso.com" + ], + "disabledAlerts": [ + "Sql_Injection", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@contoso.com", + "user@contoso.com" + ], + "disabledAlerts": [ + "Sql_Injection", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@contoso.com", + "user@contoso.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json new file mode 100644 index 000000000000..63d7767a8855 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstance/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [], + "disabledAlerts": [], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstance/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [], + "disabledAlerts": [], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertGet.json new file mode 100644 index 000000000000..c0ecec4871e8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertGet.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-6852", + "managedInstanceName": "securityalert-2080", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/managedInstances/securityalert-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@contoso.com", + "user@contoso.com" + ], + "disabledAlerts": [ + "Usage_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json new file mode 100644 index 000000000000..ce05cccae0c7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-6852", + "managedInstanceName": "securityalert-2080", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/managedInstances/securityalert-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@contoso.com", + "user@contoso.com" + ], + "disabledAlerts": [ + "Usage_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json new file mode 100644 index 000000000000..ab40b52cbb9e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "databaseName": "database1", + "api-version": "2021-02-01-preview", + "$filter": "ShowServerRecords eq true", + "$skip": "0", + "$top": "1", + "$skiptoken": "eyJCbG9iTmFtZURhdGVUaW1lIjoiXC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbG92ZXJJbmRleCI6IjAiLCJFbmREYXRlIjoiXC9EYXRlKDE1MTI0NjYyMDA1MjkpXC8iLCJJc1NraXBUb2tlblNldCI6ZmFsc2UsIklzVjJCbG9iVGltZUZvcm1hdCI6dHJ1ZSwiU2hvd1NlcnZlclJlY29yZHMiOmZhbHNlLCJTa2lwVmFsdWUiOjAsIlRha2VWYWx1ZSI6MTB9" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents?$skipToken=C9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sb&api-version=2017-10-01-preview", + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000001", + "name": "06364798761800000000000000001", + "type": "Microsoft.Sql/servers/databases/securityEvents", + "properties": { + "eventTime": "2017-12-24T10:13:24.729Z", + "securityEventType": "SqlInjectionExploit", + "subscription": "00000000-1111-2222-3333-444444444444", + "server": "testcl", + "database": "database1", + "clientIp": "10.166.113.220", + "applicationName": "myApp", + "principalName": "maliciousUser", + "securityEventSqlInjectionAdditionalProperties": { + "threatId": "1", + "statement": "select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test11'", + "statementHighlightOffset": 52, + "statementHighlightLength": 13, + "errorCode": 0, + "errorSeverity": 0, + "errorMessage": "" + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityEventsGetMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityEventsGetMin.json new file mode 100644 index 000000000000..d3f804fbbadb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSecurityEventsGetMin.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "databaseName": "database1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000001", + "name": "06364798761800000000000000001", + "type": "Microsoft.Sql/servers/databases/securityEvents", + "properties": { + "eventTime": "2017-12-24T10:13:24.729Z", + "securityEventType": "SqlInjectionExploit", + "subscription": "00000000-1111-2222-3333-444444444444", + "server": "testcl", + "database": "database1", + "clientIp": "10.166.113.220", + "applicationName": "myApp", + "principalName": "maliciousUser", + "securityEventSqlInjectionAdditionalProperties": { + "threatId": "1", + "statement": "select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test11'", + "statementHighlightOffset": 52, + "statementHighlightLength": 13, + "errorCode": 0, + "errorSeverity": 0, + "errorMessage": "" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000002", + "name": "06364798761800000000000000002", + "type": "Microsoft.Sql/servers/databases/securityEvents", + "properties": { + "eventTime": "2017-12-24T10:11:14.121Z", + "securityEventType": "SqlInjectionExploit", + "subscription": "00000000-1111-2222-3333-444444444444", + "server": "testcl", + "database": "database1", + "clientIp": "10.166.113.220", + "applicationName": "myApp", + "principalName": "maliciousUser", + "securityEventSqlInjectionAdditionalProperties": { + "threatId": "1", + "statement": "select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test10'", + "statementHighlightOffset": 52, + "statementHighlightLength": 13, + "errorCode": 0, + "errorSeverity": 0, + "errorMessage": "" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000003", + "name": "06364798761800000000000000003", + "type": "Microsoft.Sql/servers/databases/securityEvents", + "properties": { + "eventTime": "2017-12-24T10:03:17.066Z", + "securityEventType": "SqlInjectionExploit", + "subscription": "00000000-1111-2222-3333-444444444444", + "server": "testcl", + "database": "database1", + "clientIp": "10.166.113.220", + "applicationName": "myApp", + "principalName": "maliciousUser", + "securityEventSqlInjectionAdditionalProperties": { + "threatId": "1", + "statement": "select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test9'", + "statementHighlightOffset": 52, + "statementHighlightLength": 13, + "errorCode": 0, + "errorSeverity": 0, + "errorMessage": "" + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json new file mode 100644 index 000000000000..d0d93c3a60c9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "operations": [ + { + "properties": { + "op": "set", + "schema": "dbo", + "table": "table1", + "column": "column1", + "sensitivityLabel": { + "properties": { + "labelName": "Highly Confidential", + "labelId": "3A477B16-9423-432B-AA97-6069B481CEC3", + "informationType": "Financial", + "informationTypeId": "1D3652D6-422C-4115-82F1-65DAEBC665C8" + } + } + } + }, + { + "properties": { + "op": "set", + "schema": "dbo", + "table": "table2", + "column": "column2", + "sensitivityLabel": { + "properties": { + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII" + } + } + } + }, + { + "properties": { + "op": "remove", + "schema": "dbo", + "table": "Table1", + "column": "Column3" + } + } + ] + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json new file mode 100644 index 000000000000..a3d481b60e00 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "sensitivityLabelSource": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "Financial", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "labelName": "Sensitive", + "rank": "Critical" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn3/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn3", + "informationType": "Email", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json new file mode 100644 index 000000000000..c615c03def12 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "sensitivityLabelSource": "recommended", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended", + "name": "recommended", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn2", + "informationType": "Financial", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "labelName": "Sensitive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn4/sensitivityLabels/recommended", + "name": "recommended", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn4", + "informationType": "Email", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json new file mode 100644 index 000000000000..3f8756cdef5e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "operations": [ + { + "properties": { + "op": "enable", + "schema": "dbo", + "table": "table1", + "column": "column1" + } + }, + { + "properties": { + "op": "disable", + "schema": "dbo", + "table": "table2", + "column": "column2" + } + }, + { + "properties": { + "op": "disable", + "schema": "dbo", + "table": "Table1", + "column": "Column3" + } + } + ] + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseTableGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseTableGet.json new file mode 100644 index 000000000000..0e317f2c5313 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseTableGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseTableListBySchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseTableListBySchema.json new file mode 100644 index 000000000000..fd14e8782762 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseTableListBySchema.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table2", + "name": "table2", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseUpdateMax.json new file mode 100644 index 000000000000..3273ccfe0679 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseUpdateMax.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb" + }, + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseUpdateMin.json new file mode 100644 index 000000000000..3273ccfe0679 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseUpdateMin.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb" + }, + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json new file mode 100644 index 000000000000..bedd3ed0411e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json new file mode 100644 index 000000000000..1c8c0849113e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": false, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": false, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..2aa25b934e47 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..fd5385177254 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json new file mode 100644 index 000000000000..af31fde013c9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json new file mode 100644 index 000000000000..676f2108f023 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "baselineName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json new file mode 100644 index 000000000000..46f1b144f288 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "baselineName": "default", + "ruleId": "VA1001", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json new file mode 100644 index 000000000000..759700411677 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "managedInstanceName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "baselineName": "master", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json new file mode 100644 index 000000000000..00b138fd8efa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4799", + "managedInstanceName": "vulnerabilityassessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2021-02-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json new file mode 100644 index 000000000000..d35a4b71ae32 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "managedInstanceName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json new file mode 100644 index 000000000000..aea31bf37027 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "managedInstanceName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan002", + "name": "scan002", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan003", + "name": "scan003", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "FailedToRun", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [ + { + "code": "StorageNotFound", + "message": "Storage not found" + } + ], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 0 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json new file mode 100644 index 000000000000..f18de05645f0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "managedInstanceName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan01", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorCreate.json new file mode 100644 index 000000000000..0831d0d28c71 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorCreate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "administratorName": "ActiveDirectory", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorDelete.json new file mode 100644 index 000000000000..ea38c1037091 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "administratorName": "ActiveDirectory", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorGet.json new file mode 100644 index 000000000000..78ad9ee461c7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "administratorName": "ActiveDirectory", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorListByInstance.json new file mode 100644 index 000000000000..8c651fbc7844 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorListByInstance.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorUpdate.json new file mode 100644 index 000000000000..0831d0d28c71 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAdministratorUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "administratorName": "ActiveDirectory", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json new file mode 100644 index 000000000000..3ce44bc3abb7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "authenticationName": "Default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json new file mode 100644 index 000000000000..26a69c070cfd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "authenticationName": "Default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json new file mode 100644 index 000000000000..9f47d79e95c4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "authenticationName": "Default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": true + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json new file mode 100644 index 000000000000..859d425e6cfb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "authenticationName": "Default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": true + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceCreateMax.json new file mode 100644 index 000000000000..78eca0f2a6b3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceCreateMax.json @@ -0,0 +1,131 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2021-02-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "Japan East", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "PLACEHOLDER", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "dnsZonePartner": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "timezoneId": "UTC", + "instancePoolId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + } + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Creating", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "timezoneId": "UTC", + "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + } + }, + "location": "japaneast", + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "201": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Creating", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "timezoneId": "UTC", + "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + } + }, + "location": "japaneast", + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceCreateMin.json new file mode 100644 index 000000000000..e50898176be7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceCreateMin.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2021-02-01-preview", + "parameters": { + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "PLACEHOLDER", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded" + }, + "location": "Japan East" + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Creating", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "dnsZone": "1b4e2caff2530" + }, + "location": "japaneast", + "tags": {}, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "201": { + "body": { + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Creating", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "dnsZone": "1b4e2caff2530" + }, + "location": "japaneast", + "tags": {}, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceDelete.json new file mode 100644 index 000000000000..8ca4933d8cf8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json new file mode 100644 index 000000000000..0a255765ed98 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "serverKeyType": "AzureKeyVault", + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "autoRotationEnabled": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/encryptionProtector", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "autoRotationEnabled": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json new file mode 100644 index 000000000000..04a516c2c005 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "serverKeyType": "ServiceManaged", + "serverKeyName": "ServiceManaged" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/encryptionProtector", + "kind": "servicemanaged", + "properties": { + "serverKeyName": "ServiceManaged", + "serverKeyType": "ServiceManaged" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json new file mode 100644 index 000000000000..ee11433e9c7b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/encryptionProtector", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorList.json new file mode 100644 index 000000000000..520818ca5540 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/encryptionProtector", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json new file mode 100644 index 000000000000..01ac0dba2a8f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceGet.json new file mode 100644 index 000000000000..b7a7624c07a3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceGet.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS" + }, + "location": "japaneast", + "tags": { + "key": "value" + }, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..0f7aa662855c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + } + }, + "location": "japaneast", + "tags": { + "key": "value" + }, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json new file mode 100644 index 000000000000..e64f949e53a2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-01T00:00:00Z", + "autoRotationEnabled": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-01T00:00:00Z", + "autoRotationEnabled": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyDelete.json new file mode 100644 index 000000000000..c1f68d2bdb4b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyGet.json new file mode 100644 index 000000000000..5675b94741c1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-01T00:00:00Z", + "autoRotationEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyList.json new file mode 100644 index 000000000000..98b1648c29b3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceKeyList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "someVault_someKey_01234567890123456789012345678901", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/myVault_myKey_11111111111111111111111111111111", + "name": "myVault_myKey_11111111111111111111111111111111", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "AAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBB", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/ServiceManaged", + "name": "ServiceManaged", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "servicemanaged", + "properties": {} + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceList.json new file mode 100644 index 000000000000..944e0bf9fd11 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceList.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS" + } + }, + { + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 16, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "2c3d1bdae3412", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByInstancePool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByInstancePool.json new file mode 100644 index 000000000000..66d0154258a2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByInstancePool.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "Test1", + "instancePoolName": "pool1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "canadacentral", + "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "dnsZone": "1b4e2caff2530", + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "instancePoolId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_1", + "storageAccountType": "GRS" + } + }, + { + "location": "canadacentral", + "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 16, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "dnsZone": "2c3d1bdae3412", + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "instancePoolId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_1", + "storageAccountType": "GRS" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..bbacb5b1fcab --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "Test1", + "instancePoolName": "pool1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "canadacentral", + "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "dnsZone": "1b4e2caff2530", + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "instancePoolId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_1", + "storageAccountType": "GRS", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + } + } + }, + { + "location": "canadacentral", + "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 16, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "dnsZone": "2c3d1bdae3412", + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "instancePoolId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_2", + "storageAccountType": "GRS", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByResourceGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByResourceGroup.json new file mode 100644 index 000000000000..4046e16dd77c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByResourceGroup.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "Test1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "maintenanceConfigurationId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS" + } + }, + { + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 16, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "2c3d1bdae3412", + "maintenanceConfigurationId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..9c6f149018ae --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "Test1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + } + } + }, + { + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 16, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "2c3d1bdae3412", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_2", + "storageAccountType": "GRS", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..6216c987afd8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "storageAccountType": "GRS", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + } + } + }, + { + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 16, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "2c3d1bdae3412", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_2", + "storageAccountType": "GRS", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json new file mode 100644 index 000000000000..f0082f4df1da --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json new file mode 100644 index 000000000000..40d2fa42f35e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-09-01T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2018-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json new file mode 100644 index 000000000000..5aca355b4e12 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2018-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2018-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": "2018-09-07T08:00:00Z", + "backupTime": "2018-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json new file mode 100644 index 000000000000..54071664b0f2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000", + "name": "12341234-1234-1234-1234-123123123123;131657960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000", + "name": "43214321-4321-4321-4321-321321321321;131667960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json new file mode 100644 index 000000000000..0d6c5427be6f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "managedInstanceName": "testInstance1", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testserver2/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000", + "name": "12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "managedInstanceName": "testInstance2", + "managedInstanceCreateTime": "2017-04-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testserver3/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000", + "name": "43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance3", + "managedInstanceCreateTime": "2017-05-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json new file mode 100644 index 000000000000..9d944356047c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "policyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/managedInstances/testInstance/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/managedInstances/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json new file mode 100644 index 000000000000..4bc09e45c319 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "policyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/testResourceGroup/managedInstances/testInstance/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/managedInstances/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json new file mode 100644 index 000000000000..b9d537cbae4c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/managedInstances/testInstance/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/managedInstances/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json new file mode 100644 index 000000000000..6f061d9f0a2f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json new file mode 100644 index 000000000000..1f163b3da423 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/managedInstances/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json new file mode 100644 index 000000000000..7c1721cfb8f4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/managedInstances/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name-2", + "name": "private-endpoint-connection-name-2", + "type": "Microsoft.Sql/managedInstances/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name-2" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json new file mode 100644 index 000000000000..72d85ed37281 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by johndoe@contoso.com" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/managedInstances/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None" + } + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json new file mode 100644 index 000000000000..728c77927e3d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "groupName": "plr", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateLinkResources/plr", + "name": "plr", + "type": "Microsoft.Sql/managedInstances/privateLinkResources", + "properties": { + "groupId": "managedInstance", + "requiredMembers": [ + "managedInstance" + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json new file mode 100644 index 000000000000..1d1ccc94284d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateLinkResources/plr", + "name": "plr", + "type": "Microsoft.Sql/managedInstances/privateLinkResources", + "properties": { + "groupId": "managedInstance", + "requiredMembers": [ + "managedInstance" + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryGet.json new file mode 100644 index 000000000000..545ae70c2b82 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "databaseName": "database_1", + "queryId": "42", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "42", + "type": "Microsoft.Sql/managedInstances/databases/queries", + "properties": { + "queryText": "select * from DUMMY_TABLE" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsList.json new file mode 100644 index 000000000000..61e947700052 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsList.json @@ -0,0 +1,278 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "databaseName": "database_1", + "queryId": "42", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseName": "db1", + "queryId": "35", + "startTime": "03/01/2020 18:34:58", + "endTime": "03/02/2020 18:34:58", + "intervals": [ + { + "intervalStartTime": "03/02/2020 08:00:00", + "intervalType": "PT1H", + "executionCount": 160, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 1.507638888888889E-05, + "max": 2.5243055555555557E-05, + "avg": 1.665347222222222E-05, + "sum": 0.0026645555555555554, + "stdev": 1.4894345929850385E-06 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 4373.0, + "max": 18490.0, + "avg": 5026.625, + "sum": 804260.0, + "stdev": 1487.3520882343225 + } + ] + }, + { + "intervalStartTime": "03/02/2020 09:00:00", + "intervalType": "PT1H", + "executionCount": 20, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 2.3430555555555557E-05, + "max": 0.00014645833333333332, + "avg": 4.4797743055555553E-05, + "sum": 0.00089595486111111115, + "stdev": 3.8301183442043949E-05 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 6813.0, + "max": 42289.0, + "avg": 12963.2, + "sum": 259264.0, + "stdev": 11040.140794392071 + } + ] + }, + { + "intervalStartTime": "03/02/2020 15:00:00", + "intervalType": "PT1H", + "executionCount": 80, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 1.8215277777777777E-05, + "max": 2.764236111111111E-05, + "avg": 1.9315538194444445E-05, + "sum": 0.0015452430555555556, + "stdev": 1.0716305801875179E-06 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 5264.0, + "max": 7982.0, + "avg": 5586.2625, + "sum": 446901.0, + "stdev": 310.49157572107271 + } + ] + }, + { + "intervalStartTime": "03/02/2020 17:00:00", + "intervalType": "PT1H", + "executionCount": 80, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 1.7819444444444443E-05, + "max": 2.782638888888889E-05, + "avg": 1.9085373263888888E-05, + "sum": 0.0015268298611111112, + "stdev": 1.2309244108727927E-06 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 5147.0, + "max": 8052.0, + "avg": 5517.2, + "sum": 441376.0, + "stdev": 356.87635814102259 + } + ] + } + ] + }, + "id": "35", + "type": "Microsoft.Sql/managedInstances/databases/queries/statistics" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json new file mode 100644 index 000000000000..f76e4b713e69 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "databaseName": "database_1", + "queryId": "42", + "api-version": "2021-02-01-preview", + "interval": "P1D", + "startTime": "03/01/2020 16:23:09", + "endTime": "03/11/2020 14:00:00" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseName": "db1", + "queryId": "28", + "startTime": "03/01/2020 16:23:09", + "endTime": "03/11/2020 14:00:00", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "intervalType": "P1D", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 0.0015934667245370371, + "max": 0.0015934667245370371, + "avg": 0.0015934667245370371, + "sum": 0.0015934667245370371, + "stdev": 0.0 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 4.2245370370370369E-06, + "max": 4.2245370370370369E-06, + "avg": 4.2245370370370369E-06, + "sum": 4.2245370370370369E-06, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 8336.0, + "max": 8336.0, + "avg": 8336.0, + "sum": 8336.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 11091296.0, + "max": 11091296.0, + "avg": 11091296.0, + "sum": 11091296.0, + "stdev": 0.0 + } + ] + } + ] + }, + "id": "28", + "type": "Microsoft.Sql/managedInstances/databases/queries/statistics" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json new file mode 100644 index 000000000000..99b9bdcaf6ad --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "databaseName": "database_1", + "queryId": "42", + "api-version": "2021-02-01-preview", + "interval": "PT1H" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseName": "db1", + "queryId": "28", + "startTime": "03/10/2020 14:00:30", + "endTime": "03/11/2020 14:00:30", + "intervals": [ + { + "intervalStartTime": "03/11/2020 11:00:00", + "intervalType": "PT1H", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 0.038243201388888891, + "max": 0.038243201388888891, + "avg": 0.038243201388888891, + "sum": 0.038243201388888891, + "stdev": 0.0 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 0.0001013888888888889, + "max": 0.0001013888888888889, + "avg": 0.0001013888888888889, + "sum": 0.0001013888888888889, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 8336.0, + "max": 8336.0, + "avg": 8336.0, + "sum": 8336.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 11091296.0, + "max": 11091296.0, + "avg": 11091296.0, + "sum": 11091296.0, + "stdev": 0.0 + } + ] + } + ] + }, + "id": "28", + "type": "Microsoft.Sql/managedInstances/databases/queries/statistics" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json new file mode 100644 index 000000000000..26a63f67e07c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2021-02-01-preview", + "location": "japaneast", + "parameters": { + "properties": { + "maintenanceConfigurationId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default" + }, + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTdeCertificate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTdeCertificate.json new file mode 100644 index 000000000000..0cb19c1c3fa7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTdeCertificate.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000001", + "resourceGroupName": "testtdecert", + "managedInstanceName": "testtdecert", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "privateBlob": "MIIXXXXXXXX" + } + } + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTimeZoneGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTimeZoneGet.json new file mode 100644 index 000000000000..94128d2929af --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTimeZoneGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "37d5e605-6142-4d79-b564-28b6dbfeec0f", + "locationName": "canadaeast", + "timeZoneId": "Haiti Standard Time", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "timeZoneId": "Haiti Standard Time", + "displayName": "(UTC-05:00) Haiti" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Haiti Standard Time", + "name": "Haiti Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json new file mode 100644 index 000000000000..8993000db5c7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json @@ -0,0 +1,1266 @@ +{ + "parameters": { + "subscriptionId": "37d5e605-6142-4d79-b564-28b6dbfeec0f", + "locationName": "canadaeast", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "timeZoneId": "Afghanistan Standard Time", + "displayName": "(UTC+04:30) Kabul" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Afghanistan Standard Time", + "name": "Afghanistan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Alaskan Standard Time", + "displayName": "(UTC-09:00) Alaska" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Alaskan Standard Time", + "name": "Alaskan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Aleutian Standard Time", + "displayName": "(UTC-10:00) Aleutian Islands" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Aleutian Standard Time", + "name": "Aleutian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Altai Standard Time", + "displayName": "(UTC+07:00) Barnaul, Gorno-Altaysk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Altai Standard Time", + "name": "Altai Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Arab Standard Time", + "displayName": "(UTC+03:00) Kuwait, Riyadh" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Arab Standard Time", + "name": "Arab Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Arabian Standard Time", + "displayName": "(UTC+04:00) Abu Dhabi, Muscat" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Arabian Standard Time", + "name": "Arabian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Arabic Standard Time", + "displayName": "(UTC+03:00) Baghdad" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Arabic Standard Time", + "name": "Arabic Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Argentina Standard Time", + "displayName": "(UTC-03:00) City of Buenos Aires" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Argentina Standard Time", + "name": "Argentina Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Astrakhan Standard Time", + "displayName": "(UTC+04:00) Astrakhan, Ulyanovsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Astrakhan Standard Time", + "name": "Astrakhan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Atlantic Standard Time", + "displayName": "(UTC-04:00) Atlantic Time (Canada)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Atlantic Standard Time", + "name": "Atlantic Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "AUS Central Standard Time", + "displayName": "(UTC+09:30) Darwin" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/AUS Central Standard Time", + "name": "AUS Central Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Aus Central W. Standard Time", + "displayName": "(UTC+08:45) Eucla" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Aus Central W. Standard Time", + "name": "Aus Central W. Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "AUS Eastern Standard Time", + "displayName": "(UTC+10:00) Canberra, Melbourne, Sydney" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/AUS Eastern Standard Time", + "name": "AUS Eastern Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Azerbaijan Standard Time", + "displayName": "(UTC+04:00) Baku" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Azerbaijan Standard Time", + "name": "Azerbaijan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Azores Standard Time", + "displayName": "(UTC-01:00) Azores" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Azores Standard Time", + "name": "Azores Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Bahia Standard Time", + "displayName": "(UTC-03:00) Salvador" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Bahia Standard Time", + "name": "Bahia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Bangladesh Standard Time", + "displayName": "(UTC+06:00) Dhaka" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Bangladesh Standard Time", + "name": "Bangladesh Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Belarus Standard Time", + "displayName": "(UTC+03:00) Minsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Belarus Standard Time", + "name": "Belarus Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Bougainville Standard Time", + "displayName": "(UTC+11:00) Bougainville Island" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Bougainville Standard Time", + "name": "Bougainville Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Canada Central Standard Time", + "displayName": "(UTC-06:00) Saskatchewan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Canada Central Standard Time", + "name": "Canada Central Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Cape Verde Standard Time", + "displayName": "(UTC-01:00) Cabo Verde Is." + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Cape Verde Standard Time", + "name": "Cape Verde Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Caucasus Standard Time", + "displayName": "(UTC+04:00) Yerevan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Caucasus Standard Time", + "name": "Caucasus Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Cen. Australia Standard Time", + "displayName": "(UTC+09:30) Adelaide" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Cen. Australia Standard Time", + "name": "Cen. Australia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central America Standard Time", + "displayName": "(UTC-06:00) Central America" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central America Standard Time", + "name": "Central America Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Asia Standard Time", + "displayName": "(UTC+06:00) Astana" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Asia Standard Time", + "name": "Central Asia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Brazilian Standard Time", + "displayName": "(UTC-04:00) Cuiaba" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Brazilian Standard Time", + "name": "Central Brazilian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Europe Standard Time", + "displayName": "(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Europe Standard Time", + "name": "Central Europe Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central European Standard Time", + "displayName": "(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central European Standard Time", + "name": "Central European Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Pacific Standard Time", + "displayName": "(UTC+11:00) Solomon Is., New Caledonia" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Pacific Standard Time", + "name": "Central Pacific Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Standard Time", + "displayName": "(UTC-06:00) Central Time (US & Canada)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Standard Time", + "name": "Central Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Standard Time (Mexico)", + "displayName": "(UTC-06:00) Guadalajara, Mexico City, Monterrey" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Standard Time (Mexico)", + "name": "Central Standard Time (Mexico)", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Chatham Islands Standard Time", + "displayName": "(UTC+12:45) Chatham Islands" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Chatham Islands Standard Time", + "name": "Chatham Islands Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "China Standard Time", + "displayName": "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/China Standard Time", + "name": "China Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Cuba Standard Time", + "displayName": "(UTC-05:00) Havana" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Cuba Standard Time", + "name": "Cuba Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Dateline Standard Time", + "displayName": "(UTC-12:00) International Date Line West" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Dateline Standard Time", + "name": "Dateline Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "E. Africa Standard Time", + "displayName": "(UTC+03:00) Nairobi" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. Africa Standard Time", + "name": "E. Africa Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "E. Australia Standard Time", + "displayName": "(UTC+10:00) Brisbane" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. Australia Standard Time", + "name": "E. Australia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "E. Europe Standard Time", + "displayName": "(UTC+02:00) Chisinau" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. Europe Standard Time", + "name": "E. Europe Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "E. South America Standard Time", + "displayName": "(UTC-03:00) Brasilia" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. South America Standard Time", + "name": "E. South America Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Easter Island Standard Time", + "displayName": "(UTC-06:00) Easter Island" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Easter Island Standard Time", + "name": "Easter Island Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Eastern Standard Time", + "displayName": "(UTC-05:00) Eastern Time (US & Canada)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Eastern Standard Time", + "name": "Eastern Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Eastern Standard Time (Mexico)", + "displayName": "(UTC-05:00) Chetumal" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Eastern Standard Time (Mexico)", + "name": "Eastern Standard Time (Mexico)", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Egypt Standard Time", + "displayName": "(UTC+02:00) Cairo" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Egypt Standard Time", + "name": "Egypt Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Ekaterinburg Standard Time", + "displayName": "(UTC+05:00) Ekaterinburg" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Ekaterinburg Standard Time", + "name": "Ekaterinburg Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Fiji Standard Time", + "displayName": "(UTC+12:00) Fiji" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Fiji Standard Time", + "name": "Fiji Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "FLE Standard Time", + "displayName": "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/FLE Standard Time", + "name": "FLE Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Georgian Standard Time", + "displayName": "(UTC+04:00) Tbilisi" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Georgian Standard Time", + "name": "Georgian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "GMT Standard Time", + "displayName": "(UTC+00:00) Dublin, Edinburgh, Lisbon, London" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/GMT Standard Time", + "name": "GMT Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Greenland Standard Time", + "displayName": "(UTC-03:00) Greenland" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Greenland Standard Time", + "name": "Greenland Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Greenwich Standard Time", + "displayName": "(UTC+00:00) Monrovia, Reykjavik" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Greenwich Standard Time", + "name": "Greenwich Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "GTB Standard Time", + "displayName": "(UTC+02:00) Athens, Bucharest" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/GTB Standard Time", + "name": "GTB Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Haiti Standard Time", + "displayName": "(UTC-05:00) Haiti" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Haiti Standard Time", + "name": "Haiti Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Hawaiian Standard Time", + "displayName": "(UTC-10:00) Hawaii" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Hawaiian Standard Time", + "name": "Hawaiian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "India Standard Time", + "displayName": "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/India Standard Time", + "name": "India Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Iran Standard Time", + "displayName": "(UTC+03:30) Tehran" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Iran Standard Time", + "name": "Iran Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Israel Standard Time", + "displayName": "(UTC+02:00) Jerusalem" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Israel Standard Time", + "name": "Israel Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Jordan Standard Time", + "displayName": "(UTC+02:00) Amman" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Jordan Standard Time", + "name": "Jordan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Kaliningrad Standard Time", + "displayName": "(UTC+02:00) Kaliningrad" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Kaliningrad Standard Time", + "name": "Kaliningrad Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Kamchatka Standard Time", + "displayName": "(UTC+12:00) Petropavlovsk-Kamchatsky - Old" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Kamchatka Standard Time", + "name": "Kamchatka Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Korea Standard Time", + "displayName": "(UTC+09:00) Seoul" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Korea Standard Time", + "name": "Korea Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Libya Standard Time", + "displayName": "(UTC+02:00) Tripoli" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Libya Standard Time", + "name": "Libya Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Line Islands Standard Time", + "displayName": "(UTC+14:00) Kiritimati Island" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Line Islands Standard Time", + "name": "Line Islands Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Lord Howe Standard Time", + "displayName": "(UTC+10:30) Lord Howe Island" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Lord Howe Standard Time", + "name": "Lord Howe Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Magadan Standard Time", + "displayName": "(UTC+11:00) Magadan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Magadan Standard Time", + "name": "Magadan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Magallanes Standard Time", + "displayName": "(UTC-03:00) Punta Arenas" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Magallanes Standard Time", + "name": "Magallanes Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Marquesas Standard Time", + "displayName": "(UTC-09:30) Marquesas Islands" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Marquesas Standard Time", + "name": "Marquesas Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Mauritius Standard Time", + "displayName": "(UTC+04:00) Port Louis" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mauritius Standard Time", + "name": "Mauritius Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Mid-Atlantic Standard Time", + "displayName": "(UTC-02:00) Mid-Atlantic - Old" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mid-Atlantic Standard Time", + "name": "Mid-Atlantic Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Middle East Standard Time", + "displayName": "(UTC+02:00) Beirut" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Middle East Standard Time", + "name": "Middle East Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Montevideo Standard Time", + "displayName": "(UTC-03:00) Montevideo" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Montevideo Standard Time", + "name": "Montevideo Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Morocco Standard Time", + "displayName": "(UTC+01:00) Casablanca" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Morocco Standard Time", + "name": "Morocco Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Mountain Standard Time", + "displayName": "(UTC-07:00) Mountain Time (US & Canada)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mountain Standard Time", + "name": "Mountain Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Mountain Standard Time (Mexico)", + "displayName": "(UTC-07:00) Chihuahua, La Paz, Mazatlan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mountain Standard Time (Mexico)", + "name": "Mountain Standard Time (Mexico)", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Myanmar Standard Time", + "displayName": "(UTC+06:30) Yangon (Rangoon)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Myanmar Standard Time", + "name": "Myanmar Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "N. Central Asia Standard Time", + "displayName": "(UTC+07:00) Novosibirsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/N. Central Asia Standard Time", + "name": "N. Central Asia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Namibia Standard Time", + "displayName": "(UTC+02:00) Windhoek" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Namibia Standard Time", + "name": "Namibia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Nepal Standard Time", + "displayName": "(UTC+05:45) Kathmandu" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Nepal Standard Time", + "name": "Nepal Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "New Zealand Standard Time", + "displayName": "(UTC+12:00) Auckland, Wellington" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/New Zealand Standard Time", + "name": "New Zealand Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Newfoundland Standard Time", + "displayName": "(UTC-03:30) Newfoundland" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Newfoundland Standard Time", + "name": "Newfoundland Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Norfolk Standard Time", + "displayName": "(UTC+11:00) Norfolk Island" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Norfolk Standard Time", + "name": "Norfolk Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "North Asia East Standard Time", + "displayName": "(UTC+08:00) Irkutsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/North Asia East Standard Time", + "name": "North Asia East Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "North Asia Standard Time", + "displayName": "(UTC+07:00) Krasnoyarsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/North Asia Standard Time", + "name": "North Asia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "North Korea Standard Time", + "displayName": "(UTC+09:00) Pyongyang" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/North Korea Standard Time", + "name": "North Korea Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Omsk Standard Time", + "displayName": "(UTC+06:00) Omsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Omsk Standard Time", + "name": "Omsk Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Pacific SA Standard Time", + "displayName": "(UTC-04:00) Santiago" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pacific SA Standard Time", + "name": "Pacific SA Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Pacific Standard Time", + "displayName": "(UTC-08:00) Pacific Time (US & Canada)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pacific Standard Time", + "name": "Pacific Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Pacific Standard Time (Mexico)", + "displayName": "(UTC-08:00) Baja California" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pacific Standard Time (Mexico)", + "name": "Pacific Standard Time (Mexico)", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Pakistan Standard Time", + "displayName": "(UTC+05:00) Islamabad, Karachi" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pakistan Standard Time", + "name": "Pakistan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Paraguay Standard Time", + "displayName": "(UTC-04:00) Asuncion" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Paraguay Standard Time", + "name": "Paraguay Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Qyzylorda Standard Time", + "displayName": "(UTC+05:00) Qyzylorda" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Qyzylorda Standard Time", + "name": "Qyzylorda Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Romance Standard Time", + "displayName": "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Romance Standard Time", + "name": "Romance Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Russia Time Zone 10", + "displayName": "(UTC+11:00) Chokurdakh" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russia Time Zone 10", + "name": "Russia Time Zone 10", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Russia Time Zone 11", + "displayName": "(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russia Time Zone 11", + "name": "Russia Time Zone 11", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Russia Time Zone 3", + "displayName": "(UTC+04:00) Izhevsk, Samara" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russia Time Zone 3", + "name": "Russia Time Zone 3", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Russian Standard Time", + "displayName": "(UTC+03:00) Moscow, St. Petersburg" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russian Standard Time", + "name": "Russian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "SA Eastern Standard Time", + "displayName": "(UTC-03:00) Cayenne, Fortaleza" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SA Eastern Standard Time", + "name": "SA Eastern Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "SA Pacific Standard Time", + "displayName": "(UTC-05:00) Bogota, Lima, Quito, Rio Branco" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SA Pacific Standard Time", + "name": "SA Pacific Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "SA Western Standard Time", + "displayName": "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SA Western Standard Time", + "name": "SA Western Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Saint Pierre Standard Time", + "displayName": "(UTC-03:00) Saint Pierre and Miquelon" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Saint Pierre Standard Time", + "name": "Saint Pierre Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Sakhalin Standard Time", + "displayName": "(UTC+11:00) Sakhalin" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sakhalin Standard Time", + "name": "Sakhalin Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Samoa Standard Time", + "displayName": "(UTC+13:00) Samoa" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Samoa Standard Time", + "name": "Samoa Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Sao Tome Standard Time", + "displayName": "(UTC+00:00) Sao Tome" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sao Tome Standard Time", + "name": "Sao Tome Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Saratov Standard Time", + "displayName": "(UTC+04:00) Saratov" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Saratov Standard Time", + "name": "Saratov Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "SE Asia Standard Time", + "displayName": "(UTC+07:00) Bangkok, Hanoi, Jakarta" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SE Asia Standard Time", + "name": "SE Asia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Singapore Standard Time", + "displayName": "(UTC+08:00) Kuala Lumpur, Singapore" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Singapore Standard Time", + "name": "Singapore Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "South Africa Standard Time", + "displayName": "(UTC+02:00) Harare, Pretoria" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/South Africa Standard Time", + "name": "South Africa Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Sri Lanka Standard Time", + "displayName": "(UTC+05:30) Sri Jayawardenepura" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sri Lanka Standard Time", + "name": "Sri Lanka Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Sudan Standard Time", + "displayName": "(UTC+02:00) Khartoum" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sudan Standard Time", + "name": "Sudan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Syria Standard Time", + "displayName": "(UTC+02:00) Damascus" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Syria Standard Time", + "name": "Syria Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Taipei Standard Time", + "displayName": "(UTC+08:00) Taipei" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Taipei Standard Time", + "name": "Taipei Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Tasmania Standard Time", + "displayName": "(UTC+10:00) Hobart" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tasmania Standard Time", + "name": "Tasmania Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Tocantins Standard Time", + "displayName": "(UTC-03:00) Araguaina" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tocantins Standard Time", + "name": "Tocantins Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Tokyo Standard Time", + "displayName": "(UTC+09:00) Osaka, Sapporo, Tokyo" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tokyo Standard Time", + "name": "Tokyo Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Tomsk Standard Time", + "displayName": "(UTC+07:00) Tomsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tomsk Standard Time", + "name": "Tomsk Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Tonga Standard Time", + "displayName": "(UTC+13:00) Nuku'alofa" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tonga Standard Time", + "name": "Tonga Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Transbaikal Standard Time", + "displayName": "(UTC+09:00) Chita" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Transbaikal Standard Time", + "name": "Transbaikal Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Turkey Standard Time", + "displayName": "(UTC+03:00) Istanbul" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Turkey Standard Time", + "name": "Turkey Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Turks And Caicos Standard Time", + "displayName": "(UTC-05:00) Turks and Caicos" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Turks And Caicos Standard Time", + "name": "Turks And Caicos Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Ulaanbaatar Standard Time", + "displayName": "(UTC+08:00) Ulaanbaatar" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Ulaanbaatar Standard Time", + "name": "Ulaanbaatar Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "US Eastern Standard Time", + "displayName": "(UTC-05:00) Indiana (East)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/US Eastern Standard Time", + "name": "US Eastern Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "US Mountain Standard Time", + "displayName": "(UTC-07:00) Arizona" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/US Mountain Standard Time", + "name": "US Mountain Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC", + "displayName": "(UTC) Coordinated Universal Time" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC", + "name": "UTC", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC+12", + "displayName": "(UTC+12:00) Coordinated Universal Time+12" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC+12", + "name": "UTC+12", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC+13", + "displayName": "(UTC+13:00) Coordinated Universal Time+13" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC+13", + "name": "UTC+13", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC-02", + "displayName": "(UTC-02:00) Coordinated Universal Time-02" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-02", + "name": "UTC-02", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC-08", + "displayName": "(UTC-08:00) Coordinated Universal Time-08" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-08", + "name": "UTC-08", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC-09", + "displayName": "(UTC-09:00) Coordinated Universal Time-09" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-09", + "name": "UTC-09", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC-11", + "displayName": "(UTC-11:00) Coordinated Universal Time-11" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-11", + "name": "UTC-11", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Venezuela Standard Time", + "displayName": "(UTC-04:00) Caracas" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Venezuela Standard Time", + "name": "Venezuela Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Vladivostok Standard Time", + "displayName": "(UTC+10:00) Vladivostok" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Vladivostok Standard Time", + "name": "Vladivostok Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Volgograd Standard Time", + "displayName": "(UTC+04:00) Volgograd" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Volgograd Standard Time", + "name": "Volgograd Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "W. Australia Standard Time", + "displayName": "(UTC+08:00) Perth" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Australia Standard Time", + "name": "W. Australia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "W. Central Africa Standard Time", + "displayName": "(UTC+01:00) West Central Africa" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Central Africa Standard Time", + "name": "W. Central Africa Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "W. Europe Standard Time", + "displayName": "(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Europe Standard Time", + "name": "W. Europe Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "W. Mongolia Standard Time", + "displayName": "(UTC+07:00) Hovd" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Mongolia Standard Time", + "name": "W. Mongolia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "West Asia Standard Time", + "displayName": "(UTC+05:00) Ashgabat, Tashkent" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/West Asia Standard Time", + "name": "West Asia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "West Bank Standard Time", + "displayName": "(UTC+02:00) Gaza, Hebron" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/West Bank Standard Time", + "name": "West Bank Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "West Pacific Standard Time", + "displayName": "(UTC+10:00) Guam, Port Moresby" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/West Pacific Standard Time", + "name": "West Pacific Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Yakutsk Standard Time", + "displayName": "(UTC+09:00) Yakutsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Yakutsk Standard Time", + "name": "Yakutsk Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesList.json new file mode 100644 index 000000000000..d6e1dd734578 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesList.json @@ -0,0 +1,238 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview", + "observationMetric": "duration", + "interval": "PT1H" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "numberOfQueries": 5, + "aggregationFunction": "sum", + "observationMetric": "cpu", + "intervalType": "P1D", + "startTime": "03/01/2020 00:00:00", + "endTime": "03/05/2020 13:00:00", + "queries": [ + { + "databaseName": "db1", + "queryId": "25", + "intervals": [ + { + "intervalStartTime": "03/03/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0015841714409722222 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 4.3402777777777778E-06 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 8336.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 11306905.0 + } + ] + } + ] + }, + { + "databaseName": "db1", + "queryId": "21", + "intervals": [ + { + "intervalStartTime": "03/03/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00095214322916666668 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 2.3148148148148148E-07 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 1024.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 6620020.0 + } + ] + } + ] + }, + { + "databaseName": "db3", + "queryId": "3", + "intervals": [ + { + "intervalStartTime": "03/04/2020 00:00:00", + "executionCount": 104, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00080066116898148151 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 5543088.0 + } + ] + } + ] + }, + { + "databaseName": "db2", + "queryId": "3", + "intervals": [ + { + "intervalStartTime": "03/03/2020 00:00:00", + "executionCount": 89, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00068825434027777776 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 4761877.0 + } + ] + } + ] + }, + { + "databaseName": "db3", + "queryId": "22", + "intervals": [ + { + "intervalStartTime": "03/04/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00062206611689814817 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 1024.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 4454161.0 + } + ] + } + ] + } + ] + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesListMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesListMax.json new file mode 100644 index 000000000000..3ecfe2cf61eb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesListMax.json @@ -0,0 +1,241 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview", + "interval": "P1D", + "startTime": "2020-03-10T12:00:00Z", + "endTime": "2020-03-12T12:00:00Z", + "observationMetric": "cpu", + "databases": "db1,db2" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "numberOfQueries": 5, + "aggregationFunction": "sum", + "observationMetric": "cpu", + "intervalType": "P1D", + "startTime": "03/10/2020 00:00:00", + "endTime": "03/12/2020 13:00:00", + "queries": [ + { + "databaseName": "db1", + "queryId": "28", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0015934667245370371 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 4.2245370370370369E-06 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 8336.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 11091296.0 + } + ] + } + ] + }, + { + "databaseName": "db1", + "queryId": "24", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00095227835648148147 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 1.7361111111111112E-07 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 1024.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 6625562.0 + } + ] + } + ] + }, + { + "databaseName": "db1", + "queryId": "3", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "executionCount": 82, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00071831394675925925 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 4970199.0 + } + ] + } + ] + }, + { + "databaseName": "db1", + "queryId": "29", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00064944545717592593 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 5.0347222222222223E-06 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 1024.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 4530668.0 + } + ] + } + ] + }, + { + "databaseName": "db2", + "queryId": "25", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00062753689236111116 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 1024.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 4349943.0 + } + ] + } + ] + } + ] + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesListMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesListMin.json new file mode 100644 index 000000000000..b880137389b7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceTopQueriesListMin.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "numberOfQueries": 5, + "aggregationFunction": "sum", + "observationMetric": "cpu", + "intervalType": "PT1H", + "startTime": "03/10/2020 12:00:00", + "endTime": "03/11/2020 12:24:07", + "queries": [] + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceUpdateMax.json new file mode 100644 index 000000000000..f04ec988c94d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceUpdateMax.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2021-02-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + }, + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8 + }, + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "PLACEHOLDER", + "proxyOverride": "Redirect", + "publicDataEndpointEnabled": false, + "minimalTlsVersion": "1.2", + "licenseType": "BasePrice", + "vCores": 8, + "storageSizeInGB": 448, + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances", + "location": "japaneast", + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 448, + "licenseType": "BasePrice", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceUpdateMin.json new file mode 100644 index 000000000000..80a0ed989fb6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceUpdateMin.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2021-02-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen4", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "PLACEHOLDER", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default" + }, + "location": "japaneast", + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json new file mode 100644 index 000000000000..fb367829ff97 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json new file mode 100644 index 000000000000..2962e0bc3d96 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json new file mode 100644 index 000000000000..23a42264757b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..1f6517caeb03 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..941a792df2ab --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json new file mode 100644 index 000000000000..086589e6dcdf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertCreateMax.json new file mode 100644 index 000000000000..e28c5388cd64 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertCreateMax.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "testSecurityAlert@microsoft.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 5, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "testSecurityAlert@microsoft.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 5, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertCreateMin.json new file mode 100644 index 000000000000..5b037822428e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertCreateMin.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [], + "disabledAlerts": [], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertGet.json new file mode 100644 index 000000000000..0bcccacb7236 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertGet.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com;user@consoto.com" + ], + "disabledAlerts": [ + "Access_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "", + "creationTime": "2020-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertListByInstance.json new file mode 100644 index 000000000000..5f51571e3364 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedServerSecurityAlertListByInstance.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com;user@consoto.com" + ], + "disabledAlerts": [ + "Access_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "", + "creationTime": "2020-04-03T04:41:33.937Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionGet.json new file mode 100644 index 000000000000..4ae767e944ac --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "security-tde-resourcegroup", + "managedInstanceName": "securitytde", + "databaseName": "testdb", + "tdeName": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/managedInstances/securitytde/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionList.json new file mode 100644 index 000000000000..3b41f9848d31 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "security-tde-resourcegroup", + "managedInstanceName": "securitytde", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/managedInstances/securitytde/databases/testdb", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json new file mode 100644 index 000000000000..3a2325bea241 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securitytde-42-rg", + "managedInstanceName": "securitytde-42", + "databaseName": "testdb", + "tdeName": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/managedInstances/securitytde-42/databases/testdb/transparentDataEncryption", + "name": "current", + "type": "Microsoft.Sql/managedInstance/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/managedInstances/securitytde-42/databases/testdb/transparentDataEncryption", + "name": "current", + "type": "Microsoft.Sql/managedInstance/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OperationsHealthListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OperationsHealthListByLocation.json new file mode 100644 index 000000000000..f7e77dba6b6c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OperationsHealthListByLocation.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "WestUS", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "name": "Microsoft.Sql/managedServers/write", + "health": "Healthy", + "description": "Everything's good." + }, + "id": "/subscriptions/6c04259d-9b66-46b0-b07f-8939deb762e4/providers/Microsoft.Sql/locations/InProcess/operationsHealth", + "name": "OperationsHealth", + "type": "Microsoft.Sql/locations/listByOperationsHealth" + }, + { + "properties": { + "name": "Microsoft.Sql/servers/write", + "health": "Degraded", + "description": "Prolonged deployment times expected." + }, + "id": "/subscriptions/6c04259d-9b66-46b0-b07f-8939deb762e4/providers/Microsoft.Sql/locations/InProcess/operationsHealth", + "name": "OperationsHealth", + "type": "Microsoft.Sql/locations/listByOperationsHealth" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleCreate.json new file mode 100644 index 000000000000..5e4c0640c67a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleCreate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "outboundRuleFqdn": "server.database.windows.net", + "api-version": "2021-02-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net", + "name": "server.database.windows.net", + "type": "Microsoft.Sql/servers/outboundFirewallRules", + "properties": { + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net", + "name": "server.database.windows.net", + "type": "Microsoft.Sql/servers/outboundFirewallRules", + "properties": { + "provisioningState": "Creating" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleDelete.json new file mode 100644 index 000000000000..35c19bbb28b7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-6661", + "outboundRuleFqdn": "server.database.windows.net", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleGet.json new file mode 100644 index 000000000000..a5c9798a2e36 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "outboundRuleFqdn": "server.database.windows.net", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net", + "name": "server.database.windows.net", + "type": "Microsoft.Sql/servers/outboundFirewallRules", + "properties": { + "provisioningState": "Ready" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleList.json new file mode 100644 index 000000000000..258e6856ed87 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net", + "name": "server.database.windows.net", + "type": "Microsoft.Sql/servers/outboundFirewallRules", + "properties": { + "provisioningState": "Ready" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/storage.blob.windows.net", + "name": "storage.blob.windows.net", + "type": "Microsoft.Sql/servers/outboundFirewallRules", + "properties": { + "provisioningState": "Creating" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchInstancePool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchInstancePool.json new file mode 100644 index 000000000000..79dbdf2c7970 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchInstancePool.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2021-02-01-preview", + "parameters": { + "tags": { + "x": "y" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": { + "x": "y" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabase.json new file mode 100644 index 000000000000..c72f2b6f1b24 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabase.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "sku": { + "name": "BC_Gen4_4" + }, + "properties": { + "maxSizeBytes": 1073741824, + "licenseType": "LicenseIncluded" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 4 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "requestedServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 4 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Local", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json new file mode 100644 index 000000000000..b3c630d2ab36 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "sku": { + "name": "BC_Gen5_4" + }, + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 4 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen5_2", + "requestedServiceObjectiveName": "BC_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "currentSku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 4 + }, + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json new file mode 100644 index 000000000000..ffe7170204be --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "sku": { + "name": "BC_Gen5_4" + }, + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 4 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen5_4", + "requestedServiceObjectiveName": "BC_Gen5_4", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "currentSku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 4 + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PauseDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PauseDatabase.json new file mode 100644 index 000000000000..b98d769ca218 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PauseDatabase.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdwdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "DataWarehouse" + }, + "kind": "v12.0,user,datawarehouse", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 10995116277760, + "status": "Paused", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-07-13T02:04:26.187Z", + "currentServiceObjectiveName": "D1", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdwdb", + "name": "testdwdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionDelete.json new file mode 100644 index 000000000000..173e499d29bc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionGet.json new file mode 100644 index 000000000000..66723a406c41 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/servers/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionList.json new file mode 100644 index 000000000000..fcf1cedc484f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionList.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name-2", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/servers/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name-2", + "name": "private-endpoint-connection-name-2", + "type": "Microsoft.Sql/servers/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name-2" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionUpdate.json new file mode 100644 index 000000000000..33da2231de3b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateEndpointConnectionUpdate.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by johndoe@contoso.com" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/servers/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None" + } + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateLinkResourcesGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateLinkResourcesGet.json new file mode 100644 index 000000000000..c5b2f779573f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateLinkResourcesGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "groupName": "plr", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateLinkResources/plr", + "name": "plr", + "type": "Microsoft.Sql/servers/privateLinkResources", + "properties": { + "groupId": "sqlServer", + "requiredMembers": [ + "sqlServer" + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateLinkResourcesList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateLinkResourcesList.json new file mode 100644 index 000000000000..36eca61aff9f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/PrivateLinkResourcesList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateLinkResources/plr", + "name": "plr", + "type": "Microsoft.Sql/servers/privateLinkResources", + "properties": { + "groupId": "sqlServer", + "requiredMembers": [ + "sqlServer" + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json new file mode 100644 index 000000000000..de223408005a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json new file mode 100644 index 000000000000..de223408005a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RenameDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RenameDatabase.json new file mode 100644 index 000000000000..97783ba7d216 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RenameDatabase.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2021-02-01-preview", + "parameters": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/newtestdb" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkGet.json new file mode 100644 index 000000000000..dd33bc425033 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkGet.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "databaseName": "gamma-db", + "replicationLinkName": "4891ca10-ebd0-47d7-9182-c722651780fb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "gamma-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:12:43.783Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb", + "name": "4891ca10-ebd0-47d7-9182-c722651780fb" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkListByDatabase.json new file mode 100644 index 000000000000..bcab49dbba19 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkListByDatabase.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "databaseName": "tetha-db", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "tetha-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:11:46.907Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/fb92de60-eb87-4a58-b250-3362d0cfdf26", + "name": "fb92de60-eb87-4a58-b250-3362d0cfdf26" + }, + { + "properties": { + "partnerServer": "targetsvr", + "partnerDatabase": "tetha-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:11:34.423Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/6ad1eefc-18a2-4fcb-94f3-4b654ba788d7", + "name": "6ad1eefc-18a2-4fcb-94f3-4b654ba788d7" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkListByServer.json new file mode 100644 index 000000000000..37bc929c2bdc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkListByServer.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "tetha-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:11:46.907Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/fb92de60-eb87-4a58-b250-3362d0cfdf26", + "name": "fb92de60-eb87-4a58-b250-3362d0cfdf26" + }, + { + "properties": { + "partnerServer": "targetsvr", + "partnerDatabase": "tetha-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:11:34.423Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/6ad1eefc-18a2-4fcb-94f3-4b654ba788d7", + "name": "6ad1eefc-18a2-4fcb-94f3-4b654ba788d7" + }, + { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "gamma-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:12:43.783Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb", + "name": "4891ca10-ebd0-47d7-9182-c722651780fb" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json new file mode 100644 index 000000000000..8bd86c07298f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "targetServerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2", + "targetDatabaseName": "testDatabase2", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "name": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "type": "Microsoft.Sql/locations/longTermRetentionBackupOperationResults", + "properties": { + "requestId": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "fromBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "operationType": "CopyBackup", + "status": "Succeeded", + "toBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver2/longterRetentionDatabases/testDatabase2/longTermRetentionBackups/55555555-6666-7777-8888-111111111111;131637960820000000", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json new file mode 100644 index 000000000000..5c623bfaab28 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json new file mode 100644 index 000000000000..a4659ada648a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/2017-03-10T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2017-09-06T08:00:00.000Z", + "name": "2017-03-10T08:00:00.000Z;55555555-6666-7777-8888-999999999999;131637960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json new file mode 100644 index 000000000000..5f2ac5ebcc3c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131657960820000000", + "name": "55555555-6666-7777-8888-999999999999;131657960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131677960820000000", + "name": "55555555-6666-7777-8888-999999999999;131677960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": "2017-09-07T08:00:00Z", + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json new file mode 100644 index 000000000000..f85370a2feec --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver1", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver2/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000", + "name": "12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver2", + "serverCreateTime": "2017-04-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver3/longTermRetentionDatabases/testDatabase3/longTermRetentionBackups/43214321-4321-4321-4321-321321321321;131677960820000000", + "name": "43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver3", + "serverCreateTime": "2017-05-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json new file mode 100644 index 000000000000..542141149562 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000", + "name": "12341234-1234-1234-1234-123123123123;131657960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase3/longTermRetentionBackups/43214321-4321-4321-4321-321321321321;131677960820000000", + "name": "43214321-4321-4321-4321-321321321321;131667960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json new file mode 100644 index 000000000000..8ae4c63016e2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "requestedBackupStorageRedundancy": "Geo" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "name": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "type": "Microsoft.Sql/locations/longTermRetentionBackupOperationResults", + "properties": { + "requestId": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "fromBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "operationType": "UpdateBackup", + "status": "Succeeded", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json new file mode 100644 index 000000000000..e047865aac0f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json new file mode 100644 index 000000000000..7c35e7c6dac6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json new file mode 100644 index 000000000000..baba23522f48 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2018-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2018-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2018-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": "2018-09-07T08:00:00Z", + "backupTime": "2018-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json new file mode 100644 index 000000000000..4ee3a385a95a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000", + "name": "12341234-1234-1234-1234-123123123123;131657960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000", + "name": "43214321-4321-4321-4321-321321321321;131667960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json new file mode 100644 index 000000000000..0052d41f6960 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance1/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "name": "55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance1", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance2/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000", + "name": "12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance2", + "managedInstanceCreateTime": "2017-04-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance3/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000", + "name": "43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance3", + "managedInstanceCreateTime": "2017-05-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json new file mode 100644 index 000000000000..e31440b7fc24 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseName": "testdb", + "creationDate": "2017-05-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000", + "name": "testdb,131403269876900000", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases" + }, + { + "properties": { + "databaseName": "testdb2", + "creationDate": "2017-05-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb2,131403269876900000", + "name": "testdb2,131403269876900000", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResumeDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResumeDatabase.json new file mode 100644 index 000000000000..bb2f4eaa4b84 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ResumeDatabase.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdwdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "DataWarehouse" + }, + "kind": "v12.0,user,datawarehouse", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 10995116277760, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-07-13T02:04:26.187Z", + "currentServiceObjectiveName": "D1", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdwdb", + "name": "testdwdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsCurrentUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsCurrentUpdate.json new file mode 100644 index 000000000000..f85847c4ebf1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsCurrentUpdate.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "operations": [ + { + "properties": { + "op": "set", + "schema": "dbo", + "table": "table1", + "column": "column1", + "sensitivityLabel": { + "properties": { + "labelName": "Highly Confidential", + "labelId": "3A477B16-9423-432B-AA97-6069B481CEC3", + "informationType": "Financial", + "informationTypeId": "1D3652D6-422C-4115-82F1-65DAEBC665C8", + "rank": "Low" + } + } + } + }, + { + "properties": { + "op": "set", + "schema": "dbo", + "table": "table2", + "column": "column2", + "sensitivityLabel": { + "properties": { + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "Critical" + } + } + } + }, + { + "properties": { + "op": "remove", + "schema": "dbo", + "table": "Table1", + "column": "Column3" + } + } + ] + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json new file mode 100644 index 000000000000..2b661dc364b7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn3/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn3", + "informationType": "Financial", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "labelName": "Sensitive", + "rank": "Low" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn4/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn4", + "informationType": "Email", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "None" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json new file mode 100644 index 000000000000..37d5b7112199 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/recommended", + "name": "recommended", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "Financial", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "labelName": "Sensitive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended", + "name": "recommended", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn2", + "informationType": "Email", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsRecommendedUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsRecommendedUpdate.json new file mode 100644 index 000000000000..97a6beccbf8c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SensitivityLabelsRecommendedUpdate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "api-version": "2021-02-01-preview", + "parameters": { + "operations": [ + { + "properties": { + "op": "enable", + "schema": "dbo", + "table": "table1", + "column": "column1" + } + }, + { + "properties": { + "op": "enable", + "schema": "dbo", + "table": "table2", + "column": "column2" + } + }, + { + "properties": { + "op": "disable", + "schema": "dbo", + "table": "table1", + "column": "column3" + } + } + ] + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorGet.json new file mode 100644 index 000000000000..bde4e548f76e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "advisorName": "CreateIndex", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorList.json new file mode 100644 index 000000000000..9fa25bd18ebd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorList.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex", + "name": "DropIndex", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DbParameterization", + "name": "DbParameterization", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/SchemaIssue", + "name": "SchemaIssue", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PublicPreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/ForceLastGoodPlan", + "name": "ForceLastGoodPlan", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PrivatePreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + } + ] + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorUpdate.json new file mode 100644 index 000000000000..3b75397099b5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAdvisorUpdate.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "advisorName": "CreateIndex", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "autoExecuteStatus": "Disabled" + } + } + }, + "responses": { + "200": { + "body": { + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Server" + }, + "location": "East Asia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/advisors" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAuditingSettingsList.json new file mode 100644 index 000000000000..5a8d465cfbd3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAuditingSettingsList.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningGet.json new file mode 100644 index 000000000000..3bc6673b7f34 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningGet.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "createIndex": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "dropIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningUpdateMax.json new file mode 100644 index 000000000000..2edf49bfa1d8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningUpdateMax.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "desiredState": "Auto", + "options": { + "createIndex": { + "desiredState": "Off" + }, + "dropIndex": { + "desiredState": "On" + }, + "forceLastGoodPlan": { + "desiredState": "Default" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "createIndex": { + "desiredState": "Off", + "actualState": "Off" + }, + "dropIndex": { + "desiredState": "On", + "actualState": "On" + }, + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningUpdateMin.json new file mode 100644 index 000000000000..24cb24211ede --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerAutomaticTuningUpdateMin.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "desiredState": "Auto" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "createIndex": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "dropIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingCreateMax.json new file mode 100644 index 000000000000..cd7676a9a4da --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingCreateMax.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": true + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingCreateMin.json new file mode 100644 index 000000000000..690d18ea6e06 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingCreateMin.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ] + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingGet.json new file mode 100644 index 000000000000..60341dd6603c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerBlobAuditingGet.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerCreate.json new file mode 100644 index 000000000000..003d4de4e406 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerCreate.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "PLACEHOLDER", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled" + }, + "location": "Japan East" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "version": "12.0", + "state": "Ready", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDelete.json new file mode 100644 index 000000000000..997eb974ccdf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-6661", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditCreateMax.json new file mode 100644 index 000000000000..ffdbab787c11 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditCreateMax.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "devAuditTestRG", + "serverName": "devOpsAuditTestSvr", + "devOpsAuditingSettingsName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/devOpsAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isAzureMonitorTargetEnabled": true + } + } + }, + "202": { + "startTime": "2020-09-22T09:34:54.72Z", + "operation": "UpsertServerDevOpsAuditingSettings" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditCreateMin.json new file mode 100644 index 000000000000..5e02c3f3ed15 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditCreateMin.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "devAuditTestRG", + "serverName": "devOpsAuditTestSvr", + "devOpsAuditingSettingsName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/devOpsAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000" + } + } + }, + "202": { + "startTime": "2020-09-09T09:34:54.72Z", + "operation": "UpsertServerDevOpsAuditingSettings" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditGet.json new file mode 100644 index 000000000000..596c89eb4b7b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "devAuditTestRG", + "serverName": "devOpsAuditTestSvr", + "devOpsAuditingSettingsName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/devOpsAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isAzureMonitorTargetEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditSettingsList.json new file mode 100644 index 000000000000..5c984908785d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDevOpsAuditSettingsList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "devAuditTestRG", + "serverName": "devOpsAuditTestSvr", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/devOpsAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isAzureMonitorTargetEnabled": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasAcquire.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasAcquire.json new file mode 100644 index 000000000000..cdcbb74b1a27 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasAcquire.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "dns-alias-new-server", + "dnsAliasName": "dns-alias-name-1", + "api-version": "2021-02-01-preview", + "parameters": { + "oldServerDnsAliasId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-new-server/dnsAliases/dns-alias-name-1", + "name": "server-dns-alias-name-1", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-name-1.database.windows.net" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasCreateOrUpdate.json new file mode 100644 index 000000000000..3179464f0027 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasCreateOrUpdate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "dns-alias-server", + "dnsAliasName": "dns-alias-name-1", + "api-version": "2021-02-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-name-1", + "name": "dns-alias-name-1", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-name-1.database.windows.net" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-name-1", + "name": "dns-alias-name-1", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-name-1.database.windows.net" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasDelete.json new file mode 100644 index 000000000000..595073e14f86 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "dns-alias-server", + "dnsAliasName": "dns-alias-name-1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasGet.json new file mode 100644 index 000000000000..e544a1cb4ba3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "dns-alias-server", + "dnsAliasName": "dns-alias-name-1", + "api-version": "2021-02-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-name-1", + "name": "dns-alias-name-1", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-name-1.database.windows.net" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasList.json new file mode 100644 index 000000000000..dbf0c4e87a05 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDnsAliasList.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "dns-alias-server", + "api-version": "2021-02-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-1", + "name": "server-dns-alias-1", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-1.database.windows.net" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-2", + "name": "server-dns-alias-2", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-2.database.windows.net" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerExtendedAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerExtendedAuditingSettingsList.json new file mode 100644 index 000000000000..a5cb467a6f9f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerExtendedAuditingSettingsList.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGet.json new file mode 100644 index 000000000000..8fb715e570bc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGet.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..d610ccd0d65d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyCreateOrUpdate.json new file mode 100644 index 000000000000..9739c217feae --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyCreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyDelete.json new file mode 100644 index 000000000000..d3bc95a3cb26 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyGet.json new file mode 100644 index 000000000000..ec2afabb40ba --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyList.json new file mode 100644 index 000000000000..c6ad45c503f8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerKeyList.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "someVault_someKey_01234567890123456789012345678901", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/myVault_myKey_11111111111111111111111111111111", + "name": "myVault_myKey_11111111111111111111111111111111", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "AAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBB", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/ServiceManaged", + "name": "ServiceManaged", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "servicemanaged", + "properties": {} + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerList.json new file mode 100644 index 000000000000..8801c39e5de4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerList.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661", + "name": "sqlcrudtest-6661", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-6661.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroup.json new file mode 100644 index 000000000000..e7a97fe66eb2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroup.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661", + "name": "sqlcrudtest-6661", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-6661.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..c22ad234ce12 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661", + "name": "sqlcrudtest-6661", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-6661.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..c4321b35767d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListWithExpandEqualsAdministrators.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661", + "name": "sqlcrudtest-6661", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-6661.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerRecommendedActionListExpand.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerRecommendedActionListExpand.json new file mode 100644 index 000000000000..be623b1bcba6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerRecommendedActionListExpand.json @@ -0,0 +1,626 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "api-version": "2021-02-01-preview", + "$expand": "recommendedActions" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Server", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:04Z", + "lastRefresh": "2017-03-01T14:38:04Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-06-20T15:15:40Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 1440.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 209.3125 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money],[Power]", + "includedColumns": "[Hour], [System], [LastChanged]", + "databaseName": "IndexAdvisor_test_3" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex/recommendedActions/IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "name": "IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE] ON [dbo].[Employees] ([City], [State]) INCLUDE ([Postal]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 17.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 128.0 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[Employees]", + "indexColumns": "[City], [State]", + "includedColumns": "[Postal]", + "databaseName": "IndexAdvisor_test_3" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex/recommendedActions/IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "name": "IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "User", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC] ON [dbo].[DataPoints]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 5040.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 120.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.9 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.3175 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 12.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 1.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 130.742187 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money]", + "includedColumns": "[Power],[Pineapple]", + "indexActionStartTime": "2017-03-01T14:38:05.337", + "indexActionDuration": "00:01:00", + "databaseName": "IndexAdvisor_test_3" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex", + "name": "DropIndex", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A", + "name": "IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [MyIndex123] ON [CRM].[DataPoints1]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 803.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 144.6875 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "MyIndex123", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints1]", + "indexColumns": "[Cookies],[SessionId]", + "includedColumns": "[Apple]", + "databaseName": "IndexAdvisor_test_3" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints2]_E4B21F229379807E531A", + "name": "IR_[CRM]_[DataPoints2]_E4B21F229379807E531A", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "User", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [MyIndex321] ON [CRM].[DataPoints2] ([Cookies],[SessionId],[Protocol]) INCLUDE ([Apple]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 705.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": -342.0 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "MyIndex321", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints2]", + "indexColumns": "[Cookies],[SessionId],[Protocol]", + "includedColumns": "[Apple]", + "indexActionStartTime": "2017-03-01T14:38:05.697", + "indexActionDuration": "00:01:00", + "databaseName": "IndexAdvisor_test_3" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B", + "name": "IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "System", + "lastModified": "2017-02-28T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [IX_FF] ON [dbo].[FactFinance] ([FinanceKey],[DateKey]) INCLUDE ([OrganizationKey]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 705.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": -342.0 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "IX_FF", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[FactFinance]", + "indexColumns": "[FinanceKey],[DateKey]", + "includedColumns": "[OrganizationKey]", + "indexActionStartTime": "2017-03-01T14:38:05.837", + "indexActionDuration": "00:01:00", + "databaseName": "IndexAdvisor_test_3" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B", + "name": "IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Unused", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-03-23T14:14:35Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-23T14:14:35Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [IX_FF] ON [CRM].[DataPoints1]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 645.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "IX_FF", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints1]", + "indexColumns": "[Protocol],[SessionId]", + "includedColumns": "[Apple]", + "databaseName": "IndexAdvisor_test_3" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DbParameterization", + "name": "DbParameterization", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DbParameterization/recommendedActions/ForceDbParameterization", + "name": "ForceDbParameterization", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:37:44Z", + "lastRefresh": "2017-03-01T14:37:44Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-05-11T15:08:31Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-05-11T15:08:31Z", + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "ALTER DATABASE [IndexAdvisor_test_3] SET PARAMETERIZATION FORCED" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "CpuSavings", + "unit": "Percent", + "changeValueAbsolute": 22.5613696939135 + }, + { + "dimensionName": "QueryDurationDecrease", + "unit": "secs", + "changeValueAbsolute": 0.701823681806341 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "databaseName": "IndexAdvisor_test_3" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/SchemaIssue", + "name": "SchemaIssue", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PublicPreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/SchemaIssue/recommendedActions/SchemaProblem_1A258C5714A7410C9D23", + "name": "SchemaProblem_1A258C5714A7410C9D23", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "SchemaProblem", + "validSince": "2017-03-01T14:37:48Z", + "lastRefresh": "2017-06-07T22:19:53Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:37:48Z" + }, + "isExecutableAction": false, + "isRevertableAction": false, + "isArchivedAction": false, + "score": 3, + "implementationDetails": {}, + "errorDetails": {}, + "estimatedImpact": [], + "observedImpact": [], + "timeSeries": [], + "details": { + "sqlErrorNumber": 208, + "sqlErrorMessage": "Invalid object name 'dbo.Companies'.", + "sqlErrorCount": 342482, + "databaseName": "IndexAdvisor_test_3" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/ForceLastGoodPlan", + "name": "ForceLastGoodPlan", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PrivatePreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendedActions": [] + } + } + ] + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsCreateMax.json new file mode 100644 index 000000000000..f6409dc9edaf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsCreateMax.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "testSecurityAlert@microsoft.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 5, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default", + "name": "Default", + "type": "Microsoft.Sql/servers/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "testSecurityAlert@microsoft.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 5, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsCreateMin.json new file mode 100644 index 000000000000..eea95e485496 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsCreateMin.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default", + "name": "Default", + "type": "Microsoft.Sql/servers/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": false, + "emailAddresses": [ + "" + ], + "disabledAlerts": [ + "" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsGet.json new file mode 100644 index 000000000000..c5f2773d42f7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsGet.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default", + "name": "Default", + "type": "Microsoft.Sql/servers/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2020-04-03T04:41:33.937Z", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com;user@consoto.com" + ], + "disabledAlerts": [ + "Access_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsListByServer.json new file mode 100644 index 000000000000..30ad8f902cdc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerSecurityAlertsListByServer.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies", + "name": "Default", + "type": "Microsoft.Sql/servers/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2020-04-03T04:41:33.937Z", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com;user@consoto.com" + ], + "disabledAlerts": [ + "Access_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupCreate.json new file mode 100644 index 000000000000..31002004321a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupCreate.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "serverTrustGroupName": "server-trust-group-test", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupDelete.json new file mode 100644 index 000000000000..8fb1ea8c9ac6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "serverTrustGroupName": "server-trust-group-test", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupGet.json new file mode 100644 index 000000000000..97f0261db9e9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "serverTrustGroupName": "server-trust-group-test", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupList.json new file mode 100644 index 000000000000..323c7fc6148d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupList.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test-2", + "name": "server-trust-group-test-2", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-3" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupListByManagedInstance.json new file mode 100644 index 000000000000..6a40a8f14d2e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerTrustGroupListByManagedInstance.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance-1", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test-2", + "name": "server-trust-group-test-2", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-3" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerUpdate.json new file mode 100644 index 000000000000..ee1e37eeaa73 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerUpdate.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "placeholder", + "publicNetworkAccess": "Disabled", + "restrictOutboundNetworkAccess": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "publicNetworkAccess": "Disabled", + "restrictOutboundNetworkAccess": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json new file mode 100644 index 000000000000..886e1578fdfe --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json new file mode 100644 index 000000000000..ebed6259ab1e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json new file mode 100644 index 000000000000..5aabdb1153c9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..0c5a8662e2eb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentDelete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..c405a02f41c7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json new file mode 100644 index 000000000000..76cf6e6ce3a0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlAgentConfigurationGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlAgentConfigurationGet.json new file mode 100644 index 000000000000..6e161b7d9498 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlAgentConfigurationGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/sqlAgent/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/sqlAgent", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlAgentConfigurationPut.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlAgentConfigurationPut.json new file mode 100644 index 000000000000..fd71c4b1b967 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlAgentConfigurationPut.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/sqlAgent/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/sqlAgent", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlTdeCertificateCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlTdeCertificateCreate.json new file mode 100644 index 000000000000..4802a5642c32 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SqlTdeCertificateCreate.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000001", + "resourceGroupName": "testtdecert", + "serverName": "testtdecert", + "tdeCertName": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "privateBlob": "MIIXXXXXXXX" + } + } + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SubscriptionUsageGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SubscriptionUsageGet.json new file mode 100644 index 000000000000..fef19ba6e824 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SubscriptionUsageGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "WestUS", + "usageName": "ServerQuota", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "displayName": "Regional Server Quota for West US", + "currentValue": 1.0, + "limit": 20.0, + "unit": "Count" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/ServerQuota", + "name": "ServerQuota", + "type": "Microsoft.Sql/locations/usages" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SubscriptionUsageListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SubscriptionUsageListByLocation.json new file mode 100644 index 000000000000..74ee126c4676 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SubscriptionUsageListByLocation.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "WestUS", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "displayName": "Regional Server Quota for West US", + "currentValue": 1.0, + "limit": 20.0, + "unit": "Count" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/ServerQuota", + "name": "ServerQuota", + "type": "Microsoft.Sql/locations/usages" + }, + { + "properties": { + "displayName": "Free Database Count per Subscription for West US", + "currentValue": 0.0, + "limit": 1.0, + "unit": "Count" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/SubscriptionFreeDatabaseCount", + "name": "SubscriptionFreeDatabaseCount", + "type": "Microsoft.Sql/locations/usages" + }, + { + "properties": { + "displayName": "Free to Basic Database Upgrade count-down in West US", + "currentValue": 365.0, + "limit": 365.0, + "unit": "Count" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/SubscriptionFreeDatabaseDaysLeft", + "name": "SubscriptionFreeDatabaseDaysLeft", + "type": "Microsoft.Sql/locations/usages" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentCreate.json new file mode 100644 index 000000000000..63ec7a48fe4d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentCreate.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + }, + "201": { + "body": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentDelete.json new file mode 100644 index 000000000000..6049dcf1aca2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGenerateKey.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGenerateKey.json new file mode 100644 index 000000000000..1956c6b2a561 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGenerateKey.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "syncAgentKey": "865f9998-6dae-4214-bbb1-4796b7c76ca0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGet.json new file mode 100644 index 000000000000..6104e1652f81 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGetLinkedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGetLinkedDatabases.json new file mode 100644 index 000000000000..0fbfb3ce180e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentGetLinkedDatabases.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseType": "SqlServerDatabase", + "databaseId": "55555555-6666-7777-8888-999999999999", + "description": "", + "serverName": "DummySqlServer", + "databaseName": "DummySqlServerDb", + "userName": "DummyUser" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187/linkedDatabases/55555555-6666-7777-8888-999999999999" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentListByServer.json new file mode 100644 index 000000000000..662d29bb27b8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentListByServer.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentUpdate.json new file mode 100644 index 000000000000..63ec7a48fe4d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncAgentUpdate.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + }, + "201": { + "body": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupCancelSync.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupCancelSync.json new file mode 100644 index 000000000000..f383468e82e0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupCancelSync.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupCreate.json new file mode 100644 index 000000000000..9e81d1a69cee --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupCreate.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "interval": -1, + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "usePrivateLinkConnection": true + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-8475" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + }, + "201": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-8475" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupDelete.json new file mode 100644 index 000000000000..4326cd6d29fa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGet.json new file mode 100644 index 000000000000..9fefe0a7760f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetHubSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetHubSchema.json new file mode 100644 index 000000000000..f351b16d6e08 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetHubSchema.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "tables": [ + { + "columns": [ + { + "dataSize": "4", + "dataType": "int", + "hasError": false, + "isPrimaryKey": false, + "name": "intField", + "quotedName": "[intField]" + }, + { + "dataSize": "100", + "dataType": "nvarchar", + "hasError": false, + "isPrimaryKey": false, + "name": "charField", + "quotedName": "[charField]" + } + ], + "errorId": "Schema_TableHasNoPrimaryKey", + "hasError": true, + "name": "dbo.myTable", + "quotedName": "[dbo].[myTable]" + } + ], + "lastUpdateTime": "2017-05-30T07:16:08.21Z" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetLog.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetLog.json new file mode 100644 index 000000000000..40ca87bf0cb0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetLog.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "startTime": "2017-01-01T00:00:00", + "endTime": "2017-12-31T00:00:00", + "type": "All", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "timestamp": "2017-05-30T07:16:08.25Z", + "type": "Success", + "source": "syncgroupcrud-8475.database.windows.net/hub", + "details": "Schema information obtained successfully.", + "tracingId": "c0480c8e-6269-424e-9404-b00efce0ebae", + "operationStatus": "SchemaRefreshSuccess" + }, + { + "timestamp": "2017-05-30T07:03:37.5733333Z", + "type": "Error", + "source": "syncgroupcrud-8475.database.windows.net/member", + "details": "Getting schema information for the database failed with the exception \"Failed to connect to server .\nInner exception: SqlException Error Code: -2146232060 - SqlError Number:53, Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) \nInner exception: The network path was not found\n For more information, provide tracing ID ‘cd3aa28c-0c31-471f-8a77-f1b21c908cbd’ to customer support.\"", + "tracingId": "cd3aa28c-0c31-471f-8a77-f1b21c908cbd", + "operationStatus": "SchemaRefreshFailure" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetSyncDatabaseId.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetSyncDatabaseId.json new file mode 100644 index 000000000000..71b61e5686a7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupGetSyncDatabaseId.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "westus", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupListByDatabase.json new file mode 100644 index 000000000000..d6f1ed2d1fac --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupListByDatabase.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + }, + { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-5374" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-5374", + "name": "syncgroupcrud-5374", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupPatch.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupPatch.json new file mode 100644 index 000000000000..339b91ba8a02 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupPatch.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "interval": -1, + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "hubDatabasePassword": "hubPassword", + "usePrivateLinkConnection": true + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroup", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupRefreshHubSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupRefreshHubSchema.json new file mode 100644 index 000000000000..c859908fd3f2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupRefreshHubSchema.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupTriggerSync.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupTriggerSync.json new file mode 100644 index 000000000000..f383468e82e0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupTriggerSync.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupUpdate.json new file mode 100644 index 000000000000..ddcae6cfe885 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncGroupUpdate.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "interval": -1, + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "usePrivateLinkConnection": true + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + }, + "201": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberCreate.json new file mode 100644 index 000000000000..7b80c6ccd8f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberCreate.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncmembercrud-4879", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "usePrivateLinkConnection": true, + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + }, + "201": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberDelete.json new file mode 100644 index 000000000000..bd57893b81a7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncgroupcrud-4879", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberGet.json new file mode 100644 index 000000000000..f76c16736db9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberGet.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncmembercrud-4879", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberGetSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberGetSchema.json new file mode 100644 index 000000000000..65c0407d27d8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberGetSchema.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncgroupcrud-4879", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "tables": [ + { + "columns": [ + { + "dataSize": "4", + "dataType": "int", + "hasError": false, + "isPrimaryKey": false, + "name": "intField", + "quotedName": "[intField]" + }, + { + "dataSize": "100", + "dataType": "nvarchar", + "hasError": false, + "isPrimaryKey": false, + "name": "charField", + "quotedName": "[charField]" + } + ], + "errorId": "Schema_TableHasNoPrimaryKey", + "hasError": true, + "name": "dbo.myTable", + "quotedName": "[dbo].[myTable]" + } + ], + "lastUpdateTime": "2017-05-30T07:16:08.21Z" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberListBySyncGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberListBySyncGroup.json new file mode 100644 index 000000000000..9c286b1f1a50 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberListBySyncGroup.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberPatch.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberPatch.json new file mode 100644 index 000000000000..b7769860a581 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberPatch.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncmembercrud-4879", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "usePrivateLinkConnection": true, + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberRefreshSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberRefreshSchema.json new file mode 100644 index 000000000000..0a04c389dc19 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberRefreshSchema.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncgroupcrud-4879", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberUpdate.json new file mode 100644 index 000000000000..7b80c6ccd8f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/SyncMemberUpdate.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncmembercrud-4879", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "usePrivateLinkConnection": true, + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + }, + "201": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionGet.json new file mode 100644 index 000000000000..fcd6ab3b1755 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "security-tde-resourcegroup", + "serverName": "securitytde", + "databaseName": "testdb", + "tdeName": "current", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/servers/securitytde/databases/testdb", + "name": "current", + "type": "Microsoft.Sql/servers/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionList.json new file mode 100644 index 000000000000..af2e6cd5dad7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "security-tde-resourcegroup", + "serverName": "securitytde", + "databaseName": "testdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/servers/securitytde/databases/testdb", + "name": "current", + "type": "Microsoft.Sql/servers/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionUpdate.json new file mode 100644 index 000000000000..495b79302be4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionUpdate.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securitytde-42-rg", + "serverName": "securitytde-42", + "databaseName": "testdb", + "tdeName": "current", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/servers/securitytde-42/databases/testdb/transparentDataEncryption", + "name": "current", + "type": "Microsoft.Sql/servers/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/servers/securitytde-42/databases/testdb/transparentDataEncryption", + "name": "current", + "type": "Microsoft.Sql/servers/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateJobAgent.json new file mode 100644 index 000000000000..7ee8d11dfb8a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateJobAgent.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2021-02-01-preview", + "parameters": { + "tags": { + "mytag1": "myvalue1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + }, + "tags": { + "mytag1": "myvalue1" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedInstanceDnsServers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedInstanceDnsServers.json new file mode 100644 index 000000000000..b3ea0d2bdf11 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedInstanceDnsServers.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "virtualClusterName": "sqlcrudtest-4645", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.Sql/virtualClusters/test-virtualcluster/updateManagedInstanceDnsServers", + "properties": { + "status": "Succeeded" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json new file mode 100644 index 000000000000..ef77ebe227b1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "managedInstanceName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "retentionDays": 14 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json new file mode 100644 index 000000000000..75c248f3ab47 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "managedInstanceName": "testsvr", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "policyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "retentionDays": 14 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateShortTermRetentionPolicy.json new file mode 100644 index 000000000000..af12547f3bd0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateShortTermRetentionPolicy.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "serverName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "retentionDays": 14 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpgradeDataWarehouse.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpgradeDataWarehouse.json new file mode 100644 index 000000000000..794f41bddc1a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpgradeDataWarehouse.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdwdb", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterDelete.json new file mode 100644 index 000000000000..614b7df308eb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "testrg", + "virtualClusterName": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterGet.json new file mode 100644 index 000000000000..4ae4b2e89c31 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterGet.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "testrg", + "virtualClusterName": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "family": "Gen4", + "childResources": [ + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1", + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2" + ], + "maintenanceConfigurationId": "/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1" + }, + "location": "onebox", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "name": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "type": "Microsoft.Sql/virtualClusters" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterList.json new file mode 100644 index 000000000000..9beaf91b6bd6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterList.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "family": "Gen4", + "childResources": [ + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1", + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2" + ], + "maintenanceConfigurationId": "/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1" + }, + "location": "onebox", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "name": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "type": "Microsoft.Sql/virtualClusters" + }, + { + "properties": { + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2", + "family": "Gen5", + "childResources": [ + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance3", + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance4" + ], + "maintenanceConfigurationId": "/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1" + }, + "location": "onebox", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet2-14b795bd-9c8f-46ec-adb8-2b8eff56ac16", + "name": "vc-subnet1-14b795bd-9c8f-46ec-adb8-2b8eff56ac16", + "type": "Microsoft.Sql/virtualClusters" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterListByResourceGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterListByResourceGroup.json new file mode 100644 index 000000000000..417d01ac8799 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterListByResourceGroup.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "testrg", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "family": "Gen4", + "childResources": [ + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1", + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2" + ], + "maintenanceConfigurationId": "/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1" + }, + "location": "onebox", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "name": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "type": "Microsoft.Sql/virtualClusters" + }, + { + "properties": { + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2", + "family": "Gen4", + "childResources": [ + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance3", + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance4" + ], + "maintenanceConfigurationId": "/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1" + }, + "location": "onebox", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet2-14b795bd-9c8f-46ec-adb8-2b8eff56ac16", + "name": "vc-subnet1-14b795bd-9c8f-46ec-adb8-2b8eff56ac16", + "type": "Microsoft.Sql/virtualClusters" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterUpdate.json new file mode 100644 index 000000000000..7d2c70050bab --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualClusterUpdate.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "testrg", + "virtualClusterName": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "maintenanceConfigurationId": "/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "childResources": [ + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1", + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2" + ], + "maintenanceConfigurationId": "/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1" + }, + "location": "onebox", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "name": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "type": "Microsoft.Sql/virtualClusters" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json new file mode 100644 index 000000000000..548a8e6724a6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "vnet-test-svr", + "virtualNetworkRuleName": "vnet-firewall-rule", + "api-version": "2021-02-01-preview", + "parameters": { + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule", + "name": "vnet-firewall-rule", + "type": "Microsoft.Sql/servers/virtualNetworkRules", + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule", + "name": "vnet-firewall-rule", + "type": "Microsoft.Sql/servers/virtualNetworkRules", + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesDelete.json new file mode 100644 index 000000000000..274131c9e1a2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "vnet-test-svr", + "virtualNetworkRuleName": "vnet-firewall-rule", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesGet.json new file mode 100644 index 000000000000..d8ea6c73984d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "vnet-test-svr", + "virtualNetworkRuleName": "vnet-firewall-rule", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule", + "name": "vnet-firewall-rule", + "type": "Microsoft.Sql/servers/virtualNetworkRules", + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "state": "Ready", + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesList.json new file mode 100644 index 000000000000..7308fa56e084 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/VirtualNetworkRulesList.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "vnet-test-svr", + "virtualNetworkRuleName": "vnet-firewall-rule", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule", + "name": "vnet-firewall-rule", + "type": "Microsoft.Sql/servers/virtualNetworkRules", + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "state": "Ready", + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule", + "name": "vnet-firewall-rule", + "type": "Microsoft.Sql/servers/virtualNetworkRules", + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "state": "Ready", + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 61a15b7d19e1..cb0de869b8f2 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -250,7 +250,7 @@ input-file: - Microsoft.Sql/preview/2020-02-02-preview/ServerTrustGroups.json - Microsoft.Sql/preview/2020-08-01-preview/ElasticPools.json - Microsoft.Sql/preview/2020-08-01-preview/ServerDevOpsAudit.json -- Microsoft.Sql/preview/2020-11-01-preview/Databases_legacy.json +- Microsoft.Sql/preview/2020-11-01-preview/Databases_legacy.json - Microsoft.Sql/preview/2020-11-01-preview/LongTermRetentionBackups.json - Microsoft.Sql/preview/2020-11-01-preview/LongTermRetentionPolicies.json - Microsoft.Sql/preview/2020-11-01-preview/PrivateEndpointConnections.json @@ -712,6 +712,122 @@ override-info: The following packages are each composed of all apis from only one api-version. +### Tag: package-preview-2021-02 + +These settings apply only when `--tag=package-preview-2021-02` is specified on the command line. + +```yaml $(tag) == 'package-preview-2021-02' +input-file: + - ./Microsoft.Sql/preview/2021-02-01-preview/BackupShortTermRetentionPolicies.json + - ./Microsoft.Sql/preview/2021-02-01-preview/BlobAuditing.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseAdvisors.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseAutomaticTuning.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseColumns.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseExtensions.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseOperations.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseRecommendedActions.json + - ./Microsoft.Sql/preview/2021-02-01-preview/Databases.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseSchemas.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseSecurityAlertPolicies.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseTables.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseUsages.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentRuleBaselines.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessments.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentScans.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DataWarehouseUserActivities.json + - ./Microsoft.Sql/preview/2021-02-01-preview/DeletedServers.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ElasticPoolOperations.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ElasticPools.json + - ./Microsoft.Sql/preview/2021-02-01-preview/EncryptionProtectors.json + - ./Microsoft.Sql/preview/2021-02-01-preview/FailoverGroups.json + - ./Microsoft.Sql/preview/2021-02-01-preview/FirewallRules.json + - ./Microsoft.Sql/preview/2021-02-01-preview/InstanceFailoverGroups.json + - ./Microsoft.Sql/preview/2021-02-01-preview/InstancePools.json + - ./Microsoft.Sql/preview/2021-02-01-preview/JobAgents.json + - ./Microsoft.Sql/preview/2021-02-01-preview/JobCredentials.json + - ./Microsoft.Sql/preview/2021-02-01-preview/JobExecutions.json + - ./Microsoft.Sql/preview/2021-02-01-preview/Jobs.json + - ./Microsoft.Sql/preview/2021-02-01-preview/JobStepExecutions.json + - ./Microsoft.Sql/preview/2021-02-01-preview/JobSteps.json + - ./Microsoft.Sql/preview/2021-02-01-preview/JobTargetExecutions.json + - ./Microsoft.Sql/preview/2021-02-01-preview/JobTargetGroups.json + - ./Microsoft.Sql/preview/2021-02-01-preview/JobVersions.json + - ./Microsoft.Sql/preview/2021-02-01-preview/LedgerDigestUploads.json + - ./Microsoft.Sql/preview/2021-02-01-preview/LocationCapabilities.json + - ./Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionBackups.json + - ./Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionManagedInstanceBackups.json + - ./Microsoft.Sql/preview/2021-02-01-preview/LongTermRetentionPolicies.json + - ./Microsoft.Sql/preview/2021-02-01-preview/MaintenanceWindowOptions.json + - ./Microsoft.Sql/preview/2021-02-01-preview/MaintenanceWindows.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedBackupShortTermRetentionPolicies.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseColumns.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseQueries.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseRestoreDetails.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabases.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSchemas.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSecurityAlertPolicies.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSecurityEvents.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseSensitivityLabels.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseTables.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseTransparentDataEncryption.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessments.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedDatabaseVulnerabilityAssessmentScans.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceAdministrators.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceAzureADOnlyAuthentications.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceEncryptionProtectors.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceKeys.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceLongTermRetentionPolicies.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceOperations.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstancePrivateEndpointConnections.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstancePrivateLinkResources.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstances.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceTdeCertificates.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedInstanceVulnerabilityAssessments.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ManagedServerSecurityAlertPolicies.json + - ./Microsoft.Sql/preview/2021-02-01-preview/Operations.json + - ./Microsoft.Sql/preview/2021-02-01-preview/OperationsHealth.json + - ./Microsoft.Sql/preview/2021-02-01-preview/OutboundFirewallRules.json + - ./Microsoft.Sql/preview/2021-02-01-preview/PrivateEndpointConnections.json + - ./Microsoft.Sql/preview/2021-02-01-preview/PrivateLinkResources.json + - ./Microsoft.Sql/preview/2021-02-01-preview/RecoverableManagedDatabases.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ReplicationLinks.json + - ./Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedDatabases.json + - ./Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedManagedDatabases.json + - ./Microsoft.Sql/preview/2021-02-01-preview/RestorePoints.json + - ./Microsoft.Sql/preview/2021-02-01-preview/SensitivityLabels.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerAdvisors.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerAutomaticTuning.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerAzureADAdministrators.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerAzureADOnlyAuthentications.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerDevOpsAudit.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerDnsAliases.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerKeys.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerOperations.json + - ./Microsoft.Sql/preview/2021-02-01-preview/Servers.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerSecurityAlertPolicies.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerTrustGroups.json + - ./Microsoft.Sql/preview/2021-02-01-preview/ServerVulnerabilityAssessments.json + - ./Microsoft.Sql/preview/2021-02-01-preview/SqlAgent.json + - ./Microsoft.Sql/preview/2021-02-01-preview/SubscriptionUsages.json + - ./Microsoft.Sql/preview/2021-02-01-preview/SyncAgents.json + - ./Microsoft.Sql/preview/2021-02-01-preview/SyncGroups.json + - ./Microsoft.Sql/preview/2021-02-01-preview/SyncMembers.json + - ./Microsoft.Sql/preview/2021-02-01-preview/TdeCertificates.json + - ./Microsoft.Sql/preview/2021-02-01-preview/TimeZones.json + - ./Microsoft.Sql/preview/2021-02-01-preview/TransparentDataEncryptions.json + - ./Microsoft.Sql/preview/2021-02-01-preview/Usages.json + - ./Microsoft.Sql/preview/2021-02-01-preview/VirtualClusters.json + - ./Microsoft.Sql/preview/2021-02-01-preview/VirtualNetworkRules.json + - ./Microsoft.Sql/preview/2021-02-01-preview/WorkloadClassifiers.json + - ./Microsoft.Sql/preview/2021-02-01-preview/WorkloadGroups.json + +# Needed when there is more than one input file +override-info: + title: SqlManagementClient +``` + ### Tag: package-preview-2020-11 These settings apply only when `--tag=package-preview-2020-11` is specified on the command line. @@ -722,7 +838,7 @@ APIs must only be added to this section when the API is publicly available in at These can be regenerated by running the following PowerShell script from this readme file's folder: `dir .\Microsoft.Sql\preview\2020-11-01-preview\ -File | Resolve-Path -Relative | % { " - $_".Replace("\", "/") }` -```yaml $(tag) == 'package-preview-2020-11' +``` yaml $(tag) == 'package-preview-2020-11' input-file: - Microsoft.Sql/preview/2020-11-01-preview/BackupShortTermRetentionPolicies.json - Microsoft.Sql/preview/2020-11-01-preview/BlobAuditing.json @@ -826,7 +942,7 @@ input-file: - Microsoft.Sql/preview/2020-11-01-preview/VirtualNetworkRules.json - Microsoft.Sql/preview/2020-11-01-preview/WorkloadClassifiers.json - Microsoft.Sql/preview/2020-11-01-preview/WorkloadGroups.json - + # Needed when there is more than one input file override-info: title: SqlManagementClient @@ -1380,5 +1496,3 @@ directive: - suppress: EnumInsteadOfBoolean reason: This warning gives many positives for existing APIs that cannot be changed. ``` - -