From 91253ad7773fff0db1d59306f0c80ad53ae25ddf Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sun, 14 Apr 2019 06:43:24 +0000 Subject: [PATCH] Generated from bb549daab022de7f795a32cf6631d3655e20f21e Merge branch 'Azure-master5' --- .../backupLongTermRetentionPoliciesMappers.ts | 117 + ...backupShortTermRetentionPoliciesMappers.ts | 118 + .../arm-sql/lib/models/capabilitiesMappers.ts | 32 + .../lib/models/dataMaskingPoliciesMappers.ts | 117 + .../lib/models/dataMaskingRulesMappers.ts | 118 + ...atabaseAutomaticTuningOperationsMappers.ts | 117 + .../databaseBlobAuditingPoliciesMappers.ts | 117 + .../lib/models/databaseOperationsMappers.ts | 118 + .../databaseThreatDetectionPoliciesMappers.ts | 117 + .../lib/models/databaseUsagesMappers.ts | 16 + ...erabilityAssessmentRuleBaselinesMappers.ts | 117 + ...baseVulnerabilityAssessmentScansMappers.ts | 118 + ...databaseVulnerabilityAssessmentsMappers.ts | 118 + .../arm-sql/lib/models/databasesMappers.ts | 130 + .../models/elasticPoolActivitiesMappers.ts | 118 + .../elasticPoolDatabaseActivitiesMappers.ts | 118 + .../models/elasticPoolOperationsMappers.ts | 118 + .../arm-sql/lib/models/elasticPoolsMappers.ts | 126 + .../lib/models/encryptionProtectorsMappers.ts | 118 + ...ndedDatabaseBlobAuditingPoliciesMappers.ts | 117 + ...tendedServerBlobAuditingPoliciesMappers.ts | 117 + .../lib/models/failoverGroupsMappers.ts | 119 + .../lib/models/firewallRulesMappers.ts | 118 + .../lib/models/geoBackupPoliciesMappers.ts | 118 + packages/@azure/arm-sql/lib/models/index.ts | 15639 ++++++++++++++++ .../models/instanceFailoverGroupsMappers.ts | 118 + .../arm-sql/lib/models/jobAgentsMappers.ts | 119 + .../lib/models/jobCredentialsMappers.ts | 118 + .../lib/models/jobExecutionsMappers.ts | 118 + .../lib/models/jobStepExecutionsMappers.ts | 118 + .../arm-sql/lib/models/jobStepsMappers.ts | 118 + .../lib/models/jobTargetExecutionsMappers.ts | 118 + .../lib/models/jobTargetGroupsMappers.ts | 118 + .../arm-sql/lib/models/jobVersionsMappers.ts | 118 + .../@azure/arm-sql/lib/models/jobsMappers.ts | 118 + .../models/longTermRetentionBackupsMappers.ts | 118 + ...BackupShortTermRetentionPoliciesMappers.ts | 118 + ...gedDatabaseSecurityAlertPoliciesMappers.ts | 118 + ...managedDatabaseSensitivityLabelsMappers.ts | 118 + ...erabilityAssessmentRuleBaselinesMappers.ts | 117 + ...baseVulnerabilityAssessmentScansMappers.ts | 118 + ...DatabaseVulnerabilityAssessmentsMappers.ts | 118 + .../lib/models/managedDatabasesMappers.ts | 120 + ...agedInstanceEncryptionProtectorsMappers.ts | 118 + .../lib/models/managedInstanceKeysMappers.ts | 118 + .../managedInstanceTdeCertificatesMappers.ts | 117 + ...InstanceVulnerabilityAssessmentsMappers.ts | 118 + .../lib/models/managedInstancesMappers.ts | 119 + ...BackupShortTermRetentionPoliciesMappers.ts | 118 + ...nagedServerSecurityAlertPoliciesMappers.ts | 118 + packages/@azure/arm-sql/lib/models/mappers.ts | 9717 ++++++++++ .../arm-sql/lib/models/operationsMappers.ts | 17 + .../@azure/arm-sql/lib/models/parameters.ts | 937 + .../models/recommendedElasticPoolsMappers.ts | 119 + .../lib/models/recoverableDatabasesMappers.ts | 118 + .../recoverableManagedDatabasesMappers.ts | 118 + .../lib/models/replicationLinksMappers.ts | 118 + .../restorableDroppedDatabasesMappers.ts | 118 + ...estorableDroppedManagedDatabasesMappers.ts | 118 + .../lib/models/restorePointsMappers.ts | 119 + .../lib/models/sensitivityLabelsMappers.ts | 118 + .../serverAutomaticTuningOperationsMappers.ts | 117 + .../serverAzureADAdministratorsMappers.ts | 118 + .../serverBlobAuditingPoliciesMappers.ts | 117 + .../models/serverCommunicationLinksMappers.ts | 118 + .../models/serverConnectionPoliciesMappers.ts | 117 + .../lib/models/serverDnsAliasesMappers.ts | 119 + .../arm-sql/lib/models/serverKeysMappers.ts | 118 + .../serverSecurityAlertPoliciesMappers.ts | 118 + .../arm-sql/lib/models/serverUsagesMappers.ts | 16 + .../serverVulnerabilityAssessmentsMappers.ts | 118 + .../arm-sql/lib/models/serversMappers.ts | 121 + .../lib/models/serviceObjectivesMappers.ts | 118 + .../lib/models/serviceTierAdvisorsMappers.ts | 118 + .../lib/models/subscriptionUsagesMappers.ts | 118 + .../arm-sql/lib/models/syncAgentsMappers.ts | 120 + .../arm-sql/lib/models/syncGroupsMappers.ts | 126 + .../arm-sql/lib/models/syncMembersMappers.ts | 122 + .../lib/models/tdeCertificatesMappers.ts | 117 + ...nsparentDataEncryptionActivitiesMappers.ts | 118 + .../transparentDataEncryptionsMappers.ts | 117 + .../lib/models/virtualClustersMappers.ts | 119 + .../lib/models/virtualNetworkRulesMappers.ts | 118 + .../backupLongTermRetentionPolicies.ts | 235 + .../backupShortTermRetentionPolicies.ts | 357 + .../arm-sql/lib/operations/capabilities.ts | 83 + .../lib/operations/dataMaskingPolicies.ts | 173 + .../lib/operations/dataMaskingRules.ts | 181 + .../databaseAutomaticTuningOperations.ts | 171 + .../databaseBlobAuditingPolicies.ts | 176 + .../lib/operations/databaseOperations.ts | 212 + .../databaseThreatDetectionPolicies.ts | 182 + .../arm-sql/lib/operations/databaseUsages.ts | 95 + ...aseVulnerabilityAssessmentRuleBaselines.ts | 294 + .../databaseVulnerabilityAssessmentScans.ts | 356 + .../databaseVulnerabilityAssessments.ts | 357 + .../arm-sql/lib/operations/databases.ts | 1135 ++ .../lib/operations/elasticPoolActivities.ts | 95 + .../elasticPoolDatabaseActivities.ts | 95 + .../lib/operations/elasticPoolOperations.ts | 212 + .../arm-sql/lib/operations/elasticPools.ts | 549 + .../lib/operations/encryptionProtectors.ts | 270 + .../extendedDatabaseBlobAuditingPolicies.ts | 176 + .../extendedServerBlobAuditingPolicies.ts | 161 + .../arm-sql/lib/operations/failoverGroups.ts | 539 + .../arm-sql/lib/operations/firewallRules.ts | 298 + .../lib/operations/geoBackupPolicies.ts | 241 + .../@azure/arm-sql/lib/operations/index.ts | 90 + .../lib/operations/instanceFailoverGroups.ts | 467 + .../arm-sql/lib/operations/jobAgents.ts | 413 + .../arm-sql/lib/operations/jobCredentials.ts | 367 + .../arm-sql/lib/operations/jobExecutions.ts | 565 + .../lib/operations/jobStepExecutions.ts | 241 + .../@azure/arm-sql/lib/operations/jobSteps.ts | 591 + .../lib/operations/jobTargetExecutions.ts | 382 + .../arm-sql/lib/operations/jobTargetGroups.ts | 367 + .../arm-sql/lib/operations/jobVersions.ts | 224 + .../@azure/arm-sql/lib/operations/jobs.ts | 367 + .../operations/longTermRetentionBackups.ts | 484 + ...managedBackupShortTermRetentionPolicies.ts | 357 + .../managedDatabaseSecurityAlertPolicies.ts | 299 + .../managedDatabaseSensitivityLabels.ts | 683 + ...aseVulnerabilityAssessmentRuleBaselines.ts | 295 + ...gedDatabaseVulnerabilityAssessmentScans.ts | 356 + ...managedDatabaseVulnerabilityAssessments.ts | 354 + .../lib/operations/managedDatabases.ts | 477 + .../managedInstanceEncryptionProtectors.ts | 270 + .../lib/operations/managedInstanceKeys.ts | 342 + .../managedInstanceTdeCertificates.ts | 97 + ...managedInstanceVulnerabilityAssessments.ts | 346 + .../lib/operations/managedInstances.ts | 487 + ...atabaseBackupShortTermRetentionPolicies.ts | 362 + .../managedServerSecurityAlertPolicies.ts | 270 + .../arm-sql/lib/operations/operations.ts | 123 + .../lib/operations/recommendedElasticPools.ts | 220 + .../lib/operations/recoverableDatabases.ts | 155 + .../operations/recoverableManagedDatabases.ts | 204 + .../lib/operations/replicationLinks.ts | 367 + .../operations/restorableDroppedDatabases.ts | 158 + .../restorableDroppedManagedDatabases.ts | 204 + .../arm-sql/lib/operations/restorePoints.ts | 309 + .../lib/operations/sensitivityLabels.ts | 683 + .../serverAutomaticTuningOperations.ts | 161 + .../operations/serverAzureADAdministrators.ts | 294 + .../operations/serverBlobAuditingPolicies.ts | 161 + .../operations/serverCommunicationLinks.ts | 291 + .../operations/serverConnectionPolicies.ts | 166 + .../lib/operations/serverDnsAliases.ts | 401 + .../arm-sql/lib/operations/serverKeys.ts | 349 + .../operations/serverSecurityAlertPolicies.ts | 270 + .../arm-sql/lib/operations/serverUsages.ts | 90 + .../serverVulnerabilityAssessments.ts | 334 + .../@azure/arm-sql/lib/operations/servers.ts | 545 + .../lib/operations/serviceObjectives.ts | 155 + .../lib/operations/serviceTierAdvisors.ts | 165 + .../lib/operations/subscriptionUsages.ts | 188 + .../arm-sql/lib/operations/syncAgents.ts | 520 + .../arm-sql/lib/operations/syncGroups.ts | 993 + .../arm-sql/lib/operations/syncMembers.ts | 649 + .../arm-sql/lib/operations/tdeCertificates.ts | 97 + .../transparentDataEncryptionActivities.ts | 96 + .../operations/transparentDataEncryptions.ts | 179 + .../arm-sql/lib/operations/virtualClusters.ts | 416 + .../lib/operations/virtualNetworkRules.ts | 341 + .../@azure/arm-sql/lib/sqlManagementClient.ts | 200 + .../arm-sql/lib/sqlManagementClientContext.ts | 60 + packages/@azure/arm-sql/package.json | 10 +- packages/@azure/arm-sql/tsconfig.json | 2 +- 168 files changed, 61118 insertions(+), 7 deletions(-) create mode 100644 packages/@azure/arm-sql/lib/models/backupLongTermRetentionPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/backupShortTermRetentionPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/capabilitiesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/dataMaskingPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/dataMaskingRulesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/databaseAutomaticTuningOperationsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/databaseBlobAuditingPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/databaseOperationsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/databaseThreatDetectionPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/databaseUsagesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentRuleBaselinesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentScansMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/databasesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/elasticPoolActivitiesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/elasticPoolDatabaseActivitiesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/elasticPoolOperationsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/elasticPoolsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/encryptionProtectorsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/extendedDatabaseBlobAuditingPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/extendedServerBlobAuditingPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/failoverGroupsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/firewallRulesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/geoBackupPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/index.ts create mode 100644 packages/@azure/arm-sql/lib/models/instanceFailoverGroupsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/jobAgentsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/jobCredentialsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/jobExecutionsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/jobStepExecutionsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/jobStepsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/jobTargetExecutionsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/jobTargetGroupsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/jobVersionsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/jobsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/longTermRetentionBackupsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedBackupShortTermRetentionPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedDatabaseSecurityAlertPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedDatabaseSensitivityLabelsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentRuleBaselinesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentScansMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedDatabasesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedInstanceEncryptionProtectorsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedInstanceKeysMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedInstanceTdeCertificatesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedInstanceVulnerabilityAssessmentsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedInstancesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/managedServerSecurityAlertPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/mappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/operationsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/parameters.ts create mode 100644 packages/@azure/arm-sql/lib/models/recommendedElasticPoolsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/recoverableDatabasesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/recoverableManagedDatabasesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/replicationLinksMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/restorableDroppedDatabasesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/restorableDroppedManagedDatabasesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/restorePointsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/sensitivityLabelsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serverAutomaticTuningOperationsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serverAzureADAdministratorsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serverBlobAuditingPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serverCommunicationLinksMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serverConnectionPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serverDnsAliasesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serverKeysMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serverSecurityAlertPoliciesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serverUsagesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serverVulnerabilityAssessmentsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serversMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serviceObjectivesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/serviceTierAdvisorsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/subscriptionUsagesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/syncAgentsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/syncGroupsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/syncMembersMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/tdeCertificatesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/transparentDataEncryptionActivitiesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/transparentDataEncryptionsMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/virtualClustersMappers.ts create mode 100644 packages/@azure/arm-sql/lib/models/virtualNetworkRulesMappers.ts create mode 100644 packages/@azure/arm-sql/lib/operations/backupLongTermRetentionPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/backupShortTermRetentionPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/capabilities.ts create mode 100644 packages/@azure/arm-sql/lib/operations/dataMaskingPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/dataMaskingRules.ts create mode 100644 packages/@azure/arm-sql/lib/operations/databaseAutomaticTuningOperations.ts create mode 100644 packages/@azure/arm-sql/lib/operations/databaseBlobAuditingPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/databaseOperations.ts create mode 100644 packages/@azure/arm-sql/lib/operations/databaseThreatDetectionPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/databaseUsages.ts create mode 100644 packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessmentRuleBaselines.ts create mode 100644 packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessmentScans.ts create mode 100644 packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessments.ts create mode 100644 packages/@azure/arm-sql/lib/operations/databases.ts create mode 100644 packages/@azure/arm-sql/lib/operations/elasticPoolActivities.ts create mode 100644 packages/@azure/arm-sql/lib/operations/elasticPoolDatabaseActivities.ts create mode 100644 packages/@azure/arm-sql/lib/operations/elasticPoolOperations.ts create mode 100644 packages/@azure/arm-sql/lib/operations/elasticPools.ts create mode 100644 packages/@azure/arm-sql/lib/operations/encryptionProtectors.ts create mode 100644 packages/@azure/arm-sql/lib/operations/extendedDatabaseBlobAuditingPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/extendedServerBlobAuditingPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/failoverGroups.ts create mode 100644 packages/@azure/arm-sql/lib/operations/firewallRules.ts create mode 100644 packages/@azure/arm-sql/lib/operations/geoBackupPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/index.ts create mode 100644 packages/@azure/arm-sql/lib/operations/instanceFailoverGroups.ts create mode 100644 packages/@azure/arm-sql/lib/operations/jobAgents.ts create mode 100644 packages/@azure/arm-sql/lib/operations/jobCredentials.ts create mode 100644 packages/@azure/arm-sql/lib/operations/jobExecutions.ts create mode 100644 packages/@azure/arm-sql/lib/operations/jobStepExecutions.ts create mode 100644 packages/@azure/arm-sql/lib/operations/jobSteps.ts create mode 100644 packages/@azure/arm-sql/lib/operations/jobTargetExecutions.ts create mode 100644 packages/@azure/arm-sql/lib/operations/jobTargetGroups.ts create mode 100644 packages/@azure/arm-sql/lib/operations/jobVersions.ts create mode 100644 packages/@azure/arm-sql/lib/operations/jobs.ts create mode 100644 packages/@azure/arm-sql/lib/operations/longTermRetentionBackups.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedBackupShortTermRetentionPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedDatabaseSecurityAlertPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedDatabaseSensitivityLabels.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessmentRuleBaselines.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessmentScans.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessments.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedDatabases.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedInstanceEncryptionProtectors.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedInstanceKeys.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedInstanceTdeCertificates.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedInstanceVulnerabilityAssessments.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedInstances.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/managedServerSecurityAlertPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/operations.ts create mode 100644 packages/@azure/arm-sql/lib/operations/recommendedElasticPools.ts create mode 100644 packages/@azure/arm-sql/lib/operations/recoverableDatabases.ts create mode 100644 packages/@azure/arm-sql/lib/operations/recoverableManagedDatabases.ts create mode 100644 packages/@azure/arm-sql/lib/operations/replicationLinks.ts create mode 100644 packages/@azure/arm-sql/lib/operations/restorableDroppedDatabases.ts create mode 100644 packages/@azure/arm-sql/lib/operations/restorableDroppedManagedDatabases.ts create mode 100644 packages/@azure/arm-sql/lib/operations/restorePoints.ts create mode 100644 packages/@azure/arm-sql/lib/operations/sensitivityLabels.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serverAutomaticTuningOperations.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serverAzureADAdministrators.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serverBlobAuditingPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serverCommunicationLinks.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serverConnectionPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serverDnsAliases.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serverKeys.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serverSecurityAlertPolicies.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serverUsages.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serverVulnerabilityAssessments.ts create mode 100644 packages/@azure/arm-sql/lib/operations/servers.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serviceObjectives.ts create mode 100644 packages/@azure/arm-sql/lib/operations/serviceTierAdvisors.ts create mode 100644 packages/@azure/arm-sql/lib/operations/subscriptionUsages.ts create mode 100644 packages/@azure/arm-sql/lib/operations/syncAgents.ts create mode 100644 packages/@azure/arm-sql/lib/operations/syncGroups.ts create mode 100644 packages/@azure/arm-sql/lib/operations/syncMembers.ts create mode 100644 packages/@azure/arm-sql/lib/operations/tdeCertificates.ts create mode 100644 packages/@azure/arm-sql/lib/operations/transparentDataEncryptionActivities.ts create mode 100644 packages/@azure/arm-sql/lib/operations/transparentDataEncryptions.ts create mode 100644 packages/@azure/arm-sql/lib/operations/virtualClusters.ts create mode 100644 packages/@azure/arm-sql/lib/operations/virtualNetworkRules.ts create mode 100644 packages/@azure/arm-sql/lib/sqlManagementClient.ts create mode 100644 packages/@azure/arm-sql/lib/sqlManagementClientContext.ts diff --git a/packages/@azure/arm-sql/lib/models/backupLongTermRetentionPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/backupLongTermRetentionPoliciesMappers.ts new file mode 100644 index 000000000000..a06d15face19 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/backupLongTermRetentionPoliciesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + BackupLongTermRetentionPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/backupShortTermRetentionPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/backupShortTermRetentionPoliciesMappers.ts new file mode 100644 index 000000000000..42e74dd407cd --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/backupShortTermRetentionPoliciesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + BackupShortTermRetentionPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + BackupShortTermRetentionPolicyListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/capabilitiesMappers.ts b/packages/@azure/arm-sql/lib/models/capabilitiesMappers.ts new file mode 100644 index 000000000000..77a5b17ff86a --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/capabilitiesMappers.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + LocationCapabilities, + ServerVersionCapability, + EditionCapability, + ServiceObjectiveCapability, + MaxSizeRangeCapability, + MaxSizeCapability, + LogSizeCapability, + PerformanceLevelCapability, + Sku, + LicenseTypeCapability, + ElasticPoolEditionCapability, + ElasticPoolPerformanceLevelCapability, + ElasticPoolPerDatabaseMaxPerformanceLevelCapability, + ElasticPoolPerDatabaseMinPerformanceLevelCapability, + ManagedInstanceVersionCapability, + ManagedInstanceEditionCapability, + ManagedInstanceFamilyCapability, + ManagedInstanceVcoresCapability, + CloudError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/dataMaskingPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/dataMaskingPoliciesMappers.ts new file mode 100644 index 000000000000..d9fb06c851bc --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/dataMaskingPoliciesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DataMaskingPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/dataMaskingRulesMappers.ts b/packages/@azure/arm-sql/lib/models/dataMaskingRulesMappers.ts new file mode 100644 index 000000000000..06451c44d47e --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/dataMaskingRulesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DataMaskingRule, + ProxyResource, + Resource, + BaseResource, + CloudError, + DataMaskingRuleListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/databaseAutomaticTuningOperationsMappers.ts b/packages/@azure/arm-sql/lib/models/databaseAutomaticTuningOperationsMappers.ts new file mode 100644 index 000000000000..6a1d23c09d48 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/databaseAutomaticTuningOperationsMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DatabaseAutomaticTuning, + ProxyResource, + Resource, + BaseResource, + AutomaticTuningOptions, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/databaseBlobAuditingPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/databaseBlobAuditingPoliciesMappers.ts new file mode 100644 index 000000000000..562d5b38a665 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/databaseBlobAuditingPoliciesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DatabaseBlobAuditingPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/databaseOperationsMappers.ts b/packages/@azure/arm-sql/lib/models/databaseOperationsMappers.ts new file mode 100644 index 000000000000..f22e7a24aa2f --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/databaseOperationsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + CloudError, + DatabaseOperationListResult, + DatabaseOperation, + ProxyResource, + Resource, + BaseResource, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/databaseThreatDetectionPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/databaseThreatDetectionPoliciesMappers.ts new file mode 100644 index 000000000000..6b96fb29b8bc --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/databaseThreatDetectionPoliciesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DatabaseSecurityAlertPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/databaseUsagesMappers.ts b/packages/@azure/arm-sql/lib/models/databaseUsagesMappers.ts new file mode 100644 index 000000000000..5e3d7627e156 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/databaseUsagesMappers.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DatabaseUsageListResult, + DatabaseUsage, + CloudError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentRuleBaselinesMappers.ts b/packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentRuleBaselinesMappers.ts new file mode 100644 index 000000000000..8f28b6480e12 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentRuleBaselinesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DatabaseVulnerabilityAssessmentRuleBaseline, + ProxyResource, + Resource, + BaseResource, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentScansMappers.ts b/packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentScansMappers.ts new file mode 100644 index 000000000000..420534e66fae --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentScansMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + VulnerabilityAssessmentScanRecordListResult, + VulnerabilityAssessmentScanRecord, + ProxyResource, + Resource, + BaseResource, + VulnerabilityAssessmentScanError, + CloudError, + DatabaseVulnerabilityAssessmentScansExport, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentsMappers.ts b/packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentsMappers.ts new file mode 100644 index 000000000000..f012d61e782a --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/databaseVulnerabilityAssessmentsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DatabaseVulnerabilityAssessment, + ProxyResource, + Resource, + BaseResource, + VulnerabilityAssessmentRecurringScansProperties, + CloudError, + DatabaseVulnerabilityAssessmentListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/databasesMappers.ts b/packages/@azure/arm-sql/lib/models/databasesMappers.ts new file mode 100644 index 000000000000..2d56232cdc3c --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/databasesMappers.ts @@ -0,0 +1,130 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ImportRequest, + ExportRequest, + ImportExportResponse, + ProxyResource, + Resource, + BaseResource, + CloudError, + ImportExtensionRequest, + MetricListResult, + Metric, + MetricName, + MetricValue, + MetricDefinitionListResult, + MetricDefinition, + MetricAvailability, + DatabaseListResult, + Database, + TrackedResource, + Sku, + DatabaseUpdate, + ResourceMoveDefinition, + RecoverableDatabase, + RestorableDroppedDatabase, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/elasticPoolActivitiesMappers.ts b/packages/@azure/arm-sql/lib/models/elasticPoolActivitiesMappers.ts new file mode 100644 index 000000000000..c8a73df3ec25 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/elasticPoolActivitiesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ElasticPoolActivityListResult, + ElasticPoolActivity, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/elasticPoolDatabaseActivitiesMappers.ts b/packages/@azure/arm-sql/lib/models/elasticPoolDatabaseActivitiesMappers.ts new file mode 100644 index 000000000000..20e37c502f65 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/elasticPoolDatabaseActivitiesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ElasticPoolDatabaseActivityListResult, + ElasticPoolDatabaseActivity, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/elasticPoolOperationsMappers.ts b/packages/@azure/arm-sql/lib/models/elasticPoolOperationsMappers.ts new file mode 100644 index 000000000000..49c748cb5ba1 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/elasticPoolOperationsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + CloudError, + ElasticPoolOperationListResult, + ElasticPoolOperation, + ProxyResource, + Resource, + BaseResource, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/elasticPoolsMappers.ts b/packages/@azure/arm-sql/lib/models/elasticPoolsMappers.ts new file mode 100644 index 000000000000..454e550454cd --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/elasticPoolsMappers.ts @@ -0,0 +1,126 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + MetricListResult, + Metric, + MetricName, + MetricValue, + CloudError, + MetricDefinitionListResult, + MetricDefinition, + MetricAvailability, + ElasticPoolListResult, + ElasticPool, + TrackedResource, + Resource, + BaseResource, + Sku, + ElasticPoolPerDatabaseSettings, + ElasticPoolUpdate, + ProxyResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment, + RecoverableDatabase, + RestorableDroppedDatabase +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/encryptionProtectorsMappers.ts b/packages/@azure/arm-sql/lib/models/encryptionProtectorsMappers.ts new file mode 100644 index 000000000000..a8db7819239b --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/encryptionProtectorsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + EncryptionProtectorListResult, + EncryptionProtector, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/extendedDatabaseBlobAuditingPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/extendedDatabaseBlobAuditingPoliciesMappers.ts new file mode 100644 index 000000000000..7d2267480b3b --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/extendedDatabaseBlobAuditingPoliciesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ExtendedDatabaseBlobAuditingPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/extendedServerBlobAuditingPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/extendedServerBlobAuditingPoliciesMappers.ts new file mode 100644 index 000000000000..22180652a677 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/extendedServerBlobAuditingPoliciesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ExtendedServerBlobAuditingPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/failoverGroupsMappers.ts b/packages/@azure/arm-sql/lib/models/failoverGroupsMappers.ts new file mode 100644 index 000000000000..2bf2390abbf1 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/failoverGroupsMappers.ts @@ -0,0 +1,119 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + FailoverGroup, + ProxyResource, + Resource, + BaseResource, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + CloudError, + FailoverGroupUpdate, + FailoverGroupListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/firewallRulesMappers.ts b/packages/@azure/arm-sql/lib/models/firewallRulesMappers.ts new file mode 100644 index 000000000000..02d7b45177dd --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/firewallRulesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + FirewallRule, + ProxyResource, + Resource, + BaseResource, + CloudError, + FirewallRuleListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/geoBackupPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/geoBackupPoliciesMappers.ts new file mode 100644 index 000000000000..007cd21f3964 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/geoBackupPoliciesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + GeoBackupPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + GeoBackupPolicyListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/index.ts b/packages/@azure/arm-sql/lib/models/index.ts new file mode 100644 index 000000000000..3611b9254b92 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/index.ts @@ -0,0 +1,15639 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + + +/** + * @interface + * An interface representing Resource. + * ARM resource. + * + * @extends BaseResource + */ +export interface Resource extends BaseResource { + /** + * @member {string} [id] Resource ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Resource name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] Resource type. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} + +/** + * @interface + * An interface representing ProxyResource. + * ARM proxy resource. + * + * @extends Resource + */ +export interface ProxyResource extends Resource { +} + +/** + * @interface + * An interface representing RecoverableDatabase. + * A recoverable database + * + * @extends ProxyResource + */ +export interface RecoverableDatabase extends ProxyResource { + /** + * @member {string} [edition] The edition of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly edition?: string; + /** + * @member {string} [serviceLevelObjective] The service level objective name + * of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serviceLevelObjective?: string; + /** + * @member {string} [elasticPoolName] The elastic pool name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly elasticPoolName?: string; + /** + * @member {Date} [lastAvailableBackupDate] The last available backup date of + * the database (ISO8601 format) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastAvailableBackupDate?: Date; +} + +/** + * @interface + * An interface representing RestorableDroppedDatabase. + * A restorable dropped database + * + * @extends ProxyResource + */ +export interface RestorableDroppedDatabase extends ProxyResource { + /** + * @member {string} [location] The geo-location where the resource lives + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {string} [databaseName] The name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {string} [edition] The edition of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly edition?: string; + /** + * @member {string} [maxSizeBytes] The max size in bytes of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maxSizeBytes?: string; + /** + * @member {string} [serviceLevelObjective] The service level objective name + * of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serviceLevelObjective?: string; + /** + * @member {string} [elasticPoolName] The elastic pool name of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly elasticPoolName?: string; + /** + * @member {Date} [creationDate] The creation date of the database (ISO8601 + * format) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationDate?: Date; + /** + * @member {Date} [deletionDate] The deletion date of the database (ISO8601 + * format) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly deletionDate?: Date; + /** + * @member {Date} [earliestRestoreDate] The earliest restore date of the + * database (ISO8601 format) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly earliestRestoreDate?: Date; +} + +/** + * @interface + * An interface representing TrackedResource. + * ARM tracked top level resource. + * + * @extends Resource + */ +export interface TrackedResource extends Resource { + /** + * @member {string} location Resource location. + */ + location: string; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing CheckNameAvailabilityRequest. + * A request to check whether the specified name for a resource is available. + * + */ +export interface CheckNameAvailabilityRequest { + /** + * @member {string} name The name whose availability is to be checked. + */ + name: string; +} + +/** + * @interface + * An interface representing CheckNameAvailabilityResponse. + * A response indicating whether the specified name for a resource is + * available. + * + */ +export interface CheckNameAvailabilityResponse { + /** + * @member {boolean} [available] True if the name is available, otherwise + * false. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly available?: boolean; + /** + * @member {string} [message] A message explaining why the name is + * unavailable. Will be null if the name is available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; + /** + * @member {string} [name] The name whose availability was checked. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {CheckNameAvailabilityReason} [reason] The reason code explaining + * why the name is unavailable. Will be null if the name is available. + * Possible values include: 'Invalid', 'AlreadyExists' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly reason?: CheckNameAvailabilityReason; +} + +/** + * @interface + * An interface representing ServerConnectionPolicy. + * A server secure connection policy. + * + * @extends ProxyResource + */ +export interface ServerConnectionPolicy extends ProxyResource { + /** + * @member {string} [kind] Metadata used for the Azure portal experience. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {string} [location] Resource location. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {ServerConnectionType} connectionType The server connection type. + * Possible values include: 'Default', 'Proxy', 'Redirect' + */ + connectionType: ServerConnectionType; +} + +/** + * @interface + * An interface representing DatabaseSecurityAlertPolicy. + * Contains information about a database Threat Detection policy. + * + * @extends ProxyResource + */ +export interface DatabaseSecurityAlertPolicy extends ProxyResource { + /** + * @member {string} [location] The geo-location where the resource lives + */ + location?: string; + /** + * @member {string} [kind] Resource kind. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {SecurityAlertPolicyState} state Specifies the state of the + * policy. If state is Enabled, storageEndpoint and storageAccountAccessKey + * are required. Possible values include: 'New', 'Enabled', 'Disabled' + */ + state: SecurityAlertPolicyState; + /** + * @member {string} [disabledAlerts] Specifies the semicolon-separated list + * of alerts that are disabled, or empty string to disable no alerts. + * Possible values: Sql_Injection; Sql_Injection_Vulnerability; + * Access_Anomaly; Data_Exfiltration; Unsafe_Action. + */ + disabledAlerts?: string; + /** + * @member {string} [emailAddresses] Specifies the semicolon-separated list + * of e-mail addresses to which the alert is sent. + */ + emailAddresses?: string; + /** + * @member {SecurityAlertPolicyEmailAccountAdmins} [emailAccountAdmins] + * Specifies that the alert is sent to the account administrators. Possible + * values include: 'Enabled', 'Disabled' + */ + emailAccountAdmins?: SecurityAlertPolicyEmailAccountAdmins; + /** + * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * (e.g. https://MyAccount.blob.core.windows.net). This blob storage will + * hold all Threat Detection audit logs. If state is Enabled, storageEndpoint + * is required. + */ + storageEndpoint?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the Threat Detection audit storage account. If state is Enabled, + * storageAccountAccessKey is required. + */ + storageAccountAccessKey?: string; + /** + * @member {number} [retentionDays] Specifies the number of days to keep in + * the Threat Detection audit logs. + */ + retentionDays?: number; + /** + * @member {SecurityAlertPolicyUseServerDefault} [useServerDefault] Specifies + * whether to use the default server policy. Possible values include: + * 'Enabled', 'Disabled' + */ + useServerDefault?: SecurityAlertPolicyUseServerDefault; +} + +/** + * @interface + * An interface representing DataMaskingPolicy. + * Represents a database data masking policy. + * + * @extends ProxyResource + */ +export interface DataMaskingPolicy extends ProxyResource { + /** + * @member {DataMaskingState} dataMaskingState The state of the data masking + * policy. Possible values include: 'Disabled', 'Enabled' + */ + dataMaskingState: DataMaskingState; + /** + * @member {string} [exemptPrincipals] The list of the exempt principals. + * Specifies the semicolon-separated list of database users for which the + * data masking policy does not apply. The specified users receive data + * results without masking for all of the database queries. + */ + exemptPrincipals?: string; + /** + * @member {string} [applicationPrincipals] The list of the application + * principals. This is a legacy parameter and is no longer used. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly applicationPrincipals?: string; + /** + * @member {string} [maskingLevel] The masking level. This is a legacy + * parameter and is no longer used. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maskingLevel?: string; + /** + * @member {string} [location] The location of the data masking policy. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {string} [kind] The kind of data masking policy. Metadata, used + * for Azure portal. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; +} + +/** + * @interface + * An interface representing DataMaskingRule. + * Represents a database data masking rule. + * + * @extends ProxyResource + */ +export interface DataMaskingRule extends ProxyResource { + /** + * @member {string} [dataMaskingRuleId] The rule Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dataMaskingRuleId?: string; + /** + * @member {string} [aliasName] The alias name. This is a legacy parameter + * and is no longer used. + */ + aliasName?: string; + /** + * @member {DataMaskingRuleState} [ruleState] The rule state. Used to delete + * a rule. To delete an existing rule, specify the schemaName, tableName, + * columnName, maskingFunction, and specify ruleState as disabled. However, + * if the rule doesn't already exist, the rule will be created with ruleState + * set to enabled, regardless of the provided value of ruleState. Possible + * values include: 'Disabled', 'Enabled' + */ + ruleState?: DataMaskingRuleState; + /** + * @member {string} schemaName The schema name on which the data masking rule + * is applied. + */ + schemaName: string; + /** + * @member {string} tableName The table name on which the data masking rule + * is applied. + */ + tableName: string; + /** + * @member {string} columnName The column name on which the data masking rule + * is applied. + */ + columnName: string; + /** + * @member {DataMaskingFunction} maskingFunction The masking function that is + * used for the data masking rule. Possible values include: 'Default', 'CCN', + * 'Email', 'Number', 'SSN', 'Text' + */ + maskingFunction: DataMaskingFunction; + /** + * @member {string} [numberFrom] The numberFrom property of the masking rule. + * Required if maskingFunction is set to Number, otherwise this parameter + * will be ignored. + */ + numberFrom?: string; + /** + * @member {string} [numberTo] The numberTo property of the data masking + * rule. Required if maskingFunction is set to Number, otherwise this + * parameter will be ignored. + */ + numberTo?: string; + /** + * @member {string} [prefixSize] If maskingFunction is set to Text, the + * number of characters to show unmasked in the beginning of the string. + * Otherwise, this parameter will be ignored. + */ + prefixSize?: string; + /** + * @member {string} [suffixSize] If maskingFunction is set to Text, the + * number of characters to show unmasked at the end of the string. Otherwise, + * this parameter will be ignored. + */ + suffixSize?: string; + /** + * @member {string} [replacementString] If maskingFunction is set to Text, + * the character to use for masking the unexposed part of the string. + * Otherwise, this parameter will be ignored. + */ + replacementString?: string; + /** + * @member {string} [location] The location of the data masking rule. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {string} [kind] The kind of Data Masking Rule. Metadata, used for + * Azure portal. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; +} + +/** + * @interface + * An interface representing FirewallRule. + * Represents a server firewall rule. + * + * @extends ProxyResource + */ +export interface FirewallRule extends ProxyResource { + /** + * @member {string} [kind] Kind of server that contains this firewall rule. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {string} [location] Location of the server that contains this + * firewall rule. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {string} startIpAddress The start IP address of the firewall rule. + * Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal + * IP addresses. + */ + startIpAddress: string; + /** + * @member {string} endIpAddress 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' to represent all Azure-internal IP addresses. + */ + endIpAddress: string; +} + +/** + * @interface + * An interface representing GeoBackupPolicy. + * A database geo backup policy. + * + * @extends ProxyResource + */ +export interface GeoBackupPolicy extends ProxyResource { + /** + * @member {GeoBackupPolicyState} state The state of the geo backup policy. + * Possible values include: 'Disabled', 'Enabled' + */ + state: GeoBackupPolicyState; + /** + * @member {string} [storageType] The storage type of the geo backup policy. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly storageType?: string; + /** + * @member {string} [kind] Kind of geo backup policy. This is metadata used + * for the Azure portal experience. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {string} [location] Backup policy location. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; +} + +/** + * @interface + * An interface representing ImportExtensionRequest. + * Import database parameters. + * + */ +export interface ImportExtensionRequest { + /** + * @member {string} [name] The name of the extension. + */ + name?: string; + /** + * @member {string} [type] The type of the extension. + */ + type?: string; + /** + * @member {StorageKeyType} storageKeyType The type of the storage key to + * use. Possible values include: 'StorageAccessKey', 'SharedAccessKey' + */ + storageKeyType: StorageKeyType; + /** + * @member {string} storageKey The storage key to use. If storage key type + * is SharedAccessKey, it must be preceded with a "?." + */ + storageKey: string; + /** + * @member {string} storageUri The storage uri to use. + */ + storageUri: string; + /** + * @member {string} administratorLogin The name of the SQL administrator. + */ + administratorLogin: string; + /** + * @member {string} administratorLoginPassword The password of the SQL + * administrator. + */ + administratorLoginPassword: string; + /** + * @member {AuthenticationType} [authenticationType] The authentication type. + * Possible values include: 'SQL', 'ADPassword'. Default value: 'SQL' . + */ + authenticationType?: AuthenticationType; +} + +/** + * @interface + * An interface representing ImportExportResponse. + * Response for Import/Export Get operation. + * + * @extends ProxyResource + */ +export interface ImportExportResponse extends ProxyResource { + /** + * @member {string} [requestType] The request type of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestType?: string; + /** + * @member {string} [requestId] The request type of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestId?: string; + /** + * @member {string} [serverName] The name of the server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverName?: string; + /** + * @member {string} [databaseName] The name of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {string} [status] The status message returned from the server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: string; + /** + * @member {string} [lastModifiedTime] The operation status last modified + * time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModifiedTime?: string; + /** + * @member {string} [queuedTime] The operation queued time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly queuedTime?: string; + /** + * @member {string} [blobUri] The blob uri. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly blobUri?: string; + /** + * @member {string} [errorMessage] The error message returned from the + * server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorMessage?: string; +} + +/** + * @interface + * An interface representing ExportRequest. + * Export database parameters. + * + */ +export interface ExportRequest { + /** + * @member {StorageKeyType} storageKeyType The type of the storage key to + * use. Possible values include: 'StorageAccessKey', 'SharedAccessKey' + */ + storageKeyType: StorageKeyType; + /** + * @member {string} storageKey The storage key to use. If storage key type + * is SharedAccessKey, it must be preceded with a "?." + */ + storageKey: string; + /** + * @member {string} storageUri The storage uri to use. + */ + storageUri: string; + /** + * @member {string} administratorLogin The name of the SQL administrator. + */ + administratorLogin: string; + /** + * @member {string} administratorLoginPassword The password of the SQL + * administrator. + */ + administratorLoginPassword: string; + /** + * @member {AuthenticationType} [authenticationType] The authentication type. + * Possible values include: 'SQL', 'ADPassword'. Default value: 'SQL' . + */ + authenticationType?: AuthenticationType; +} + +/** + * @interface + * An interface representing ImportRequest. + * Import database parameters. + * + * @extends ExportRequest + */ +export interface ImportRequest extends ExportRequest { + /** + * @member {string} databaseName The name of the database to import. + */ + databaseName: string; + /** + * @member {DatabaseEdition} edition The edition for the database being + * created. Possible values include: 'Web', 'Business', 'Basic', 'Standard', + * 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + * 'System2' + */ + edition: DatabaseEdition; + /** + * @member {ServiceObjectiveName} serviceObjectiveName The name of the + * service objective to assign to the database. Possible values include: + * 'System', 'System0', 'System1', 'System2', 'System3', 'System4', + * 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', + * 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', + * 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', + * 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', + * 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', + * 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', + * 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', + * 'DS2000', 'ElasticPool' + */ + serviceObjectiveName: ServiceObjectiveName; + /** + * @member {string} maxSizeBytes The maximum size for the newly imported + * database. + */ + maxSizeBytes: string; +} + +/** + * @interface + * An interface representing MetricValue. + * Represents database metrics. + * + */ +export interface MetricValue { + /** + * @member {number} [count] The number of values for the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly count?: number; + /** + * @member {number} [average] The average value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly average?: number; + /** + * @member {number} [maximum] The max value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maximum?: number; + /** + * @member {number} [minimum] The min value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly minimum?: number; + /** + * @member {Date} [timestamp] The metric timestamp (ISO-8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly timestamp?: Date; + /** + * @member {number} [total] The total value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly total?: number; +} + +/** + * @interface + * An interface representing MetricName. + * A database metric name. + * + */ +export interface MetricName { + /** + * @member {string} [value] The name of the database metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: string; + /** + * @member {string} [localizedValue] The friendly name of the database + * metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly localizedValue?: string; +} + +/** + * @interface + * An interface representing Metric. + * Database metrics. + * + */ +export interface Metric { + /** + * @member {Date} [startTime] The start time for the metric (ISO-8601 + * format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startTime?: Date; + /** + * @member {Date} [endTime] The end time for the metric (ISO-8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endTime?: Date; + /** + * @member {string} [timeGrain] The time step to be used to summarize the + * metric values. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly timeGrain?: string; + /** + * @member {UnitType} [unit] The unit of the metric. Possible values include: + * 'count', 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: UnitType; + /** + * @member {MetricName} [name] The name information for the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: MetricName; + /** + * @member {MetricValue[]} [metricValues] The metric values for the specified + * time window and timestep. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly metricValues?: MetricValue[]; +} + +/** + * @interface + * An interface representing MetricAvailability. + * A metric availability value. + * + */ +export interface MetricAvailability { + /** + * @member {string} [retention] The length of retention for the database + * metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly retention?: string; + /** + * @member {string} [timeGrain] The granularity of the database metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly timeGrain?: string; +} + +/** + * @interface + * An interface representing MetricDefinition. + * A database metric definition. + * + */ +export interface MetricDefinition { + /** + * @member {MetricName} [name] The name information for the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: MetricName; + /** + * @member {PrimaryAggregationType} [primaryAggregationType] The primary + * aggregation type defining how metric values are displayed. Possible values + * include: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly primaryAggregationType?: PrimaryAggregationType; + /** + * @member {string} [resourceUri] The resource uri of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceUri?: string; + /** + * @member {UnitDefinitionType} [unit] The unit of the metric. Possible + * values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', + * 'BytesPerSecond' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: UnitDefinitionType; + /** + * @member {MetricAvailability[]} [metricAvailabilities] The list of database + * metric availabilities for the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly metricAvailabilities?: MetricAvailability[]; +} + +/** + * @interface + * An interface representing RecommendedElasticPoolMetric. + * Represents recommended elastic pool metric. + * + */ +export interface RecommendedElasticPoolMetric { + /** + * @member {Date} [dateTime] The time of metric (ISO8601 format). + */ + dateTime?: Date; + /** + * @member {number} [dtu] Gets or sets the DTUs (Database Transaction Units). + * See + * https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + */ + dtu?: number; + /** + * @member {number} [sizeGB] Gets or sets size in gigabytes. + */ + sizeGB?: number; +} + +/** + * @interface + * An interface representing RecommendedElasticPool. + * Represents a recommended elastic pool. + * + * @extends ProxyResource + */ +export interface RecommendedElasticPool extends ProxyResource { + /** + * @member {ElasticPoolEdition} [databaseEdition] The edition of the + * recommended elastic pool. The ElasticPoolEdition enumeration contains all + * the valid editions. Possible values include: 'Basic', 'Standard', + * 'Premium' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseEdition?: ElasticPoolEdition; + /** + * @member {number} [dtu] The DTU for the recommended elastic pool. + */ + dtu?: number; + /** + * @member {number} [databaseDtuMin] The minimum DTU for the database. + */ + databaseDtuMin?: number; + /** + * @member {number} [databaseDtuMax] The maximum DTU for the database. + */ + databaseDtuMax?: number; + /** + * @member {number} [storageMB] Gets storage size in megabytes. + */ + storageMB?: number; + /** + * @member {Date} [observationPeriodStart] The observation period start + * (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly observationPeriodStart?: Date; + /** + * @member {Date} [observationPeriodEnd] The observation period start + * (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly observationPeriodEnd?: Date; + /** + * @member {number} [maxObservedDtu] Gets maximum observed DTU. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maxObservedDtu?: number; + /** + * @member {number} [maxObservedStorageMB] Gets maximum observed storage in + * megabytes. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maxObservedStorageMB?: number; + /** + * @member {TrackedResource[]} [databases] The list of databases in this + * pool. Expanded property + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databases?: TrackedResource[]; + /** + * @member {RecommendedElasticPoolMetric[]} [metrics] The list of databases + * housed in the server. Expanded property + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly metrics?: RecommendedElasticPoolMetric[]; +} + +/** + * @interface + * An interface representing ReplicationLink. + * Represents a database replication link. + * + * @extends ProxyResource + */ +export interface ReplicationLink extends ProxyResource { + /** + * @member {string} [location] Location of the server that contains this + * firewall rule. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {boolean} [isTerminationAllowed] Legacy value indicating whether + * termination is allowed. Currently always returns true. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isTerminationAllowed?: boolean; + /** + * @member {string} [replicationMode] Replication mode of this replication + * link. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly replicationMode?: string; + /** + * @member {string} [partnerServer] The name of the server hosting the + * partner database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly partnerServer?: string; + /** + * @member {string} [partnerDatabase] The name of the partner database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly partnerDatabase?: string; + /** + * @member {string} [partnerLocation] The Azure Region of the partner + * database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly partnerLocation?: string; + /** + * @member {ReplicationRole} [role] The role of the database in the + * replication link. Possible values include: 'Primary', 'Secondary', + * 'NonReadableSecondary', 'Source', 'Copy' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly role?: ReplicationRole; + /** + * @member {ReplicationRole} [partnerRole] The role of the partner database + * in the replication link. Possible values include: 'Primary', 'Secondary', + * 'NonReadableSecondary', 'Source', 'Copy' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly partnerRole?: ReplicationRole; + /** + * @member {Date} [startTime] The start time for the replication link. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startTime?: Date; + /** + * @member {number} [percentComplete] The percentage of seeding complete for + * the replication link. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly percentComplete?: number; + /** + * @member {ReplicationState} [replicationState] The replication state for + * the replication link. Possible values include: 'PENDING', 'SEEDING', + * 'CATCH_UP', 'SUSPENDED' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly replicationState?: ReplicationState; +} + +/** + * @interface + * An interface representing ServerAzureADAdministrator. + * An server Active Directory Administrator. + * + * @extends ProxyResource + */ +export interface ServerAzureADAdministrator extends ProxyResource { + /** + * @member {string} login The server administrator login value. + */ + login: string; + /** + * @member {string} sid The server administrator Sid (Secure ID). + */ + sid: string; + /** + * @member {string} tenantId The server Active Directory Administrator tenant + * id. + */ + tenantId: string; +} + +/** + * @interface + * An interface representing ServerCommunicationLink. + * Server communication link. + * + * @extends ProxyResource + */ +export interface ServerCommunicationLink extends ProxyResource { + /** + * @member {string} [state] The state. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: string; + /** + * @member {string} partnerServer The name of the partner server. + */ + partnerServer: string; + /** + * @member {string} [location] Communication link location. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {string} [kind] Communication link kind. This property is used + * for Azure Portal metadata. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; +} + +/** + * @interface + * An interface representing ServiceObjective. + * Represents a database service objective. + * + * @extends ProxyResource + */ +export interface ServiceObjective extends ProxyResource { + /** + * @member {string} [serviceObjectiveName] The name for the service + * objective. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serviceObjectiveName?: string; + /** + * @member {boolean} [isDefault] Gets whether the service level objective is + * the default service objective. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isDefault?: boolean; + /** + * @member {boolean} [isSystem] Gets whether the service level objective is a + * system service objective. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isSystem?: boolean; + /** + * @member {string} [description] The description for the service level + * objective. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; + /** + * @member {boolean} [enabled] Gets whether the service level objective is + * enabled. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly enabled?: boolean; +} + +/** + * @interface + * An interface representing ElasticPoolActivity. + * Represents the activity on an elastic pool. + * + * @extends ProxyResource + */ +export interface ElasticPoolActivity extends ProxyResource { + /** + * @member {string} [location] The geo-location where the resource lives + */ + location?: string; + /** + * @member {Date} [endTime] The time the operation finished (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endTime?: Date; + /** + * @member {number} [errorCode] The error code if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorCode?: number; + /** + * @member {string} [errorMessage] The error message if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorMessage?: string; + /** + * @member {number} [errorSeverity] The error severity if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorSeverity?: number; + /** + * @member {string} [operation] The operation name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operation?: string; + /** + * @member {string} [operationId] The unique operation ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operationId?: string; + /** + * @member {number} [percentComplete] The percentage complete if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly percentComplete?: number; + /** + * @member {number} [requestedDatabaseDtuMax] The requested max DTU per + * database if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedDatabaseDtuMax?: number; + /** + * @member {number} [requestedDatabaseDtuMin] The requested min DTU per + * database if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedDatabaseDtuMin?: number; + /** + * @member {number} [requestedDtu] The requested DTU for the pool if + * available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedDtu?: number; + /** + * @member {string} [requestedElasticPoolName] The requested name for the + * elastic pool if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedElasticPoolName?: string; + /** + * @member {number} [requestedStorageLimitInGB] The requested storage limit + * for the pool in GB if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedStorageLimitInGB?: number; + /** + * @member {string} [elasticPoolName] The name of the elastic pool. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly elasticPoolName?: string; + /** + * @member {string} [serverName] The name of the server the elastic pool is + * in. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverName?: string; + /** + * @member {Date} [startTime] The time the operation started (ISO8601 + * format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startTime?: Date; + /** + * @member {string} [state] The current state of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: string; + /** + * @member {number} [requestedStorageLimitInMB] The requested storage limit + * in MB. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedStorageLimitInMB?: number; + /** + * @member {number} [requestedDatabaseDtuGuarantee] The requested per + * database DTU guarantee. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedDatabaseDtuGuarantee?: number; + /** + * @member {number} [requestedDatabaseDtuCap] The requested per database DTU + * cap. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedDatabaseDtuCap?: number; + /** + * @member {number} [requestedDtuGuarantee] The requested DTU guarantee. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedDtuGuarantee?: number; +} + +/** + * @interface + * An interface representing ElasticPoolDatabaseActivity. + * Represents the activity on an elastic pool. + * + * @extends ProxyResource + */ +export interface ElasticPoolDatabaseActivity extends ProxyResource { + /** + * @member {string} [location] The geo-location where the resource lives + */ + location?: string; + /** + * @member {string} [databaseName] The database name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {Date} [endTime] The time the operation finished (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endTime?: Date; + /** + * @member {number} [errorCode] The error code if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorCode?: number; + /** + * @member {string} [errorMessage] The error message if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorMessage?: string; + /** + * @member {number} [errorSeverity] The error severity if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorSeverity?: number; + /** + * @member {string} [operation] The operation name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operation?: string; + /** + * @member {string} [operationId] The unique operation ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operationId?: string; + /** + * @member {number} [percentComplete] The percentage complete if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly percentComplete?: number; + /** + * @member {string} [requestedElasticPoolName] The name for the elastic pool + * the database is moving into if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedElasticPoolName?: string; + /** + * @member {string} [currentElasticPoolName] The name of the current elastic + * pool the database is in if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentElasticPoolName?: string; + /** + * @member {string} [currentServiceObjective] The name of the current service + * objective if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentServiceObjective?: string; + /** + * @member {string} [requestedServiceObjective] The name of the requested + * service objective if available. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedServiceObjective?: string; + /** + * @member {string} [serverName] The name of the server the elastic pool is + * in. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverName?: string; + /** + * @member {Date} [startTime] The time the operation started (ISO8601 + * format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startTime?: Date; + /** + * @member {string} [state] The current state of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: string; +} + +/** + * @interface + * An interface representing OperationImpact. + * The impact of an operation, both in absolute and relative terms. + * + */ +export interface OperationImpact { + /** + * @member {string} [name] The name of the impact dimension. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [unit] The unit in which estimated impact to dimension is + * measured. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: string; + /** + * @member {number} [changeValueAbsolute] The absolute impact to dimension. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly changeValueAbsolute?: number; + /** + * @member {number} [changeValueRelative] The relative impact to dimension + * (null if not applicable) + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly changeValueRelative?: number; +} + +/** + * @interface + * An interface representing RecommendedIndex. + * Represents a database recommended index. + * + * @extends ProxyResource + */ +export interface RecommendedIndex extends ProxyResource { + /** + * @member {RecommendedIndexAction} [action] The proposed index action. You + * can create a missing index, drop an unused index, or rebuild an existing + * index to improve its performance. Possible values include: 'Create', + * 'Drop', 'Rebuild' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly action?: RecommendedIndexAction; + /** + * @member {RecommendedIndexState} [state] The current recommendation state. + * Possible values include: 'Active', 'Pending', 'Executing', 'Verifying', + * 'Pending Revert', 'Reverting', 'Reverted', 'Ignored', 'Expired', + * 'Blocked', 'Success' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: RecommendedIndexState; + /** + * @member {Date} [created] The UTC datetime showing when this resource was + * created (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {Date} [lastModified] The UTC datetime of when was this resource + * last changed (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModified?: Date; + /** + * @member {RecommendedIndexType} [indexType] The type of index (CLUSTERED, + * NONCLUSTERED, COLUMNSTORE, CLUSTERED COLUMNSTORE). Possible values + * include: 'CLUSTERED', 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED + * COLUMNSTORE' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly indexType?: RecommendedIndexType; + /** + * @member {string} [schema] The schema where table to build index over + * resides + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly schema?: string; + /** + * @member {string} [table] The table on which to build index. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly table?: string; + /** + * @member {string[]} [columns] Columns over which to build index + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly columns?: string[]; + /** + * @member {string[]} [includedColumns] The list of column names to be + * included in the index + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly includedColumns?: string[]; + /** + * @member {string} [indexScript] The full build index script + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly indexScript?: string; + /** + * @member {OperationImpact[]} [estimatedImpact] The estimated impact of + * doing recommended index action. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly estimatedImpact?: OperationImpact[]; + /** + * @member {OperationImpact[]} [reportedImpact] The values reported after + * index action is complete. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly reportedImpact?: OperationImpact[]; +} + +/** + * @interface + * An interface representing TransparentDataEncryption. + * Represents a database transparent data encryption configuration. + * + * @extends ProxyResource + */ +export interface TransparentDataEncryption extends ProxyResource { + /** + * @member {string} [location] Resource location. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {TransparentDataEncryptionStatus} [status] The status of the + * database transparent data encryption. Possible values include: 'Enabled', + * 'Disabled' + */ + status?: TransparentDataEncryptionStatus; +} + +/** + * @interface + * An interface representing SloUsageMetric. + * A Slo Usage Metric. + * + */ +export interface SloUsageMetric { + /** + * @member {ServiceObjectiveName} [serviceLevelObjective] The + * serviceLevelObjective for SLO usage metric. Possible values include: + * 'System', 'System0', 'System1', 'System2', 'System3', 'System4', + * 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', + * 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', + * 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', + * 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', + * 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', + * 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', + * 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', + * 'DS2000', 'ElasticPool' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serviceLevelObjective?: ServiceObjectiveName; + /** + * @member {string} [serviceLevelObjectiveId] The serviceLevelObjectiveId for + * SLO usage metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serviceLevelObjectiveId?: string; + /** + * @member {number} [inRangeTimeRatio] Gets or sets inRangeTimeRatio for SLO + * usage metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly inRangeTimeRatio?: number; +} + +/** + * @interface + * An interface representing ServiceTierAdvisor. + * Represents a Service Tier Advisor. + * + * @extends ProxyResource + */ +export interface ServiceTierAdvisor extends ProxyResource { + /** + * @member {Date} [observationPeriodStart] The observation period start + * (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly observationPeriodStart?: Date; + /** + * @member {Date} [observationPeriodEnd] The observation period start + * (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly observationPeriodEnd?: Date; + /** + * @member {number} [activeTimeRatio] The activeTimeRatio for service tier + * advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly activeTimeRatio?: number; + /** + * @member {number} [minDtu] Gets or sets minDtu for service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly minDtu?: number; + /** + * @member {number} [avgDtu] Gets or sets avgDtu for service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly avgDtu?: number; + /** + * @member {number} [maxDtu] Gets or sets maxDtu for service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maxDtu?: number; + /** + * @member {number} [maxSizeInGB] Gets or sets maxSizeInGB for service tier + * advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maxSizeInGB?: number; + /** + * @member {SloUsageMetric[]} [serviceLevelObjectiveUsageMetrics] Gets or + * sets serviceLevelObjectiveUsageMetrics for the service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serviceLevelObjectiveUsageMetrics?: SloUsageMetric[]; + /** + * @member {string} [currentServiceLevelObjective] Gets or sets + * currentServiceLevelObjective for service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentServiceLevelObjective?: string; + /** + * @member {string} [currentServiceLevelObjectiveId] Gets or sets + * currentServiceLevelObjectiveId for service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentServiceLevelObjectiveId?: string; + /** + * @member {string} [usageBasedRecommendationServiceLevelObjective] Gets or + * sets usageBasedRecommendationServiceLevelObjective for service tier + * advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly usageBasedRecommendationServiceLevelObjective?: string; + /** + * @member {string} [usageBasedRecommendationServiceLevelObjectiveId] Gets or + * sets usageBasedRecommendationServiceLevelObjectiveId for service tier + * advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly usageBasedRecommendationServiceLevelObjectiveId?: string; + /** + * @member {string} [databaseSizeBasedRecommendationServiceLevelObjective] + * Gets or sets databaseSizeBasedRecommendationServiceLevelObjective for + * service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseSizeBasedRecommendationServiceLevelObjective?: string; + /** + * @member {string} [databaseSizeBasedRecommendationServiceLevelObjectiveId] + * Gets or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for + * service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseSizeBasedRecommendationServiceLevelObjectiveId?: string; + /** + * @member {string} [disasterPlanBasedRecommendationServiceLevelObjective] + * Gets or sets disasterPlanBasedRecommendationServiceLevelObjective for + * service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly disasterPlanBasedRecommendationServiceLevelObjective?: string; + /** + * @member {string} [disasterPlanBasedRecommendationServiceLevelObjectiveId] + * Gets or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for + * service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly disasterPlanBasedRecommendationServiceLevelObjectiveId?: string; + /** + * @member {string} [overallRecommendationServiceLevelObjective] Gets or sets + * overallRecommendationServiceLevelObjective for service tier advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly overallRecommendationServiceLevelObjective?: string; + /** + * @member {string} [overallRecommendationServiceLevelObjectiveId] Gets or + * sets overallRecommendationServiceLevelObjectiveId for service tier + * advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly overallRecommendationServiceLevelObjectiveId?: string; + /** + * @member {number} [confidence] Gets or sets confidence for service tier + * advisor. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly confidence?: number; +} + +/** + * @interface + * An interface representing TransparentDataEncryptionActivity. + * Represents a database transparent data encryption Scan. + * + * @extends ProxyResource + */ +export interface TransparentDataEncryptionActivity extends ProxyResource { + /** + * @member {string} [location] Resource location. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {TransparentDataEncryptionActivityStatus} [status] The status of + * the database. Possible values include: 'Encrypting', 'Decrypting' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: TransparentDataEncryptionActivityStatus; + /** + * @member {number} [percentComplete] The percent complete of the transparent + * data encryption scan for a database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly percentComplete?: number; +} + +/** + * @interface + * An interface representing ServerUsage. + * Represents server metrics. + * + */ +export interface ServerUsage { + /** + * @member {string} [name] Name of the server usage metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [resourceName] The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceName?: string; + /** + * @member {string} [displayName] The metric display name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly displayName?: string; + /** + * @member {number} [currentValue] The current value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentValue?: number; + /** + * @member {number} [limit] The current limit of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly limit?: number; + /** + * @member {string} [unit] The units of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: string; + /** + * @member {Date} [nextResetTime] The next reset time for the metric (ISO8601 + * format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextResetTime?: Date; +} + +/** + * @interface + * An interface representing DatabaseUsage. + * The database usages. + * + */ +export interface DatabaseUsage { + /** + * @member {string} [name] The name of the usage metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [resourceName] The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceName?: string; + /** + * @member {string} [displayName] The usage metric display name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly displayName?: string; + /** + * @member {number} [currentValue] The current value of the usage metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentValue?: number; + /** + * @member {number} [limit] The current limit of the usage metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly limit?: number; + /** + * @member {string} [unit] The units of the usage metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: string; + /** + * @member {Date} [nextResetTime] The next reset time for the usage metric + * (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextResetTime?: Date; +} + +/** + * @interface + * An interface representing AutomaticTuningOptions. + * Automatic tuning properties for individual advisors. + * + */ +export interface AutomaticTuningOptions { + /** + * @member {AutomaticTuningOptionModeDesired} [desiredState] Automatic tuning + * option desired state. Possible values include: 'Off', 'On', 'Default' + */ + desiredState?: AutomaticTuningOptionModeDesired; + /** + * @member {AutomaticTuningOptionModeActual} [actualState] Automatic tuning + * option actual state. Possible values include: 'Off', 'On' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly actualState?: AutomaticTuningOptionModeActual; + /** + * @member {number} [reasonCode] Reason code if desired and actual state are + * different. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly reasonCode?: number; + /** + * @member {AutomaticTuningDisabledReason} [reasonDesc] Reason description if + * desired and actual state are different. Possible values include: + * 'Default', 'Disabled', 'AutoConfigured', 'InheritedFromServer', + * 'QueryStoreOff', 'QueryStoreReadOnly', 'NotSupported' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly reasonDesc?: AutomaticTuningDisabledReason; +} + +/** + * @interface + * An interface representing DatabaseAutomaticTuning. + * Database-level Automatic Tuning. + * + * @extends ProxyResource + */ +export interface DatabaseAutomaticTuning extends ProxyResource { + /** + * @member {AutomaticTuningMode} [desiredState] Automatic tuning desired + * state. Possible values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + */ + desiredState?: AutomaticTuningMode; + /** + * @member {AutomaticTuningMode} [actualState] Automatic tuning actual state. + * Possible values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly actualState?: AutomaticTuningMode; + /** + * @member {{ [propertyName: string]: AutomaticTuningOptions }} [options] + * Automatic tuning options definition. + */ + options?: { [propertyName: string]: AutomaticTuningOptions }; +} + +/** + * @interface + * An interface representing EncryptionProtector. + * The server encryption protector. + * + * @extends ProxyResource + */ +export interface EncryptionProtector extends ProxyResource { + /** + * @member {string} [kind] Kind of encryption protector. This is metadata + * used for the Azure portal experience. + */ + kind?: string; + /** + * @member {string} [location] Resource location. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {string} [subregion] Subregion of the encryption protector. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subregion?: string; + /** + * @member {string} [serverKeyName] The name of the server key. + */ + serverKeyName?: string; + /** + * @member {ServerKeyType} serverKeyType The encryption protector type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' + */ + serverKeyType: ServerKeyType; + /** + * @member {string} [uri] The URI of the server key. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly uri?: string; + /** + * @member {string} [thumbprint] Thumbprint of the server key. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly thumbprint?: string; +} + +/** + * @interface + * An interface representing FailoverGroupReadWriteEndpoint. + * Read-write endpoint of the failover group instance. + * + */ +export interface FailoverGroupReadWriteEndpoint { + /** + * @member {ReadWriteEndpointFailoverPolicy} failoverPolicy Failover policy + * of the read-write endpoint for the failover group. If failoverPolicy is + * Automatic then failoverWithDataLossGracePeriodMinutes is required. + * Possible values include: 'Manual', 'Automatic' + */ + failoverPolicy: ReadWriteEndpointFailoverPolicy; + /** + * @member {number} [failoverWithDataLossGracePeriodMinutes] Grace period + * before failover with data loss is attempted for the read-write endpoint. + * If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes + * is required. + */ + failoverWithDataLossGracePeriodMinutes?: number; +} + +/** + * @interface + * An interface representing FailoverGroupReadOnlyEndpoint. + * Read-only endpoint of the failover group instance. + * + */ +export interface FailoverGroupReadOnlyEndpoint { + /** + * @member {ReadOnlyEndpointFailoverPolicy} [failoverPolicy] Failover policy + * of the read-only endpoint for the failover group. Possible values include: + * 'Disabled', 'Enabled' + */ + failoverPolicy?: ReadOnlyEndpointFailoverPolicy; +} + +/** + * @interface + * An interface representing PartnerInfo. + * Partner server information for the failover group. + * + */ +export interface PartnerInfo { + /** + * @member {string} id Resource identifier of the partner server. + */ + id: string; + /** + * @member {string} [location] Geo location of the partner server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {FailoverGroupReplicationRole} [replicationRole] Replication role + * of the partner server. Possible values include: 'Primary', 'Secondary' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly replicationRole?: FailoverGroupReplicationRole; +} + +/** + * @interface + * An interface representing FailoverGroup. + * A failover group. + * + * @extends ProxyResource + */ +export interface FailoverGroup extends ProxyResource { + /** + * @member {string} [location] Resource location. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * @member {FailoverGroupReadWriteEndpoint} readWriteEndpoint Read-write + * endpoint of the failover group instance. + */ + readWriteEndpoint: FailoverGroupReadWriteEndpoint; + /** + * @member {FailoverGroupReadOnlyEndpoint} [readOnlyEndpoint] Read-only + * endpoint of the failover group instance. + */ + readOnlyEndpoint?: FailoverGroupReadOnlyEndpoint; + /** + * @member {FailoverGroupReplicationRole} [replicationRole] Local replication + * role of the failover group instance. Possible values include: 'Primary', + * 'Secondary' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly replicationRole?: FailoverGroupReplicationRole; + /** + * @member {string} [replicationState] Replication state of the failover + * group instance. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly replicationState?: string; + /** + * @member {PartnerInfo[]} partnerServers List of partner server information + * for the failover group. + */ + partnerServers: PartnerInfo[]; + /** + * @member {string[]} [databases] List of databases in the failover group. + */ + databases?: string[]; +} + +/** + * @interface + * An interface representing FailoverGroupUpdate. + * A failover group update request. + * + */ +export interface FailoverGroupUpdate { + /** + * @member {FailoverGroupReadWriteEndpoint} [readWriteEndpoint] Read-write + * endpoint of the failover group instance. + */ + readWriteEndpoint?: FailoverGroupReadWriteEndpoint; + /** + * @member {FailoverGroupReadOnlyEndpoint} [readOnlyEndpoint] Read-only + * endpoint of the failover group instance. + */ + readOnlyEndpoint?: FailoverGroupReadOnlyEndpoint; + /** + * @member {string[]} [databases] List of databases in the failover group. + */ + databases?: string[]; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing ResourceIdentity. + * Azure Active Directory identity configuration for a resource. + * + */ +export interface ResourceIdentity { + /** + * @member {string} [principalId] The Azure Active Directory principal id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly principalId?: string; + /** + * @member {IdentityType} [type] The identity type. Set this to + * 'SystemAssigned' in order to automatically create and assign an Azure + * Active Directory principal for the resource. Possible values include: + * 'SystemAssigned' + */ + type?: IdentityType; + /** + * @member {string} [tenantId] The Azure Active Directory tenant id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tenantId?: string; +} + +/** + * @interface + * An interface representing Sku. + * The resource model definition representing SKU + * + */ +export interface Sku { + /** + * @member {string} name The name of the SKU. Ex - P3. It is typically a + * letter+number code + */ + name: string; + /** + * @member {string} [tier] This field is required to be implemented by the + * Resource Provider if the service has more than one tier, but is not + * required on a PUT. + */ + tier?: string; + /** + * @member {string} [size] The SKU size. When the name field is the + * combination of tier and some other value, this would be the standalone + * code. + */ + size?: string; + /** + * @member {string} [family] If the service has different generations of + * hardware, for the same SKU, then that can be captured here. + */ + family?: string; + /** + * @member {number} [capacity] If the SKU supports scale out/in then the + * capacity integer should be included. If scale out/in is not possible for + * the resource this may be omitted. + */ + capacity?: number; +} + +/** + * @interface + * An interface representing ManagedInstance. + * An Azure SQL managed instance. + * + * @extends TrackedResource + */ +export interface ManagedInstance extends TrackedResource { + /** + * @member {ResourceIdentity} [identity] The Azure Active Directory identity + * of the managed instance. + */ + identity?: ResourceIdentity; + /** + * @member {Sku} [sku] Managed instance sku + */ + sku?: Sku; + /** + * @member {string} [fullyQualifiedDomainName] The fully qualified domain + * name of the managed instance. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullyQualifiedDomainName?: string; + /** + * @member {string} [administratorLogin] Administrator username for the + * managed instance. Can only be specified when the managed instance is being + * created (and is required for creation). + */ + administratorLogin?: string; + /** + * @member {string} [administratorLoginPassword] The administrator login + * password (required for managed instance creation). + */ + administratorLoginPassword?: string; + /** + * @member {string} [subnetId] Subnet resource ID for the managed instance. + */ + subnetId?: string; + /** + * @member {string} [state] The state of the managed instance. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: string; + /** + * @member {string} [licenseType] The license type. Possible values are + * 'LicenseIncluded' and 'BasePrice'. + */ + licenseType?: string; + /** + * @member {number} [vCores] The number of VCores. + */ + vCores?: number; + /** + * @member {number} [storageSizeInGB] The maximum storage size in GB. + */ + storageSizeInGB?: number; + /** + * @member {string} [collation] Collation of the managed instance. + */ + collation?: string; + /** + * @member {string} [dnsZone] The Dns Zone that the managed instance is in. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dnsZone?: string; + /** + * @member {string} [dnsZonePartner] The resource id of another managed + * instance whose DNS zone this managed instance will share after creation. + */ + dnsZonePartner?: string; + /** + * @member {boolean} [publicDataEndpointEnabled] Whether or not the public + * data endpoint is enabled. + */ + publicDataEndpointEnabled?: boolean; + /** + * @member {ManagedInstanceProxyOverride} [proxyOverride] Connection type + * used for connecting to the instance. Possible values include: 'Proxy', + * 'Redirect', 'Default' + */ + proxyOverride?: ManagedInstanceProxyOverride; + /** + * @member {string} [timezoneId] Id of the timezone. Allowed values are + * timezones supported by Windows. + * Windows keeps details on supported timezones, including the id, in + * registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name + * AS timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + */ + timezoneId?: string; +} + +/** + * @interface + * An interface representing ManagedInstanceUpdate. + * An update request for an Azure SQL Database managed instance. + * + */ +export interface ManagedInstanceUpdate { + /** + * @member {Sku} [sku] Managed instance sku + */ + sku?: Sku; + /** + * @member {string} [fullyQualifiedDomainName] The fully qualified domain + * name of the managed instance. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullyQualifiedDomainName?: string; + /** + * @member {string} [administratorLogin] Administrator username for the + * managed instance. Can only be specified when the managed instance is being + * created (and is required for creation). + */ + administratorLogin?: string; + /** + * @member {string} [administratorLoginPassword] The administrator login + * password (required for managed instance creation). + */ + administratorLoginPassword?: string; + /** + * @member {string} [subnetId] Subnet resource ID for the managed instance. + */ + subnetId?: string; + /** + * @member {string} [state] The state of the managed instance. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: string; + /** + * @member {string} [licenseType] The license type. Possible values are + * 'LicenseIncluded' and 'BasePrice'. + */ + licenseType?: string; + /** + * @member {number} [vCores] The number of VCores. + */ + vCores?: number; + /** + * @member {number} [storageSizeInGB] The maximum storage size in GB. + */ + storageSizeInGB?: number; + /** + * @member {string} [collation] Collation of the managed instance. + */ + collation?: string; + /** + * @member {string} [dnsZone] The Dns Zone that the managed instance is in. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dnsZone?: string; + /** + * @member {string} [dnsZonePartner] The resource id of another managed + * instance whose DNS zone this managed instance will share after creation. + */ + dnsZonePartner?: string; + /** + * @member {boolean} [publicDataEndpointEnabled] Whether or not the public + * data endpoint is enabled. + */ + publicDataEndpointEnabled?: boolean; + /** + * @member {ManagedInstanceProxyOverride} [proxyOverride] Connection type + * used for connecting to the instance. Possible values include: 'Proxy', + * 'Redirect', 'Default' + */ + proxyOverride?: ManagedInstanceProxyOverride; + /** + * @member {string} [timezoneId] Id of the timezone. Allowed values are + * timezones supported by Windows. + * Windows keeps details on supported timezones, including the id, in + * registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name + * AS timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + */ + timezoneId?: string; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing OperationDisplay. + * Display metadata associated with the operation. + * + */ +export interface OperationDisplay { + /** + * @member {string} [provider] The localized friendly form of the resource + * provider name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provider?: string; + /** + * @member {string} [resource] The localized friendly form of the resource + * type related to this action/operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resource?: string; + /** + * @member {string} [operation] The localized friendly name for the + * operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operation?: string; + /** + * @member {string} [description] The localized friendly description for the + * operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; +} + +/** + * @interface + * An interface representing Operation. + * SQL REST API operation definition. + * + */ +export interface Operation { + /** + * @member {string} [name] The name of the operation being performed on this + * particular object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {OperationDisplay} [display] The localized display information for + * this particular operation / action. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly display?: OperationDisplay; + /** + * @member {OperationOrigin} [origin] The intended executor of the operation. + * Possible values include: 'user', 'system' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly origin?: OperationOrigin; + /** + * @member {{ [propertyName: string]: any }} [properties] Additional + * descriptions for the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly properties?: { [propertyName: string]: any }; +} + +/** + * @interface + * An interface representing ServerKey. + * A server key. + * + * @extends ProxyResource + */ +export interface ServerKey extends ProxyResource { + /** + * @member {string} [kind] Kind of encryption protector. This is metadata + * used for the Azure portal experience. + */ + kind?: string; + /** + * @member {string} [location] Resource location. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {string} [subregion] Subregion of the server key. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subregion?: string; + /** + * @member {ServerKeyType} serverKeyType The server key type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' + */ + serverKeyType: ServerKeyType; + /** + * @member {string} [uri] The URI of the server key. + */ + uri?: string; + /** + * @member {string} [thumbprint] Thumbprint of the server key. + */ + thumbprint?: string; + /** + * @member {Date} [creationDate] The server key creation date. + */ + creationDate?: Date; +} + +/** + * @interface + * An interface representing Server. + * An Azure SQL Database server. + * + * @extends TrackedResource + */ +export interface Server extends TrackedResource { + /** + * @member {ResourceIdentity} [identity] The Azure Active Directory identity + * of the server. + */ + identity?: ResourceIdentity; + /** + * @member {string} [kind] Kind of sql server. This is metadata used for the + * Azure portal experience. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {string} [administratorLogin] Administrator username for the + * server. Once created it cannot be changed. + */ + administratorLogin?: string; + /** + * @member {string} [administratorLoginPassword] The administrator login + * password (required for server creation). + */ + administratorLoginPassword?: string; + /** + * @member {string} [version] The version of the server. + */ + version?: string; + /** + * @member {string} [state] The state of the server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: string; + /** + * @member {string} [fullyQualifiedDomainName] The fully qualified domain + * name of the server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullyQualifiedDomainName?: string; +} + +/** + * @interface + * An interface representing ServerUpdate. + * An update request for an Azure SQL Database server. + * + */ +export interface ServerUpdate { + /** + * @member {string} [administratorLogin] Administrator username for the + * server. Once created it cannot be changed. + */ + administratorLogin?: string; + /** + * @member {string} [administratorLoginPassword] The administrator login + * password (required for server creation). + */ + administratorLoginPassword?: string; + /** + * @member {string} [version] The version of the server. + */ + version?: string; + /** + * @member {string} [state] The state of the server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: string; + /** + * @member {string} [fullyQualifiedDomainName] The fully qualified domain + * name of the server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fullyQualifiedDomainName?: string; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing SyncAgent. + * An Azure SQL Database sync agent. + * + * @extends ProxyResource + */ +export interface SyncAgent extends ProxyResource { + /** + * @member {string} [syncAgentName] Name of the sync agent. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly syncAgentName?: string; + /** + * @member {string} [syncDatabaseId] ARM resource id of the sync database in + * the sync agent. + */ + syncDatabaseId?: string; + /** + * @member {Date} [lastAliveTime] Last alive time of the sync agent. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastAliveTime?: Date; + /** + * @member {SyncAgentState} [state] State of the sync agent. Possible values + * include: 'Online', 'Offline', 'NeverConnected' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: SyncAgentState; + /** + * @member {boolean} [isUpToDate] If the sync agent version is up to date. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isUpToDate?: boolean; + /** + * @member {Date} [expiryTime] Expiration time of the sync agent version. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly expiryTime?: Date; + /** + * @member {string} [version] Version of the sync agent. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly version?: string; +} + +/** + * @interface + * An interface representing SyncAgentKeyProperties. + * Properties of an Azure SQL Database sync agent key. + * + */ +export interface SyncAgentKeyProperties { + /** + * @member {string} [syncAgentKey] Key of sync agent. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly syncAgentKey?: string; +} + +/** + * @interface + * An interface representing SyncAgentLinkedDatabase. + * An Azure SQL Database sync agent linked database. + * + * @extends ProxyResource + */ +export interface SyncAgentLinkedDatabase extends ProxyResource { + /** + * @member {SyncMemberDbType} [databaseType] Type of the sync agent linked + * database. Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseType?: SyncMemberDbType; + /** + * @member {string} [databaseId] Id of the sync agent linked database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseId?: string; + /** + * @member {string} [description] Description of the sync agent linked + * database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; + /** + * @member {string} [serverName] Server name of the sync agent linked + * database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverName?: string; + /** + * @member {string} [databaseName] Database name of the sync agent linked + * database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {string} [userName] User name of the sync agent linked database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly userName?: string; +} + +/** + * @interface + * An interface representing SyncDatabaseIdProperties. + * Properties of the sync database id. + * + */ +export interface SyncDatabaseIdProperties { + /** + * @member {string} [id] ARM resource id of sync database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; +} + +/** + * @interface + * An interface representing SyncFullSchemaTableColumn. + * Properties of the column in the table of database full schema. + * + */ +export interface SyncFullSchemaTableColumn { + /** + * @member {string} [dataSize] Data size of the column. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dataSize?: string; + /** + * @member {string} [dataType] Data type of the column. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dataType?: string; + /** + * @member {string} [errorId] Error id of the column. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorId?: string; + /** + * @member {boolean} [hasError] If there is error in the table. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly hasError?: boolean; + /** + * @member {boolean} [isPrimaryKey] If it is the primary key of the table. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isPrimaryKey?: boolean; + /** + * @member {string} [name] Name of the column. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [quotedName] Quoted name of the column. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly quotedName?: string; +} + +/** + * @interface + * An interface representing SyncFullSchemaTable. + * Properties of the table in the database full schema. + * + */ +export interface SyncFullSchemaTable { + /** + * @member {SyncFullSchemaTableColumn[]} [columns] List of columns in the + * table of database full schema. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly columns?: SyncFullSchemaTableColumn[]; + /** + * @member {string} [errorId] Error id of the table. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorId?: string; + /** + * @member {boolean} [hasError] If there is error in the table. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly hasError?: boolean; + /** + * @member {string} [name] Name of the table. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [quotedName] Quoted name of the table. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly quotedName?: string; +} + +/** + * @interface + * An interface representing SyncFullSchemaProperties. + * Properties of the database full schema. + * + */ +export interface SyncFullSchemaProperties { + /** + * @member {SyncFullSchemaTable[]} [tables] List of tables in the database + * full schema. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tables?: SyncFullSchemaTable[]; + /** + * @member {Date} [lastUpdateTime] Last update time of the database schema. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastUpdateTime?: Date; +} + +/** + * @interface + * An interface representing SyncGroupLogProperties. + * Properties of an Azure SQL Database sync group log. + * + */ +export interface SyncGroupLogProperties { + /** + * @member {Date} [timestamp] Timestamp of the sync group log. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly timestamp?: Date; + /** + * @member {SyncGroupLogType} [type] Type of the sync group log. Possible + * values include: 'All', 'Error', 'Warning', 'Success' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: SyncGroupLogType; + /** + * @member {string} [source] Source of the sync group log. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly source?: string; + /** + * @member {string} [details] Details of the sync group log. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly details?: string; + /** + * @member {string} [tracingId] TracingId of the sync group log. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tracingId?: string; + /** + * @member {string} [operationStatus] OperationStatus of the sync group log. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operationStatus?: string; +} + +/** + * @interface + * An interface representing SyncGroupSchemaTableColumn. + * Properties of column in sync group table. + * + */ +export interface SyncGroupSchemaTableColumn { + /** + * @member {string} [quotedName] Quoted name of sync group table column. + */ + quotedName?: string; + /** + * @member {string} [dataSize] Data size of the column. + */ + dataSize?: string; + /** + * @member {string} [dataType] Data type of the column. + */ + dataType?: string; +} + +/** + * @interface + * An interface representing SyncGroupSchemaTable. + * Properties of table in sync group schema. + * + */ +export interface SyncGroupSchemaTable { + /** + * @member {SyncGroupSchemaTableColumn[]} [columns] List of columns in sync + * group schema. + */ + columns?: SyncGroupSchemaTableColumn[]; + /** + * @member {string} [quotedName] Quoted name of sync group schema table. + */ + quotedName?: string; +} + +/** + * @interface + * An interface representing SyncGroupSchema. + * Properties of sync group schema. + * + */ +export interface SyncGroupSchema { + /** + * @member {SyncGroupSchemaTable[]} [tables] List of tables in sync group + * schema. + */ + tables?: SyncGroupSchemaTable[]; + /** + * @member {string} [masterSyncMemberName] Name of master sync member where + * the schema is from. + */ + masterSyncMemberName?: string; +} + +/** + * @interface + * An interface representing SyncGroup. + * An Azure SQL Database sync group. + * + * @extends ProxyResource + */ +export interface SyncGroup extends ProxyResource { + /** + * @member {number} [interval] Sync interval of the sync group. + */ + interval?: number; + /** + * @member {Date} [lastSyncTime] Last sync time of the sync group. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastSyncTime?: Date; + /** + * @member {SyncConflictResolutionPolicy} [conflictResolutionPolicy] Conflict + * resolution policy of the sync group. Possible values include: 'HubWin', + * 'MemberWin' + */ + conflictResolutionPolicy?: SyncConflictResolutionPolicy; + /** + * @member {string} [syncDatabaseId] ARM resource id of the sync database in + * the sync group. + */ + syncDatabaseId?: string; + /** + * @member {string} [hubDatabaseUserName] User name for the sync group hub + * database credential. + */ + hubDatabaseUserName?: string; + /** + * @member {string} [hubDatabasePassword] Password for the sync group hub + * database credential. + */ + hubDatabasePassword?: string; + /** + * @member {SyncGroupState} [syncState] Sync state of the sync group. + * Possible values include: 'NotReady', 'Error', 'Warning', 'Progressing', + * 'Good' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly syncState?: SyncGroupState; + /** + * @member {SyncGroupSchema} [schema] Sync schema of the sync group. + */ + schema?: SyncGroupSchema; +} + +/** + * @interface + * An interface representing SyncMember. + * An Azure SQL Database sync member. + * + * @extends ProxyResource + */ +export interface SyncMember extends ProxyResource { + /** + * @member {SyncMemberDbType} [databaseType] Database type of the sync + * member. Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase' + */ + databaseType?: SyncMemberDbType; + /** + * @member {string} [syncAgentId] ARM resource id of the sync agent in the + * sync member. + */ + syncAgentId?: string; + /** + * @member {string} [sqlServerDatabaseId] SQL Server database id of the sync + * member. + */ + sqlServerDatabaseId?: string; + /** + * @member {string} [serverName] Server name of the member database in the + * sync member + */ + serverName?: string; + /** + * @member {string} [databaseName] Database name of the member database in + * the sync member. + */ + databaseName?: string; + /** + * @member {string} [userName] User name of the member database in the sync + * member. + */ + userName?: string; + /** + * @member {string} [password] Password of the member database in the sync + * member. + */ + password?: string; + /** + * @member {SyncDirection} [syncDirection] Sync direction of the sync member. + * Possible values include: 'Bidirectional', 'OneWayMemberToHub', + * 'OneWayHubToMember' + */ + syncDirection?: SyncDirection; + /** + * @member {SyncMemberState} [syncState] Sync state of the sync member. + * Possible values include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + * 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + * 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', + * 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', + * 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + * 'ReprovisionFailed', 'UnReprovisioned' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly syncState?: SyncMemberState; +} + +/** + * @interface + * An interface representing SubscriptionUsage. + * Usage Metric of a Subscription in a Location. + * + * @extends ProxyResource + */ +export interface SubscriptionUsage extends ProxyResource { + /** + * @member {string} [displayName] User-readable name of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly displayName?: string; + /** + * @member {number} [currentValue] Current value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentValue?: number; + /** + * @member {number} [limit] Boundary value of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly limit?: number; + /** + * @member {string} [unit] Unit of the metric. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: string; +} + +/** + * @interface + * An interface representing VirtualCluster. + * An Azure SQL virtual cluster. + * + * @extends TrackedResource + */ +export interface VirtualCluster extends TrackedResource { + /** + * @member {string} [subnetId] Subnet resource ID for the virtual cluster. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subnetId?: string; + /** + * @member {string} [family] If the service has different generations of + * hardware, for the same SKU, then that can be captured here. + */ + family?: string; + /** + * @member {string[]} [childResources] List of resources in this virtual + * cluster. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly childResources?: string[]; +} + +/** + * @interface + * An interface representing VirtualClusterUpdate. + * An update request for an Azure SQL Database virtual cluster. + * + */ +export interface VirtualClusterUpdate { + /** + * @member {string} [subnetId] Subnet resource ID for the virtual cluster. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subnetId?: string; + /** + * @member {string} [family] If the service has different generations of + * hardware, for the same SKU, then that can be captured here. + */ + family?: string; + /** + * @member {string[]} [childResources] List of resources in this virtual + * cluster. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly childResources?: string[]; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing VirtualNetworkRule. + * A virtual network rule. + * + * @extends ProxyResource + */ +export interface VirtualNetworkRule extends ProxyResource { + /** + * @member {string} virtualNetworkSubnetId The ARM resource id of the virtual + * network subnet. + */ + virtualNetworkSubnetId: string; + /** + * @member {boolean} [ignoreMissingVnetServiceEndpoint] Create firewall rule + * before the virtual network has vnet service endpoint enabled. + */ + ignoreMissingVnetServiceEndpoint?: boolean; + /** + * @member {VirtualNetworkRuleState} [state] Virtual Network Rule State. + * Possible values include: 'Initializing', 'InProgress', 'Ready', + * 'Deleting', 'Unknown' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: VirtualNetworkRuleState; +} + +/** + * @interface + * An interface representing ExtendedDatabaseBlobAuditingPolicy. + * An extended database blob auditing policy. + * + * @extends ProxyResource + */ +export interface ExtendedDatabaseBlobAuditingPolicy extends ProxyResource { + /** + * @member {string} [predicateExpression] Specifies condition of where clause + * when creating an audit. + */ + predicateExpression?: string; + /** + * @member {BlobAuditingPolicyState} state Specifies the state of the policy. + * If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are + * required. Possible values include: 'Enabled', 'Disabled' + */ + state: BlobAuditingPolicyState; + /** + * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, + * storageEndpoint is required. + */ + storageEndpoint?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the auditing storage account. If state is Enabled and storageEndpoint is + * specified, storageAccountAccessKey is required. + */ + storageAccountAccessKey?: string; + /** + * @member {number} [retentionDays] Specifies the number of days to keep in + * the audit logs in the storage account. + */ + retentionDays?: number; + /** + * @member {string[]} [auditActionsAndGroups] Specifies the Actions-Groups + * and Actions to audit. + * + * The 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: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when + * enabling auditing from the Azure portal. + * + * The 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): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These 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. + * + * For 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). + * + * For 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: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note 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. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For 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) + */ + auditActionsAndGroups?: string[]; + /** + * @member {string} [storageAccountSubscriptionId] Specifies the blob storage + * subscription Id. + */ + storageAccountSubscriptionId?: string; + /** + * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether + * storageAccountAccessKey value is the storage's secondary key. + */ + isStorageSecondaryKeyInUse?: boolean; + /** + * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit + * events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' + * and 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should + * be also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * 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 + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + */ + isAzureMonitorTargetEnabled?: boolean; +} + +/** + * @interface + * An interface representing ExtendedServerBlobAuditingPolicy. + * An extended server blob auditing policy. + * + * @extends ProxyResource + */ +export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { + /** + * @member {string} [predicateExpression] Specifies condition of where clause + * when creating an audit. + */ + predicateExpression?: string; + /** + * @member {BlobAuditingPolicyState} state Specifies the state of the policy. + * If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are + * required. Possible values include: 'Enabled', 'Disabled' + */ + state: BlobAuditingPolicyState; + /** + * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, + * storageEndpoint is required. + */ + storageEndpoint?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the auditing storage account. If state is Enabled and storageEndpoint is + * specified, storageAccountAccessKey is required. + */ + storageAccountAccessKey?: string; + /** + * @member {number} [retentionDays] Specifies the number of days to keep in + * the audit logs in the storage account. + */ + retentionDays?: number; + /** + * @member {string[]} [auditActionsAndGroups] Specifies the Actions-Groups + * and Actions to audit. + * + * The 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: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when + * enabling auditing from the Azure portal. + * + * The 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): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These 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. + * + * For 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). + * + * For 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: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note 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. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For 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) + */ + auditActionsAndGroups?: string[]; + /** + * @member {string} [storageAccountSubscriptionId] Specifies the blob storage + * subscription Id. + */ + storageAccountSubscriptionId?: string; + /** + * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether + * storageAccountAccessKey value is the storage's secondary key. + */ + isStorageSecondaryKeyInUse?: boolean; + /** + * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit + * events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' + * and 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should + * be also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * 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 + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + */ + isAzureMonitorTargetEnabled?: boolean; +} + +/** + * @interface + * An interface representing ServerBlobAuditingPolicy. + * A server blob auditing policy. + * + * @extends ProxyResource + */ +export interface ServerBlobAuditingPolicy extends ProxyResource { + /** + * @member {BlobAuditingPolicyState} state Specifies the state of the policy. + * If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are + * required. Possible values include: 'Enabled', 'Disabled' + */ + state: BlobAuditingPolicyState; + /** + * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, + * storageEndpoint is required. + */ + storageEndpoint?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the auditing storage account. If state is Enabled and storageEndpoint is + * specified, storageAccountAccessKey is required. + */ + storageAccountAccessKey?: string; + /** + * @member {number} [retentionDays] Specifies the number of days to keep in + * the audit logs in the storage account. + */ + retentionDays?: number; + /** + * @member {string[]} [auditActionsAndGroups] Specifies the Actions-Groups + * and Actions to audit. + * + * The 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: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when + * enabling auditing from the Azure portal. + * + * The 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): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These 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. + * + * For 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). + * + * For 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: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note 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. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For 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) + */ + auditActionsAndGroups?: string[]; + /** + * @member {string} [storageAccountSubscriptionId] Specifies the blob storage + * subscription Id. + */ + storageAccountSubscriptionId?: string; + /** + * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether + * storageAccountAccessKey value is the storage's secondary key. + */ + isStorageSecondaryKeyInUse?: boolean; + /** + * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit + * events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' + * and 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should + * be also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * 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 + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + */ + isAzureMonitorTargetEnabled?: boolean; +} + +/** + * @interface + * An interface representing DatabaseBlobAuditingPolicy. + * A database blob auditing policy. + * + * @extends ProxyResource + */ +export interface DatabaseBlobAuditingPolicy extends ProxyResource { + /** + * @member {string} [kind] Resource kind. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {BlobAuditingPolicyState} state Specifies the state of the policy. + * If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are + * required. Possible values include: 'Enabled', 'Disabled' + */ + state: BlobAuditingPolicyState; + /** + * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, + * storageEndpoint is required. + */ + storageEndpoint?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the auditing storage account. If state is Enabled and storageEndpoint is + * specified, storageAccountAccessKey is required. + */ + storageAccountAccessKey?: string; + /** + * @member {number} [retentionDays] Specifies the number of days to keep in + * the audit logs in the storage account. + */ + retentionDays?: number; + /** + * @member {string[]} [auditActionsAndGroups] Specifies the Actions-Groups + * and Actions to audit. + * + * The 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: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when + * enabling auditing from the Azure portal. + * + * The 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): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These 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. + * + * For 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). + * + * For 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: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note 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. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For 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) + */ + auditActionsAndGroups?: string[]; + /** + * @member {string} [storageAccountSubscriptionId] Specifies the blob storage + * subscription Id. + */ + storageAccountSubscriptionId?: string; + /** + * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether + * storageAccountAccessKey value is the storage's secondary key. + */ + isStorageSecondaryKeyInUse?: boolean; + /** + * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit + * events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' + * and 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should + * be also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * 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 + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + */ + isAzureMonitorTargetEnabled?: boolean; +} + +/** + * @interface + * An interface representing DatabaseVulnerabilityAssessmentRuleBaselineItem. + * Properties for an Azure SQL Database Vulnerability Assessment rule + * baseline's result. + * + */ +export interface DatabaseVulnerabilityAssessmentRuleBaselineItem { + /** + * @member {string[]} result The rule baseline result + */ + result: string[]; +} + +/** + * @interface + * An interface representing DatabaseVulnerabilityAssessmentRuleBaseline. + * A database vulnerability assessment rule baseline. + * + * @extends ProxyResource + */ +export interface DatabaseVulnerabilityAssessmentRuleBaseline extends ProxyResource { + /** + * @member {DatabaseVulnerabilityAssessmentRuleBaselineItem[]} + * baselineResults The rule baseline result + */ + baselineResults: DatabaseVulnerabilityAssessmentRuleBaselineItem[]; +} + +/** + * @interface + * An interface representing VulnerabilityAssessmentRecurringScansProperties. + * Properties of a Vulnerability Assessment recurring scans. + * + */ +export interface VulnerabilityAssessmentRecurringScansProperties { + /** + * @member {boolean} [isEnabled] Recurring scans state. + */ + isEnabled?: boolean; + /** + * @member {boolean} [emailSubscriptionAdmins] Specifies that the schedule + * scan notification will be is sent to the subscription administrators. + * Default value: true . + */ + emailSubscriptionAdmins?: boolean; + /** + * @member {string[]} [emails] Specifies an array of e-mail addresses to + * which the scan notification is sent. + */ + emails?: string[]; +} + +/** + * @interface + * An interface representing DatabaseVulnerabilityAssessment. + * A database vulnerability assessment. + * + * @extends ProxyResource + */ +export interface DatabaseVulnerabilityAssessment extends ProxyResource { + /** + * @member {string} [storageContainerPath] 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 + */ + storageContainerPath?: string; + /** + * @member {string} [storageContainerSasKey] 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. + */ + storageContainerSasKey?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the storage account for vulnerability assessment scan results. If + * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + * required. + */ + storageAccountAccessKey?: string; + /** + * @member {VulnerabilityAssessmentRecurringScansProperties} [recurringScans] + * The recurring scans settings + */ + recurringScans?: VulnerabilityAssessmentRecurringScansProperties; +} + +/** + * @interface + * An interface representing JobAgent. + * An Azure SQL job agent. + * + * @extends TrackedResource + */ +export interface JobAgent extends TrackedResource { + /** + * @member {Sku} [sku] The name and tier of the SKU. + */ + sku?: Sku; + /** + * @member {string} databaseId Resource ID of the database to store job + * metadata in. + */ + databaseId: string; + /** + * @member {JobAgentState} [state] The state of the job agent. Possible + * values include: 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: JobAgentState; +} + +/** + * @interface + * An interface representing JobAgentUpdate. + * An update to an Azure SQL job agent. + * + */ +export interface JobAgentUpdate { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing JobCredential. + * A stored credential that can be used by a job to connect to target + * databases. + * + * @extends ProxyResource + */ +export interface JobCredential extends ProxyResource { + /** + * @member {string} username The credential user name. + */ + username: string; + /** + * @member {string} password The credential password. + */ + password: string; +} + +/** + * @interface + * An interface representing JobExecutionTarget. + * The target that a job execution is executed on. + * + */ +export interface JobExecutionTarget { + /** + * @member {JobTargetType} [type] The type of the target. Possible values + * include: 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', + * 'SqlServer' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: JobTargetType; + /** + * @member {string} [serverName] The server name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverName?: string; + /** + * @member {string} [databaseName] The database name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; +} + +/** + * @interface + * An interface representing JobExecution. + * An execution of a job + * + * @extends ProxyResource + */ +export interface JobExecution extends ProxyResource { + /** + * @member {number} [jobVersion] The job version number. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly jobVersion?: number; + /** + * @member {string} [stepName] The job step name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly stepName?: string; + /** + * @member {number} [stepId] The job step id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly stepId?: number; + /** + * @member {string} [jobExecutionId] The unique identifier of the job + * execution. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly jobExecutionId?: string; + /** + * @member {JobExecutionLifecycle} [lifecycle] The detailed state of the job + * execution. Possible values include: 'Created', 'InProgress', + * 'WaitingForChildJobExecutions', 'WaitingForRetry', 'Succeeded', + * 'SucceededWithSkipped', 'Failed', 'TimedOut', 'Canceled', 'Skipped' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lifecycle?: JobExecutionLifecycle; + /** + * @member {ProvisioningState} [provisioningState] The ARM provisioning state + * of the job execution. Possible values include: 'Created', 'InProgress', + * 'Succeeded', 'Failed', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * @member {Date} [createTime] The time that the job execution was created. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly createTime?: Date; + /** + * @member {Date} [startTime] The time that the job execution started. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startTime?: Date; + /** + * @member {Date} [endTime] The time that the job execution completed. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endTime?: Date; + /** + * @member {number} [currentAttempts] Number of times the job execution has + * been attempted. + */ + currentAttempts?: number; + /** + * @member {Date} [currentAttemptStartTime] Start time of the current + * attempt. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentAttemptStartTime?: Date; + /** + * @member {string} [lastMessage] The last status or error message. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastMessage?: string; + /** + * @member {JobExecutionTarget} [target] The target that this execution is + * executed on. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly target?: JobExecutionTarget; +} + +/** + * @interface + * An interface representing JobSchedule. + * Scheduling properties of a job. + * + */ +export interface JobSchedule { + /** + * @member {Date} [startTime] Schedule start time. Default value: new + * Date('0001-01-01T00:00:00Z') . + */ + startTime?: Date; + /** + * @member {Date} [endTime] Schedule end time. Default value: new + * Date('9999-12-31T11:59:59Z') . + */ + endTime?: Date; + /** + * @member {JobScheduleType} [type] Schedule interval type. Possible values + * include: 'Once', 'Recurring'. Default value: 'Once' . + */ + type?: JobScheduleType; + /** + * @member {boolean} [enabled] Whether or not the schedule is enabled. + */ + enabled?: boolean; + /** + * @member {string} [interval] Value of the schedule's recurring interval, if + * the schedule type is recurring. ISO8601 duration format. + */ + interval?: string; +} + +/** + * @interface + * An interface representing Job. + * A job. + * + * @extends ProxyResource + */ +export interface Job extends ProxyResource { + /** + * @member {string} [description] User-defined description of the job. + * Default value: '' . + */ + description?: string; + /** + * @member {number} [version] The job version number. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly version?: number; + /** + * @member {JobSchedule} [schedule] Schedule properties of the job. + */ + schedule?: JobSchedule; +} + +/** + * @interface + * An interface representing JobStepAction. + * The action to be executed by a job step. + * + */ +export interface JobStepAction { + /** + * @member {JobStepActionType} [type] Type of action being executed by the + * job step. Possible values include: 'TSql'. Default value: 'TSql' . + */ + type?: JobStepActionType; + /** + * @member {JobStepActionSource} [source] The source of the action to + * execute. Possible values include: 'Inline'. Default value: 'Inline' . + */ + source?: JobStepActionSource; + /** + * @member {string} value The action value, for example the text of the T-SQL + * script to execute. + */ + value: string; +} + +/** + * @interface + * An interface representing JobStepOutput. + * The output configuration of a job step. + * + */ +export interface JobStepOutput { + /** + * @member {JobStepOutputType} [type] The output destination type. Possible + * values include: 'SqlDatabase'. Default value: 'SqlDatabase' . + */ + type?: JobStepOutputType; + /** + * @member {string} [subscriptionId] The output destination subscription id. + */ + subscriptionId?: string; + /** + * @member {string} [resourceGroupName] The output destination resource + * group. + */ + resourceGroupName?: string; + /** + * @member {string} serverName The output destination server name. + */ + serverName: string; + /** + * @member {string} databaseName The output destination database. + */ + databaseName: string; + /** + * @member {string} [schemaName] The output destination schema. Default + * value: 'dbo' . + */ + schemaName?: string; + /** + * @member {string} tableName The output destination table. + */ + tableName: string; + /** + * @member {string} credential The resource ID of the credential to use to + * connect to the output destination. + */ + credential: string; +} + +/** + * @interface + * An interface representing JobStepExecutionOptions. + * The execution options of a job step. + * + */ +export interface JobStepExecutionOptions { + /** + * @member {number} [timeoutSeconds] Execution timeout for the job step. + * Default value: 43200 . + */ + timeoutSeconds?: number; + /** + * @member {number} [retryAttempts] Maximum number of times the job step will + * be reattempted if the first attempt fails. Default value: 10 . + */ + retryAttempts?: number; + /** + * @member {number} [initialRetryIntervalSeconds] Initial delay between + * retries for job step execution. Default value: 1 . + */ + initialRetryIntervalSeconds?: number; + /** + * @member {number} [maximumRetryIntervalSeconds] The maximum amount of time + * to wait between retries for job step execution. Default value: 120 . + */ + maximumRetryIntervalSeconds?: number; + /** + * @member {number} [retryIntervalBackoffMultiplier] The backoff multiplier + * for the time between retries. Default value: 2 . + */ + retryIntervalBackoffMultiplier?: number; +} + +/** + * @interface + * An interface representing JobStep. + * A job step. + * + * @extends ProxyResource + */ +export interface JobStep extends ProxyResource { + /** + * @member {number} [stepId] 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. + */ + stepId?: number; + /** + * @member {string} targetGroup The resource ID of the target group that the + * job step will be executed on. + */ + targetGroup: string; + /** + * @member {string} credential The resource ID of the job credential that + * will be used to connect to the targets. + */ + credential: string; + /** + * @member {JobStepAction} action The action payload of the job step. + */ + action: JobStepAction; + /** + * @member {JobStepOutput} [output] Output destination properties of the job + * step. + */ + output?: JobStepOutput; + /** + * @member {JobStepExecutionOptions} [executionOptions] Execution options for + * the job step. + */ + executionOptions?: JobStepExecutionOptions; +} + +/** + * @interface + * An interface representing JobTarget. + * A job target, for example a specific database or a container of databases + * that is evaluated during job execution. + * + */ +export interface JobTarget { + /** + * @member {JobTargetGroupMembershipType} [membershipType] Whether the target + * is included or excluded from the group. Possible values include: + * 'Include', 'Exclude'. Default value: 'Include' . + */ + membershipType?: JobTargetGroupMembershipType; + /** + * @member {JobTargetType} type The target type. Possible values include: + * 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + */ + type: JobTargetType; + /** + * @member {string} [serverName] The target server name. + */ + serverName?: string; + /** + * @member {string} [databaseName] The target database name. + */ + databaseName?: string; + /** + * @member {string} [elasticPoolName] The target elastic pool name. + */ + elasticPoolName?: string; + /** + * @member {string} [shardMapName] The target shard map. + */ + shardMapName?: string; + /** + * @member {string} [refreshCredential] 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. + */ + refreshCredential?: string; +} + +/** + * @interface + * An interface representing JobTargetGroup. + * A group of job targets. + * + * @extends ProxyResource + */ +export interface JobTargetGroup extends ProxyResource { + /** + * @member {JobTarget[]} members Members of the target group. + */ + members: JobTarget[]; +} + +/** + * @interface + * An interface representing JobVersion. + * A job version. + * + * @extends ProxyResource + */ +export interface JobVersion extends ProxyResource { +} + +/** + * @interface + * An interface representing LongTermRetentionBackup. + * A long term retention backup. + * + * @extends ProxyResource + */ +export interface LongTermRetentionBackup extends ProxyResource { + /** + * @member {string} [serverName] The server name that the backup database + * belong to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverName?: string; + /** + * @member {Date} [serverCreateTime] The create time of the server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverCreateTime?: Date; + /** + * @member {string} [databaseName] The name of the database the backup belong + * to + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {Date} [databaseDeletionTime] The delete time of the database + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseDeletionTime?: Date; + /** + * @member {Date} [backupTime] The time the backup was taken + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly backupTime?: Date; + /** + * @member {Date} [backupExpirationTime] The time the long term retention + * backup will expire. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly backupExpirationTime?: Date; +} + +/** + * @interface + * An interface representing BackupLongTermRetentionPolicy. + * A long term retention policy. + * + * @extends ProxyResource + */ +export interface BackupLongTermRetentionPolicy extends ProxyResource { + /** + * @member {string} [weeklyRetention] The weekly retention policy for an LTR + * backup in an ISO 8601 format. + */ + weeklyRetention?: string; + /** + * @member {string} [monthlyRetention] The monthly retention policy for an + * LTR backup in an ISO 8601 format. + */ + monthlyRetention?: string; + /** + * @member {string} [yearlyRetention] The yearly retention policy for an LTR + * backup in an ISO 8601 format. + */ + yearlyRetention?: string; + /** + * @member {number} [weekOfYear] The week of year to take the yearly backup + * in an ISO 8601 format. + */ + weekOfYear?: number; +} + +/** + * @interface + * An interface representing ManagedBackupShortTermRetentionPolicy. + * A short term retention policy. + * + * @extends ProxyResource + */ +export interface ManagedBackupShortTermRetentionPolicy extends ProxyResource { + /** + * @member {number} [retentionDays] The backup retention period in days. This + * is how many days Point-in-Time Restore will be supported. + */ + retentionDays?: number; +} + +/** + * @interface + * An interface representing CompleteDatabaseRestoreDefinition. + * Contains the information necessary to perform a complete database restore + * operation. + * + */ +export interface CompleteDatabaseRestoreDefinition { + /** + * @member {string} lastBackupName The last backup name to apply + */ + lastBackupName: string; +} + +/** + * @interface + * An interface representing ManagedDatabase. + * A managed database resource. + * + * @extends TrackedResource + */ +export interface ManagedDatabase extends TrackedResource { + /** + * @member {string} [collation] Collation of the managed database. + */ + collation?: string; + /** + * @member {ManagedDatabaseStatus} [status] Status of the database. Possible + * values include: 'Online', 'Offline', 'Shutdown', 'Creating', + * 'Inaccessible', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: ManagedDatabaseStatus; + /** + * @member {Date} [creationDate] Creation date of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationDate?: Date; + /** + * @member {Date} [earliestRestorePoint] Earliest restore point in time for + * point in time restore. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly earliestRestorePoint?: Date; + /** + * @member {Date} [restorePointInTime] 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. + */ + restorePointInTime?: Date; + /** + * @member {string} [defaultSecondaryLocation] Geo paired region. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly defaultSecondaryLocation?: string; + /** + * @member {CatalogCollationType} [catalogCollation] Collation of the + * metadata catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + */ + catalogCollation?: CatalogCollationType; + /** + * @member {ManagedDatabaseCreateMode} [createMode] 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. Possible values include: 'Default', + * 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' + */ + createMode?: ManagedDatabaseCreateMode; + /** + * @member {string} [storageContainerUri] Conditional. If createMode is + * RestoreExternalBackup, this value is required. Specifies the uri of the + * storage container where backups for this restore are stored. + */ + storageContainerUri?: string; + /** + * @member {string} [sourceDatabaseId] The resource identifier of the source + * database associated with create operation of this database. + */ + sourceDatabaseId?: string; + /** + * @member {string} [restorableDroppedDatabaseId] The restorable dropped + * database resource id to restore when creating this database. + */ + restorableDroppedDatabaseId?: string; + /** + * @member {string} [storageContainerSasToken] Conditional. If createMode is + * RestoreExternalBackup, this value is required. Specifies the storage + * container sas token. + */ + storageContainerSasToken?: string; + /** + * @member {string} [failoverGroupId] Instance Failover Group resource + * identifier that this managed database belongs to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly failoverGroupId?: string; + /** + * @member {string} [recoverableDatabaseId] The resource identifier of the + * recoverable database associated with create operation of this database. + */ + recoverableDatabaseId?: string; +} + +/** + * @interface + * An interface representing ManagedDatabaseUpdate. + * An managed database update. + * + */ +export interface ManagedDatabaseUpdate { + /** + * @member {string} [collation] Collation of the managed database. + */ + collation?: string; + /** + * @member {ManagedDatabaseStatus} [status] Status of the database. Possible + * values include: 'Online', 'Offline', 'Shutdown', 'Creating', + * 'Inaccessible', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: ManagedDatabaseStatus; + /** + * @member {Date} [creationDate] Creation date of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationDate?: Date; + /** + * @member {Date} [earliestRestorePoint] Earliest restore point in time for + * point in time restore. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly earliestRestorePoint?: Date; + /** + * @member {Date} [restorePointInTime] 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. + */ + restorePointInTime?: Date; + /** + * @member {string} [defaultSecondaryLocation] Geo paired region. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly defaultSecondaryLocation?: string; + /** + * @member {CatalogCollationType} [catalogCollation] Collation of the + * metadata catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + */ + catalogCollation?: CatalogCollationType; + /** + * @member {ManagedDatabaseCreateMode} [createMode] 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. Possible values include: 'Default', + * 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' + */ + createMode?: ManagedDatabaseCreateMode; + /** + * @member {string} [storageContainerUri] Conditional. If createMode is + * RestoreExternalBackup, this value is required. Specifies the uri of the + * storage container where backups for this restore are stored. + */ + storageContainerUri?: string; + /** + * @member {string} [sourceDatabaseId] The resource identifier of the source + * database associated with create operation of this database. + */ + sourceDatabaseId?: string; + /** + * @member {string} [restorableDroppedDatabaseId] The restorable dropped + * database resource id to restore when creating this database. + */ + restorableDroppedDatabaseId?: string; + /** + * @member {string} [storageContainerSasToken] Conditional. If createMode is + * RestoreExternalBackup, this value is required. Specifies the storage + * container sas token. + */ + storageContainerSasToken?: string; + /** + * @member {string} [failoverGroupId] Instance Failover Group resource + * identifier that this managed database belongs to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly failoverGroupId?: string; + /** + * @member {string} [recoverableDatabaseId] The resource identifier of the + * recoverable database associated with create operation of this database. + */ + recoverableDatabaseId?: string; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing AutomaticTuningServerOptions. + * Automatic tuning properties for individual advisors. + * + */ +export interface AutomaticTuningServerOptions { + /** + * @member {AutomaticTuningOptionModeDesired} [desiredState] Automatic tuning + * option desired state. Possible values include: 'Off', 'On', 'Default' + */ + desiredState?: AutomaticTuningOptionModeDesired; + /** + * @member {AutomaticTuningOptionModeActual} [actualState] Automatic tuning + * option actual state. Possible values include: 'Off', 'On' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly actualState?: AutomaticTuningOptionModeActual; + /** + * @member {number} [reasonCode] Reason code if desired and actual state are + * different. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly reasonCode?: number; + /** + * @member {AutomaticTuningServerReason} [reasonDesc] Reason description if + * desired and actual state are different. Possible values include: + * 'Default', 'Disabled', 'AutoConfigured' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly reasonDesc?: AutomaticTuningServerReason; +} + +/** + * @interface + * An interface representing ServerAutomaticTuning. + * Server-level Automatic Tuning. + * + * @extends ProxyResource + */ +export interface ServerAutomaticTuning extends ProxyResource { + /** + * @member {AutomaticTuningServerMode} [desiredState] Automatic tuning + * desired state. Possible values include: 'Custom', 'Auto', 'Unspecified' + */ + desiredState?: AutomaticTuningServerMode; + /** + * @member {AutomaticTuningServerMode} [actualState] Automatic tuning actual + * state. Possible values include: 'Custom', 'Auto', 'Unspecified' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly actualState?: AutomaticTuningServerMode; + /** + * @member {{ [propertyName: string]: AutomaticTuningServerOptions }} + * [options] Automatic tuning options definition. + */ + options?: { [propertyName: string]: AutomaticTuningServerOptions }; +} + +/** + * @interface + * An interface representing ServerDnsAlias. + * A server DNS alias. + * + * @extends ProxyResource + */ +export interface ServerDnsAlias extends ProxyResource { + /** + * @member {string} [azureDnsRecord] The fully qualified DNS record for alias + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly azureDnsRecord?: string; +} + +/** + * @interface + * An interface representing ServerDnsAliasAcquisition. + * A server DNS alias acquisition request. + * + */ +export interface ServerDnsAliasAcquisition { + /** + * @member {string} [oldServerDnsAliasId] The id of the server alias that + * will be acquired to point to this server instead. + */ + oldServerDnsAliasId?: string; +} + +/** + * @interface + * An interface representing ServerSecurityAlertPolicy. + * A server security alert policy. + * + * @extends ProxyResource + */ +export interface ServerSecurityAlertPolicy extends ProxyResource { + /** + * @member {SecurityAlertPolicyState} state Specifies the state of the + * policy, whether it is enabled or disabled or a policy has not been applied + * yet on the specific database. Possible values include: 'New', 'Enabled', + * 'Disabled' + */ + state: SecurityAlertPolicyState; + /** + * @member {string[]} [disabledAlerts] Specifies an array of alerts that are + * disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + * Access_Anomaly, Data_Exfiltration, Unsafe_Action + */ + disabledAlerts?: string[]; + /** + * @member {string[]} [emailAddresses] Specifies an array of e-mail addresses + * to which the alert is sent. + */ + emailAddresses?: string[]; + /** + * @member {boolean} [emailAccountAdmins] Specifies that the alert is sent to + * the account administrators. + */ + emailAccountAdmins?: boolean; + /** + * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * (e.g. https://MyAccount.blob.core.windows.net). This blob storage will + * hold all Threat Detection audit logs. + */ + storageEndpoint?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the Threat Detection audit storage account. + */ + storageAccountAccessKey?: string; + /** + * @member {number} [retentionDays] Specifies the number of days to keep in + * the Threat Detection audit logs. + */ + retentionDays?: number; + /** + * @member {Date} [creationTime] Specifies the UTC creation time of the + * policy. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationTime?: Date; +} + +/** + * @interface + * An interface representing RestorableDroppedManagedDatabase. + * A restorable dropped managed database resource. + * + * @extends TrackedResource + */ +export interface RestorableDroppedManagedDatabase extends TrackedResource { + /** + * @member {string} [databaseName] The name of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {Date} [creationDate] The creation date of the database (ISO8601 + * format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationDate?: Date; + /** + * @member {Date} [deletionDate] The deletion date of the database (ISO8601 + * format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly deletionDate?: Date; + /** + * @member {Date} [earliestRestoreDate] The earliest restore date of the + * database (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly earliestRestoreDate?: Date; +} + +/** + * @interface + * An interface representing RestorePoint. + * Database restore points. + * + * @extends ProxyResource + */ +export interface RestorePoint extends ProxyResource { + /** + * @member {string} [location] Resource location. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {RestorePointType} [restorePointType] The type of restore point. + * Possible values include: 'CONTINUOUS', 'DISCRETE' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly restorePointType?: RestorePointType; + /** + * @member {Date} [earliestRestoreDate] The earliest time to which this + * database can be restored + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly earliestRestoreDate?: Date; + /** + * @member {Date} [restorePointCreationDate] The time the backup was taken + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly restorePointCreationDate?: Date; + /** + * @member {string} [restorePointLabel] The label of restore point for backup + * request by user + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly restorePointLabel?: string; +} + +/** + * @interface + * An interface representing CreateDatabaseRestorePointDefinition. + * Contains the information necessary to perform a create database restore + * point operation. + * + */ +export interface CreateDatabaseRestorePointDefinition { + /** + * @member {string} restorePointLabel The restore point label to apply + */ + restorePointLabel: string; +} + +/** + * @interface + * An interface representing ManagedDatabaseSecurityAlertPolicy. + * A managed database security alert policy. + * + * @extends ProxyResource + */ +export interface ManagedDatabaseSecurityAlertPolicy extends ProxyResource { + /** + * @member {SecurityAlertPolicyState} state Specifies the state of the + * policy, whether it is enabled or disabled or a policy has not been applied + * yet on the specific database. Possible values include: 'New', 'Enabled', + * 'Disabled' + */ + state: SecurityAlertPolicyState; + /** + * @member {string[]} [disabledAlerts] Specifies an array of alerts that are + * disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + * Access_Anomaly, Data_Exfiltration, Unsafe_Action + */ + disabledAlerts?: string[]; + /** + * @member {string[]} [emailAddresses] Specifies an array of e-mail addresses + * to which the alert is sent. + */ + emailAddresses?: string[]; + /** + * @member {boolean} [emailAccountAdmins] Specifies that the alert is sent to + * the account administrators. + */ + emailAccountAdmins?: boolean; + /** + * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * (e.g. https://MyAccount.blob.core.windows.net). This blob storage will + * hold all Threat Detection audit logs. + */ + storageEndpoint?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the Threat Detection audit storage account. + */ + storageAccountAccessKey?: string; + /** + * @member {number} [retentionDays] Specifies the number of days to keep in + * the Threat Detection audit logs. + */ + retentionDays?: number; + /** + * @member {Date} [creationTime] Specifies the UTC creation time of the + * policy. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationTime?: Date; +} + +/** + * @interface + * An interface representing ManagedServerSecurityAlertPolicy. + * A managed server security alert policy. + * + * @extends ProxyResource + */ +export interface ManagedServerSecurityAlertPolicy extends ProxyResource { + /** + * @member {SecurityAlertPolicyState} state Specifies the state of the + * policy, whether it is enabled or disabled or a policy has not been applied + * yet on the specific database. Possible values include: 'New', 'Enabled', + * 'Disabled' + */ + state: SecurityAlertPolicyState; + /** + * @member {string[]} [disabledAlerts] Specifies an array of alerts that are + * disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + * Access_Anomaly, Data_Exfiltration, Unsafe_Action + */ + disabledAlerts?: string[]; + /** + * @member {string[]} [emailAddresses] Specifies an array of e-mail addresses + * to which the alert is sent. + */ + emailAddresses?: string[]; + /** + * @member {boolean} [emailAccountAdmins] Specifies that the alert is sent to + * the account administrators. + */ + emailAccountAdmins?: boolean; + /** + * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * (e.g. https://MyAccount.blob.core.windows.net). This blob storage will + * hold all Threat Detection audit logs. + */ + storageEndpoint?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the Threat Detection audit storage account. + */ + storageAccountAccessKey?: string; + /** + * @member {number} [retentionDays] Specifies the number of days to keep in + * the Threat Detection audit logs. + */ + retentionDays?: number; + /** + * @member {Date} [creationTime] Specifies the UTC creation time of the + * policy. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationTime?: Date; +} + +/** + * @interface + * An interface representing SensitivityLabel. + * A sensitivity label. + * + * @extends ProxyResource + */ +export interface SensitivityLabel extends ProxyResource { + /** + * @member {string} [labelName] The label name. + */ + labelName?: string; + /** + * @member {string} [labelId] The label ID. + */ + labelId?: string; + /** + * @member {string} [informationType] The information type. + */ + informationType?: string; + /** + * @member {string} [informationTypeId] The information type ID. + */ + informationTypeId?: string; + /** + * @member {boolean} [isDisabled] Is sensitivity recommendation disabled. + * Applicable for recommended sensitivity label only. Specifies whether the + * sensitivity recommendation on this column is disabled (dismissed) or not. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isDisabled?: boolean; +} + +/** + * @interface + * An interface representing DatabaseOperation. + * A database operation. + * + * @extends ProxyResource + */ +export interface DatabaseOperation extends ProxyResource { + /** + * @member {string} [databaseName] The name of the database the operation is + * being performed on. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseName?: string; + /** + * @member {string} [operation] The name of operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operation?: string; + /** + * @member {string} [operationFriendlyName] The friendly name of operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operationFriendlyName?: string; + /** + * @member {number} [percentComplete] The percentage of the operation + * completed. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly percentComplete?: number; + /** + * @member {string} [serverName] The name of the server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverName?: string; + /** + * @member {Date} [startTime] The operation start time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startTime?: Date; + /** + * @member {ManagementOperationState} [state] The operation state. Possible + * values include: 'Pending', 'InProgress', 'Succeeded', 'Failed', + * 'CancelInProgress', 'Cancelled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: ManagementOperationState; + /** + * @member {number} [errorCode] The operation error code. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorCode?: number; + /** + * @member {string} [errorDescription] The operation error description. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorDescription?: string; + /** + * @member {number} [errorSeverity] The operation error severity. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorSeverity?: number; + /** + * @member {boolean} [isUserError] Whether or not the error is a user error. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isUserError?: boolean; + /** + * @member {Date} [estimatedCompletionTime] The estimated completion time of + * the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly estimatedCompletionTime?: Date; + /** + * @member {string} [description] The operation description. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; + /** + * @member {boolean} [isCancellable] Whether the operation can be cancelled. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isCancellable?: boolean; +} + +/** + * @interface + * An interface representing ElasticPoolOperation. + * A elastic pool operation. + * + * @extends ProxyResource + */ +export interface ElasticPoolOperation extends ProxyResource { + /** + * @member {string} [elasticPoolName] The name of the elastic pool the + * operation is being performed on. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly elasticPoolName?: string; + /** + * @member {string} [operation] The name of operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operation?: string; + /** + * @member {string} [operationFriendlyName] The friendly name of operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operationFriendlyName?: string; + /** + * @member {number} [percentComplete] The percentage of the operation + * completed. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly percentComplete?: number; + /** + * @member {string} [serverName] The name of the server. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serverName?: string; + /** + * @member {Date} [startTime] The operation start time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startTime?: Date; + /** + * @member {string} [state] The operation state. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: string; + /** + * @member {number} [errorCode] The operation error code. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorCode?: number; + /** + * @member {string} [errorDescription] The operation error description. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorDescription?: string; + /** + * @member {number} [errorSeverity] The operation error severity. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorSeverity?: number; + /** + * @member {boolean} [isUserError] Whether or not the error is a user error. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isUserError?: boolean; + /** + * @member {Date} [estimatedCompletionTime] The estimated completion time of + * the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly estimatedCompletionTime?: Date; + /** + * @member {string} [description] The operation description. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; + /** + * @member {boolean} [isCancellable] Whether the operation can be cancelled. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isCancellable?: boolean; +} + +/** + * @interface + * An interface representing MaxSizeCapability. + * The maximum size capability. + * + */ +export interface MaxSizeCapability { + /** + * @member {number} [limit] The maximum size limit (see 'unit' for the + * units). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly limit?: number; + /** + * @member {MaxSizeUnit} [unit] The units that the limit is expressed in. + * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', + * 'Petabytes' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: MaxSizeUnit; +} + +/** + * @interface + * An interface representing LogSizeCapability. + * The log size capability. + * + */ +export interface LogSizeCapability { + /** + * @member {number} [limit] The log size limit (see 'unit' for the units). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly limit?: number; + /** + * @member {LogSizeUnit} [unit] The units that the limit is expressed in. + * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', + * 'Petabytes', 'Percent' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: LogSizeUnit; +} + +/** + * @interface + * An interface representing MaxSizeRangeCapability. + * The maximum size range capability. + * + */ +export interface MaxSizeRangeCapability { + /** + * @member {MaxSizeCapability} [minValue] Minimum value. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly minValue?: MaxSizeCapability; + /** + * @member {MaxSizeCapability} [maxValue] Maximum value. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maxValue?: MaxSizeCapability; + /** + * @member {MaxSizeCapability} [scaleSize] Scale/step size for discrete + * values between the minimum value and the maximum value. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly scaleSize?: MaxSizeCapability; + /** + * @member {LogSizeCapability} [logSize] Size of transaction log. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly logSize?: LogSizeCapability; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing PerformanceLevelCapability. + * The performance level capability. + * + */ +export interface PerformanceLevelCapability { + /** + * @member {number} [value] Performance level value. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: number; + /** + * @member {PerformanceLevelUnit} [unit] Unit type used to measure + * performance level. Possible values include: 'DTU', 'VCores' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: PerformanceLevelUnit; +} + +/** + * @interface + * An interface representing LicenseTypeCapability. + * The license type capability + * + */ +export interface LicenseTypeCapability { + /** + * @member {string} [name] License type identifier. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing ServiceObjectiveCapability. + * The service objectives capability. + * + */ +export interface ServiceObjectiveCapability { + /** + * @member {string} [id] The unique ID of the service objective. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The service objective name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {MaxSizeRangeCapability[]} [supportedMaxSizes] The list of + * supported maximum database sizes. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedMaxSizes?: MaxSizeRangeCapability[]; + /** + * @member {PerformanceLevelCapability} [performanceLevel] The performance + * level. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly performanceLevel?: PerformanceLevelCapability; + /** + * @member {Sku} [sku] The sku. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sku?: Sku; + /** + * @member {LicenseTypeCapability[]} [supportedLicenseTypes] List of + * supported license types. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedLicenseTypes?: LicenseTypeCapability[]; + /** + * @member {MaxSizeCapability} [includedMaxSize] The included (free) max + * size. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly includedMaxSize?: MaxSizeCapability; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing EditionCapability. + * The edition capability. + * + */ +export interface EditionCapability { + /** + * @member {string} [name] The database edition name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {ServiceObjectiveCapability[]} [supportedServiceLevelObjectives] + * The list of supported service objectives for the edition. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedServiceLevelObjectives?: ServiceObjectiveCapability[]; + /** + * @member {boolean} [zoneRedundant] Whether or not zone redundancy is + * supported for the edition. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly zoneRedundant?: boolean; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing ElasticPoolPerDatabaseMinPerformanceLevelCapability. + * The minimum per-database performance level capability. + * + */ +export interface ElasticPoolPerDatabaseMinPerformanceLevelCapability { + /** + * @member {number} [limit] The minimum performance level per database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly limit?: number; + /** + * @member {PerformanceLevelUnit} [unit] Unit type used to measure + * performance level. Possible values include: 'DTU', 'VCores' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: PerformanceLevelUnit; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing ElasticPoolPerDatabaseMaxPerformanceLevelCapability. + * The max per-database performance level capability. + * + */ +export interface ElasticPoolPerDatabaseMaxPerformanceLevelCapability { + /** + * @member {number} [limit] The maximum performance level per database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly limit?: number; + /** + * @member {PerformanceLevelUnit} [unit] Unit type used to measure + * performance level. Possible values include: 'DTU', 'VCores' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: PerformanceLevelUnit; + /** + * @member {ElasticPoolPerDatabaseMinPerformanceLevelCapability[]} + * [supportedPerDatabaseMinPerformanceLevels] The list of supported min + * database performance levels. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedPerDatabaseMinPerformanceLevels?: ElasticPoolPerDatabaseMinPerformanceLevelCapability[]; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing ElasticPoolPerformanceLevelCapability. + * The Elastic Pool performance level capability. + * + */ +export interface ElasticPoolPerformanceLevelCapability { + /** + * @member {PerformanceLevelCapability} [performanceLevel] The performance + * level for the pool. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly performanceLevel?: PerformanceLevelCapability; + /** + * @member {Sku} [sku] The sku. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sku?: Sku; + /** + * @member {LicenseTypeCapability[]} [supportedLicenseTypes] List of + * supported license types. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedLicenseTypes?: LicenseTypeCapability[]; + /** + * @member {number} [maxDatabaseCount] The maximum number of databases + * supported. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maxDatabaseCount?: number; + /** + * @member {MaxSizeCapability} [includedMaxSize] The included (free) max size + * for this performance level. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly includedMaxSize?: MaxSizeCapability; + /** + * @member {MaxSizeRangeCapability[]} [supportedMaxSizes] The list of + * supported max sizes. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedMaxSizes?: MaxSizeRangeCapability[]; + /** + * @member {MaxSizeRangeCapability[]} [supportedPerDatabaseMaxSizes] The list + * of supported per database max sizes. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedPerDatabaseMaxSizes?: MaxSizeRangeCapability[]; + /** + * @member {ElasticPoolPerDatabaseMaxPerformanceLevelCapability[]} + * [supportedPerDatabaseMaxPerformanceLevels] The list of supported per + * database max performance levels. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedPerDatabaseMaxPerformanceLevels?: ElasticPoolPerDatabaseMaxPerformanceLevelCapability[]; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing ElasticPoolEditionCapability. + * The elastic pool edition capability. + * + */ +export interface ElasticPoolEditionCapability { + /** + * @member {string} [name] The elastic pool edition name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {ElasticPoolPerformanceLevelCapability[]} + * [supportedElasticPoolPerformanceLevels] The list of supported elastic pool + * DTU levels for the edition. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedElasticPoolPerformanceLevels?: ElasticPoolPerformanceLevelCapability[]; + /** + * @member {boolean} [zoneRedundant] Whether or not zone redundancy is + * supported for the edition. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly zoneRedundant?: boolean; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing ServerVersionCapability. + * The server capability + * + */ +export interface ServerVersionCapability { + /** + * @member {string} [name] The server version name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {EditionCapability[]} [supportedEditions] The list of supported + * database editions. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedEditions?: EditionCapability[]; + /** + * @member {ElasticPoolEditionCapability[]} [supportedElasticPoolEditions] + * The list of supported elastic pool editions. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedElasticPoolEditions?: ElasticPoolEditionCapability[]; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing ManagedInstanceVcoresCapability. + * The managed instance virtual cores capability. + * + */ +export interface ManagedInstanceVcoresCapability { + /** + * @member {string} [name] The virtual cores identifier. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {number} [value] The virtual cores value. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: number; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing ManagedInstanceFamilyCapability. + * The managed server family capability. + * + */ +export interface ManagedInstanceFamilyCapability { + /** + * @member {string} [name] Family name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [sku] SKU name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly sku?: string; + /** + * @member {LicenseTypeCapability[]} [supportedLicenseTypes] List of + * supported license types. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedLicenseTypes?: LicenseTypeCapability[]; + /** + * @member {ManagedInstanceVcoresCapability[]} [supportedVcoresValues] List + * of supported virtual cores values. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedVcoresValues?: ManagedInstanceVcoresCapability[]; + /** + * @member {MaxSizeCapability} [includedMaxSize] Included size. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly includedMaxSize?: MaxSizeCapability; + /** + * @member {MaxSizeRangeCapability[]} [supportedStorageSizes] Storage size + * ranges. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedStorageSizes?: MaxSizeRangeCapability[]; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing ManagedInstanceEditionCapability. + * The managed server capability + * + */ +export interface ManagedInstanceEditionCapability { + /** + * @member {string} [name] The managed server version name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {ManagedInstanceFamilyCapability[]} [supportedFamilies] The + * supported families. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedFamilies?: ManagedInstanceFamilyCapability[]; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing ManagedInstanceVersionCapability. + * The managed instance capability + * + */ +export interface ManagedInstanceVersionCapability { + /** + * @member {string} [name] The server version name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {ManagedInstanceEditionCapability[]} [supportedEditions] The list + * of supported managed instance editions. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedEditions?: ManagedInstanceEditionCapability[]; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing LocationCapabilities. + * The location capability. + * + */ +export interface LocationCapabilities { + /** + * @member {string} [name] The location name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {ServerVersionCapability[]} [supportedServerVersions] The list of + * supported server versions. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedServerVersions?: ServerVersionCapability[]; + /** + * @member {ManagedInstanceVersionCapability[]} + * [supportedManagedInstanceVersions] The list of supported managed instance + * versions. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly supportedManagedInstanceVersions?: ManagedInstanceVersionCapability[]; + /** + * @member {CapabilityStatus} [status] The status of the capability. Possible + * values include: 'Visible', 'Available', 'Default', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: CapabilityStatus; + /** + * @member {string} [reason] The reason for the capability not being + * available. + */ + reason?: string; +} + +/** + * @interface + * An interface representing Database. + * A database resource. + * + * @extends TrackedResource + */ +export interface Database extends TrackedResource { + /** + * @member {Sku} [sku] The name and tier of the SKU. + */ + sku?: Sku; + /** + * @member {string} [kind] Kind of database. This is metadata used for the + * Azure portal experience. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {string} [managedBy] Resource that manages the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly managedBy?: string; + /** + * @member {CreateMode} [createMode] Specifies the mode of database creation. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. + * sourceDatabaseId must be specified as the resource ID of the source + * database. + * + * Secondary: creates a database as a secondary replica of an existing + * database. sourceDatabaseId must be specified as the resource ID of the + * existing primary database. + * + * PointInTimeRestore: 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. + * + * Recovery: Creates a database by restoring a geo-replicated backup. + * sourceDatabaseId must be specified as the recoverable database resource ID + * to restore. + * + * Restore: 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. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a + * long term retention vault. recoveryServicesRecoveryPointResourceId must be + * specified as the recovery point resource ID. + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + * DataWarehouse edition. Possible values include: 'Default', 'Copy', + * 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + * 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + * 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + */ + createMode?: CreateMode; + /** + * @member {string} [collation] The collation of the database. + */ + collation?: string; + /** + * @member {number} [maxSizeBytes] The max size of the database expressed in + * bytes. + */ + maxSizeBytes?: number; + /** + * @member {SampleName} [sampleName] The name of the sample schema to apply + * when creating this database. Possible values include: 'AdventureWorksLT', + * 'WideWorldImportersStd', 'WideWorldImportersFull' + */ + sampleName?: SampleName; + /** + * @member {string} [elasticPoolId] The resource identifier of the elastic + * pool containing this database. + */ + elasticPoolId?: string; + /** + * @member {string} [sourceDatabaseId] The resource identifier of the source + * database associated with create operation of this database. + */ + sourceDatabaseId?: string; + /** + * @member {DatabaseStatus} [status] The status of the database. Possible + * values include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', + * 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', + * 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', + * 'Pausing', 'Paused', 'Resuming', 'Scaling' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: DatabaseStatus; + /** + * @member {string} [databaseId] The ID of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseId?: string; + /** + * @member {Date} [creationDate] The creation date of the database (ISO8601 + * format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationDate?: Date; + /** + * @member {string} [currentServiceObjectiveName] The current service level + * objective name of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentServiceObjectiveName?: string; + /** + * @member {string} [requestedServiceObjectiveName] The requested service + * level objective name of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedServiceObjectiveName?: string; + /** + * @member {string} [defaultSecondaryLocation] The default secondary region + * for this database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly defaultSecondaryLocation?: string; + /** + * @member {string} [failoverGroupId] Failover Group resource identifier that + * this database belongs to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly failoverGroupId?: string; + /** + * @member {Date} [restorePointInTime] Specifies the point in time (ISO8601 + * format) of the source database that will be restored to create the new + * database. + */ + restorePointInTime?: Date; + /** + * @member {Date} [sourceDatabaseDeletionDate] Specifies the time that the + * database was deleted. + */ + sourceDatabaseDeletionDate?: Date; + /** + * @member {string} [recoveryServicesRecoveryPointId] The resource identifier + * of the recovery point associated with create operation of this database. + */ + recoveryServicesRecoveryPointId?: string; + /** + * @member {string} [longTermRetentionBackupResourceId] The resource + * identifier of the long term retention backup associated with create + * operation of this database. + */ + longTermRetentionBackupResourceId?: string; + /** + * @member {string} [recoverableDatabaseId] The resource identifier of the + * recoverable database associated with create operation of this database. + */ + recoverableDatabaseId?: string; + /** + * @member {string} [restorableDroppedDatabaseId] The resource identifier of + * the restorable dropped database associated with create operation of this + * database. + */ + restorableDroppedDatabaseId?: string; + /** + * @member {CatalogCollationType} [catalogCollation] Collation of the + * metadata catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + */ + catalogCollation?: CatalogCollationType; + /** + * @member {boolean} [zoneRedundant] Whether or not this database is zone + * redundant, which means the replicas of this database will be spread across + * multiple availability zones. + */ + zoneRedundant?: boolean; + /** + * @member {DatabaseLicenseType} [licenseType] The license type to apply for + * this database. Possible values include: 'LicenseIncluded', 'BasePrice' + */ + licenseType?: DatabaseLicenseType; + /** + * @member {number} [maxLogSizeBytes] The max log size for this database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maxLogSizeBytes?: number; + /** + * @member {Date} [earliestRestoreDate] This records the earliest start date + * and time that restore is available for this database (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly earliestRestoreDate?: Date; + /** + * @member {DatabaseReadScale} [readScale] 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. Possible values include: 'Enabled', 'Disabled' + */ + readScale?: DatabaseReadScale; + /** + * @member {Sku} [currentSku] The name and tier of the SKU. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentSku?: Sku; +} + +/** + * @interface + * An interface representing DatabaseUpdate. + * A database resource. + * + */ +export interface DatabaseUpdate { + /** + * @member {Sku} [sku] The name and tier of the SKU. + */ + sku?: Sku; + /** + * @member {CreateMode} [createMode] Specifies the mode of database creation. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. + * sourceDatabaseId must be specified as the resource ID of the source + * database. + * + * Secondary: creates a database as a secondary replica of an existing + * database. sourceDatabaseId must be specified as the resource ID of the + * existing primary database. + * + * PointInTimeRestore: 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. + * + * Recovery: Creates a database by restoring a geo-replicated backup. + * sourceDatabaseId must be specified as the recoverable database resource ID + * to restore. + * + * Restore: 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. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a + * long term retention vault. recoveryServicesRecoveryPointResourceId must be + * specified as the recovery point resource ID. + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for + * DataWarehouse edition. Possible values include: 'Default', 'Copy', + * 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', + * 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + * 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + */ + createMode?: CreateMode; + /** + * @member {string} [collation] The collation of the database. + */ + collation?: string; + /** + * @member {number} [maxSizeBytes] The max size of the database expressed in + * bytes. + */ + maxSizeBytes?: number; + /** + * @member {SampleName} [sampleName] The name of the sample schema to apply + * when creating this database. Possible values include: 'AdventureWorksLT', + * 'WideWorldImportersStd', 'WideWorldImportersFull' + */ + sampleName?: SampleName; + /** + * @member {string} [elasticPoolId] The resource identifier of the elastic + * pool containing this database. + */ + elasticPoolId?: string; + /** + * @member {string} [sourceDatabaseId] The resource identifier of the source + * database associated with create operation of this database. + */ + sourceDatabaseId?: string; + /** + * @member {DatabaseStatus} [status] The status of the database. Possible + * values include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', + * 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', + * 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', + * 'Pausing', 'Paused', 'Resuming', 'Scaling' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: DatabaseStatus; + /** + * @member {string} [databaseId] The ID of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly databaseId?: string; + /** + * @member {Date} [creationDate] The creation date of the database (ISO8601 + * format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationDate?: Date; + /** + * @member {string} [currentServiceObjectiveName] The current service level + * objective name of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentServiceObjectiveName?: string; + /** + * @member {string} [requestedServiceObjectiveName] The requested service + * level objective name of the database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly requestedServiceObjectiveName?: string; + /** + * @member {string} [defaultSecondaryLocation] The default secondary region + * for this database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly defaultSecondaryLocation?: string; + /** + * @member {string} [failoverGroupId] Failover Group resource identifier that + * this database belongs to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly failoverGroupId?: string; + /** + * @member {Date} [restorePointInTime] Specifies the point in time (ISO8601 + * format) of the source database that will be restored to create the new + * database. + */ + restorePointInTime?: Date; + /** + * @member {Date} [sourceDatabaseDeletionDate] Specifies the time that the + * database was deleted. + */ + sourceDatabaseDeletionDate?: Date; + /** + * @member {string} [recoveryServicesRecoveryPointId] The resource identifier + * of the recovery point associated with create operation of this database. + */ + recoveryServicesRecoveryPointId?: string; + /** + * @member {string} [longTermRetentionBackupResourceId] The resource + * identifier of the long term retention backup associated with create + * operation of this database. + */ + longTermRetentionBackupResourceId?: string; + /** + * @member {string} [recoverableDatabaseId] The resource identifier of the + * recoverable database associated with create operation of this database. + */ + recoverableDatabaseId?: string; + /** + * @member {string} [restorableDroppedDatabaseId] The resource identifier of + * the restorable dropped database associated with create operation of this + * database. + */ + restorableDroppedDatabaseId?: string; + /** + * @member {CatalogCollationType} [catalogCollation] Collation of the + * metadata catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + */ + catalogCollation?: CatalogCollationType; + /** + * @member {boolean} [zoneRedundant] Whether or not this database is zone + * redundant, which means the replicas of this database will be spread across + * multiple availability zones. + */ + zoneRedundant?: boolean; + /** + * @member {DatabaseLicenseType} [licenseType] The license type to apply for + * this database. Possible values include: 'LicenseIncluded', 'BasePrice' + */ + licenseType?: DatabaseLicenseType; + /** + * @member {number} [maxLogSizeBytes] The max log size for this database. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly maxLogSizeBytes?: number; + /** + * @member {Date} [earliestRestoreDate] This records the earliest start date + * and time that restore is available for this database (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly earliestRestoreDate?: Date; + /** + * @member {DatabaseReadScale} [readScale] 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. Possible values include: 'Enabled', 'Disabled' + */ + readScale?: DatabaseReadScale; + /** + * @member {Sku} [currentSku] The name and tier of the SKU. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentSku?: Sku; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing ResourceMoveDefinition. + * Contains the information necessary to perform a resource move (rename). + * + */ +export interface ResourceMoveDefinition { + /** + * @member {string} id The target ID for the resource + */ + id: string; +} + +/** + * @interface + * An interface representing ElasticPoolPerDatabaseSettings. + * Per database settings of an elastic pool. + * + */ +export interface ElasticPoolPerDatabaseSettings { + /** + * @member {number} [minCapacity] The minimum capacity all databases are + * guaranteed. + */ + minCapacity?: number; + /** + * @member {number} [maxCapacity] The maximum capacity any one database can + * consume. + */ + maxCapacity?: number; +} + +/** + * @interface + * An interface representing ElasticPool. + * An elastic pool. + * + * @extends TrackedResource + */ +export interface ElasticPool extends TrackedResource { + /** + * @member {Sku} [sku] + */ + sku?: Sku; + /** + * @member {string} [kind] Kind of elastic pool. This is metadata used for + * the Azure portal experience. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {ElasticPoolState} [state] The state of the elastic pool. Possible + * values include: 'Creating', 'Ready', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: ElasticPoolState; + /** + * @member {Date} [creationDate] The creation date of the elastic pool + * (ISO8601 format). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationDate?: Date; + /** + * @member {number} [maxSizeBytes] The storage limit for the database elastic + * pool in bytes. + */ + maxSizeBytes?: number; + /** + * @member {ElasticPoolPerDatabaseSettings} [perDatabaseSettings] The per + * database settings for the elastic pool. + */ + perDatabaseSettings?: ElasticPoolPerDatabaseSettings; + /** + * @member {boolean} [zoneRedundant] Whether or not this elastic pool is zone + * redundant, which means the replicas of this elastic pool will be spread + * across multiple availability zones. + */ + zoneRedundant?: boolean; + /** + * @member {ElasticPoolLicenseType} [licenseType] The license type to apply + * for this elastic pool. Possible values include: 'LicenseIncluded', + * 'BasePrice' + */ + licenseType?: ElasticPoolLicenseType; +} + +/** + * @interface + * An interface representing ElasticPoolUpdate. + * An elastic pool update. + * + */ +export interface ElasticPoolUpdate { + /** + * @member {Sku} [sku] + */ + sku?: Sku; + /** + * @member {number} [maxSizeBytes] The storage limit for the database elastic + * pool in bytes. + */ + maxSizeBytes?: number; + /** + * @member {ElasticPoolPerDatabaseSettings} [perDatabaseSettings] The per + * database settings for the elastic pool. + */ + perDatabaseSettings?: ElasticPoolPerDatabaseSettings; + /** + * @member {boolean} [zoneRedundant] Whether or not this elastic pool is zone + * redundant, which means the replicas of this elastic pool will be spread + * across multiple availability zones. + */ + zoneRedundant?: boolean; + /** + * @member {ElasticPoolLicenseType} [licenseType] The license type to apply + * for this elastic pool. Possible values include: 'LicenseIncluded', + * 'BasePrice' + */ + licenseType?: ElasticPoolLicenseType; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing VulnerabilityAssessmentScanError. + * Properties of a vulnerability assessment scan error. + * + */ +export interface VulnerabilityAssessmentScanError { + /** + * @member {string} [code] The error code. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly code?: string; + /** + * @member {string} [message] The error message. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; +} + +/** + * @interface + * An interface representing VulnerabilityAssessmentScanRecord. + * A vulnerability assessment scan record. + * + * @extends ProxyResource + */ +export interface VulnerabilityAssessmentScanRecord extends ProxyResource { + /** + * @member {string} [scanId] The scan ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly scanId?: string; + /** + * @member {VulnerabilityAssessmentScanTriggerType} [triggerType] The scan + * trigger type. Possible values include: 'OnDemand', 'Recurring' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly triggerType?: VulnerabilityAssessmentScanTriggerType; + /** + * @member {VulnerabilityAssessmentScanState} [state] The scan status. + * Possible values include: 'Passed', 'Failed', 'FailedToRun', 'InProgress' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: VulnerabilityAssessmentScanState; + /** + * @member {Date} [startTime] The scan start time (UTC). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startTime?: Date; + /** + * @member {Date} [endTime] The scan end time (UTC). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endTime?: Date; + /** + * @member {VulnerabilityAssessmentScanError[]} [errors] The scan errors. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errors?: VulnerabilityAssessmentScanError[]; + /** + * @member {string} [storageContainerPath] The scan results storage container + * path. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly storageContainerPath?: string; + /** + * @member {number} [numberOfFailedSecurityChecks] The number of failed + * security checks. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly numberOfFailedSecurityChecks?: number; +} + +/** + * @interface + * An interface representing DatabaseVulnerabilityAssessmentScansExport. + * A database Vulnerability Assessment scan export resource. + * + * @extends ProxyResource + */ +export interface DatabaseVulnerabilityAssessmentScansExport extends ProxyResource { + /** + * @member {string} [exportedReportLocation] Location of the exported report + * (e.g. + * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly exportedReportLocation?: string; +} + +/** + * @interface + * An interface representing InstanceFailoverGroupReadWriteEndpoint. + * Read-write endpoint of the failover group instance. + * + */ +export interface InstanceFailoverGroupReadWriteEndpoint { + /** + * @member {ReadWriteEndpointFailoverPolicy} failoverPolicy Failover policy + * of the read-write endpoint for the failover group. If failoverPolicy is + * Automatic then failoverWithDataLossGracePeriodMinutes is required. + * Possible values include: 'Manual', 'Automatic' + */ + failoverPolicy: ReadWriteEndpointFailoverPolicy; + /** + * @member {number} [failoverWithDataLossGracePeriodMinutes] Grace period + * before failover with data loss is attempted for the read-write endpoint. + * If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes + * is required. + */ + failoverWithDataLossGracePeriodMinutes?: number; +} + +/** + * @interface + * An interface representing InstanceFailoverGroupReadOnlyEndpoint. + * Read-only endpoint of the failover group instance. + * + */ +export interface InstanceFailoverGroupReadOnlyEndpoint { + /** + * @member {ReadOnlyEndpointFailoverPolicy} [failoverPolicy] Failover policy + * of the read-only endpoint for the failover group. Possible values include: + * 'Disabled', 'Enabled' + */ + failoverPolicy?: ReadOnlyEndpointFailoverPolicy; +} + +/** + * @interface + * An interface representing PartnerRegionInfo. + * Partner region information for the failover group. + * + */ +export interface PartnerRegionInfo { + /** + * @member {string} [location] Geo location of the partner managed instances. + */ + location?: string; + /** + * @member {InstanceFailoverGroupReplicationRole} [replicationRole] + * Replication role of the partner managed instances. Possible values + * include: 'Primary', 'Secondary' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly replicationRole?: InstanceFailoverGroupReplicationRole; +} + +/** + * @interface + * An interface representing ManagedInstancePairInfo. + * Pairs of Managed Instances in the failover group. + * + */ +export interface ManagedInstancePairInfo { + /** + * @member {string} [primaryManagedInstanceId] Id of Primary Managed Instance + * in pair. + */ + primaryManagedInstanceId?: string; + /** + * @member {string} [partnerManagedInstanceId] Id of Partner Managed Instance + * in pair. + */ + partnerManagedInstanceId?: string; +} + +/** + * @interface + * An interface representing InstanceFailoverGroup. + * An instance failover group. + * + * @extends ProxyResource + */ +export interface InstanceFailoverGroup extends ProxyResource { + /** + * @member {InstanceFailoverGroupReadWriteEndpoint} readWriteEndpoint + * Read-write endpoint of the failover group instance. + */ + readWriteEndpoint: InstanceFailoverGroupReadWriteEndpoint; + /** + * @member {InstanceFailoverGroupReadOnlyEndpoint} [readOnlyEndpoint] + * Read-only endpoint of the failover group instance. + */ + readOnlyEndpoint?: InstanceFailoverGroupReadOnlyEndpoint; + /** + * @member {InstanceFailoverGroupReplicationRole} [replicationRole] Local + * replication role of the failover group instance. Possible values include: + * 'Primary', 'Secondary' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly replicationRole?: InstanceFailoverGroupReplicationRole; + /** + * @member {string} [replicationState] Replication state of the failover + * group instance. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly replicationState?: string; + /** + * @member {PartnerRegionInfo[]} partnerRegions Partner region information + * for the failover group. + */ + partnerRegions: PartnerRegionInfo[]; + /** + * @member {ManagedInstancePairInfo[]} managedInstancePairs List of managed + * instance pairs in the failover group. + */ + managedInstancePairs: ManagedInstancePairInfo[]; +} + +/** + * @interface + * An interface representing BackupShortTermRetentionPolicy. + * A short term retention policy. + * + * @extends ProxyResource + */ +export interface BackupShortTermRetentionPolicy extends ProxyResource { + /** + * @member {number} [retentionDays] The backup retention period in days. This + * is how many days Point-in-Time Restore will be supported. + */ + retentionDays?: number; +} + +/** + * @interface + * An interface representing TdeCertificate. + * A TDE certificate that can be uploaded into a server. + * + * @extends ProxyResource + */ +export interface TdeCertificate extends ProxyResource { + /** + * @member {string} privateBlob The base64 encoded certificate private blob. + */ + privateBlob: string; + /** + * @member {string} [certPassword] The certificate password. + */ + certPassword?: string; +} + +/** + * @interface + * An interface representing ManagedInstanceKey. + * A managed instance key. + * + * @extends ProxyResource + */ +export interface ManagedInstanceKey extends ProxyResource { + /** + * @member {string} [kind] Kind of encryption protector. This is metadata + * used for the Azure portal experience. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {ServerKeyType} serverKeyType The key type like 'ServiceManaged', + * 'AzureKeyVault'. Possible values include: 'ServiceManaged', + * 'AzureKeyVault' + */ + serverKeyType: ServerKeyType; + /** + * @member {string} [uri] The URI of the key. If the ServerKeyType is + * AzureKeyVault, then the URI is required. + */ + uri?: string; + /** + * @member {string} [thumbprint] Thumbprint of the key. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly thumbprint?: string; + /** + * @member {Date} [creationDate] The key creation date. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationDate?: Date; +} + +/** + * @interface + * An interface representing ManagedInstanceEncryptionProtector. + * The managed instance encryption protector. + * + * @extends ProxyResource + */ +export interface ManagedInstanceEncryptionProtector extends ProxyResource { + /** + * @member {string} [kind] Kind of encryption protector. This is metadata + * used for the Azure portal experience. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly kind?: string; + /** + * @member {string} [serverKeyName] The name of the managed instance key. + */ + serverKeyName?: string; + /** + * @member {ServerKeyType} serverKeyType The encryption protector type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' + */ + serverKeyType: ServerKeyType; + /** + * @member {string} [uri] The URI of the server key. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly uri?: string; + /** + * @member {string} [thumbprint] Thumbprint of the server key. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly thumbprint?: string; +} + +/** + * @interface + * An interface representing RecoverableManagedDatabase. + * A recoverable managed database resource. + * + * @extends ProxyResource + */ +export interface RecoverableManagedDatabase extends ProxyResource { + /** + * @member {string} [lastAvailableBackupDate] The last available backup date. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastAvailableBackupDate?: string; +} + +/** + * @interface + * An interface representing ManagedInstanceVulnerabilityAssessment. + * A managed instance vulnerability assessment. + * + * @extends ProxyResource + */ +export interface ManagedInstanceVulnerabilityAssessment extends ProxyResource { + /** + * @member {string} storageContainerPath A blob storage container path to + * hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). + */ + storageContainerPath: string; + /** + * @member {string} [storageContainerSasKey] 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. + */ + storageContainerSasKey?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the storage account for vulnerability assessment scan results. If + * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + * required. + */ + storageAccountAccessKey?: string; + /** + * @member {VulnerabilityAssessmentRecurringScansProperties} [recurringScans] + * The recurring scans settings + */ + recurringScans?: VulnerabilityAssessmentRecurringScansProperties; +} + +/** + * @interface + * An interface representing ServerVulnerabilityAssessment. + * A server vulnerability assessment. + * + * @extends ProxyResource + */ +export interface ServerVulnerabilityAssessment extends ProxyResource { + /** + * @member {string} storageContainerPath A blob storage container path to + * hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). + */ + storageContainerPath: string; + /** + * @member {string} [storageContainerSasKey] 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. + */ + storageContainerSasKey?: string; + /** + * @member {string} [storageAccountAccessKey] Specifies the identifier key of + * the storage account for vulnerability assessment scan results. If + * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + * required. + */ + storageAccountAccessKey?: string; + /** + * @member {VulnerabilityAssessmentRecurringScansProperties} [recurringScans] + * The recurring scans settings + */ + recurringScans?: VulnerabilityAssessmentRecurringScansProperties; +} + +/** + * @interface + * An interface representing ElasticPoolsListByServerOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ElasticPoolsListByServerOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {number} [skip] The number of elements in the collection to skip. + */ + skip?: number; +} + +/** + * @interface + * An interface representing SyncGroupsListLogsOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface SyncGroupsListLogsOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [continuationToken] The continuation token for this + * operation. + */ + continuationToken?: string; +} + +/** + * @interface + * An interface representing JobExecutionsListByAgentOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface JobExecutionsListByAgentOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {Date} [createTimeMin] If specified, only job executions created + * at or after the specified time are included. + */ + createTimeMin?: Date; + /** + * @member {Date} [createTimeMax] If specified, only job executions created + * before the specified time are included. + */ + createTimeMax?: Date; + /** + * @member {Date} [endTimeMin] If specified, only job executions completed at + * or after the specified time are included. + */ + endTimeMin?: Date; + /** + * @member {Date} [endTimeMax] If specified, only job executions completed + * before the specified time are included. + */ + endTimeMax?: Date; + /** + * @member {boolean} [isActive] If specified, only active or only completed + * job executions are included. + */ + isActive?: boolean; + /** + * @member {number} [skip] The number of elements in the collection to skip. + */ + skip?: number; + /** + * @member {number} [top] The number of elements to return from the + * collection. + */ + top?: number; +} + +/** + * @interface + * An interface representing JobExecutionsListByJobOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface JobExecutionsListByJobOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {Date} [createTimeMin] If specified, only job executions created + * at or after the specified time are included. + */ + createTimeMin?: Date; + /** + * @member {Date} [createTimeMax] If specified, only job executions created + * before the specified time are included. + */ + createTimeMax?: Date; + /** + * @member {Date} [endTimeMin] If specified, only job executions completed at + * or after the specified time are included. + */ + endTimeMin?: Date; + /** + * @member {Date} [endTimeMax] If specified, only job executions completed + * before the specified time are included. + */ + endTimeMax?: Date; + /** + * @member {boolean} [isActive] If specified, only active or only completed + * job executions are included. + */ + isActive?: boolean; + /** + * @member {number} [skip] The number of elements in the collection to skip. + */ + skip?: number; + /** + * @member {number} [top] The number of elements to return from the + * collection. + */ + top?: number; +} + +/** + * @interface + * An interface representing JobStepExecutionsListByJobExecutionOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface JobStepExecutionsListByJobExecutionOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {Date} [createTimeMin] If specified, only job executions created + * at or after the specified time are included. + */ + createTimeMin?: Date; + /** + * @member {Date} [createTimeMax] If specified, only job executions created + * before the specified time are included. + */ + createTimeMax?: Date; + /** + * @member {Date} [endTimeMin] If specified, only job executions completed at + * or after the specified time are included. + */ + endTimeMin?: Date; + /** + * @member {Date} [endTimeMax] If specified, only job executions completed + * before the specified time are included. + */ + endTimeMax?: Date; + /** + * @member {boolean} [isActive] If specified, only active or only completed + * job executions are included. + */ + isActive?: boolean; + /** + * @member {number} [skip] The number of elements in the collection to skip. + */ + skip?: number; + /** + * @member {number} [top] The number of elements to return from the + * collection. + */ + top?: number; +} + +/** + * @interface + * An interface representing JobTargetExecutionsListByJobExecutionOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface JobTargetExecutionsListByJobExecutionOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {Date} [createTimeMin] If specified, only job executions created + * at or after the specified time are included. + */ + createTimeMin?: Date; + /** + * @member {Date} [createTimeMax] If specified, only job executions created + * before the specified time are included. + */ + createTimeMax?: Date; + /** + * @member {Date} [endTimeMin] If specified, only job executions completed at + * or after the specified time are included. + */ + endTimeMin?: Date; + /** + * @member {Date} [endTimeMax] If specified, only job executions completed + * before the specified time are included. + */ + endTimeMax?: Date; + /** + * @member {boolean} [isActive] If specified, only active or only completed + * job executions are included. + */ + isActive?: boolean; + /** + * @member {number} [skip] The number of elements in the collection to skip. + */ + skip?: number; + /** + * @member {number} [top] The number of elements to return from the + * collection. + */ + top?: number; +} + +/** + * @interface + * An interface representing JobTargetExecutionsListByStepOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface JobTargetExecutionsListByStepOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {Date} [createTimeMin] If specified, only job executions created + * at or after the specified time are included. + */ + createTimeMin?: Date; + /** + * @member {Date} [createTimeMax] If specified, only job executions created + * before the specified time are included. + */ + createTimeMax?: Date; + /** + * @member {Date} [endTimeMin] If specified, only job executions completed at + * or after the specified time are included. + */ + endTimeMin?: Date; + /** + * @member {Date} [endTimeMax] If specified, only job executions completed + * before the specified time are included. + */ + endTimeMax?: Date; + /** + * @member {boolean} [isActive] If specified, only active or only completed + * job executions are included. + */ + isActive?: boolean; + /** + * @member {number} [skip] The number of elements in the collection to skip. + */ + skip?: number; + /** + * @member {number} [top] The number of elements to return from the + * collection. + */ + top?: number; +} + +/** + * @interface + * An interface representing LongTermRetentionBackupsListByDatabaseOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface LongTermRetentionBackupsListByDatabaseOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [onlyLatestPerDatabase] Whether or not to only get the + * latest backup for each database. + */ + onlyLatestPerDatabase?: boolean; + /** + * @member {LongTermRetentionDatabaseState} [databaseState] Whether to query + * against just live databases, just deleted databases, or all databases. + * Possible values include: 'All', 'Live', 'Deleted' + */ + databaseState?: LongTermRetentionDatabaseState; +} + +/** + * @interface + * An interface representing LongTermRetentionBackupsListByLocationOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface LongTermRetentionBackupsListByLocationOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [onlyLatestPerDatabase] Whether or not to only get the + * latest backup for each database. + */ + onlyLatestPerDatabase?: boolean; + /** + * @member {LongTermRetentionDatabaseState} [databaseState] Whether to query + * against just live databases, just deleted databases, or all databases. + * Possible values include: 'All', 'Live', 'Deleted' + */ + databaseState?: LongTermRetentionDatabaseState; +} + +/** + * @interface + * An interface representing LongTermRetentionBackupsListByServerOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface LongTermRetentionBackupsListByServerOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [onlyLatestPerDatabase] Whether or not to only get the + * latest backup for each database. + */ + onlyLatestPerDatabase?: boolean; + /** + * @member {LongTermRetentionDatabaseState} [databaseState] Whether to query + * against just live databases, just deleted databases, or all databases. + * Possible values include: 'All', 'Live', 'Deleted' + */ + databaseState?: LongTermRetentionDatabaseState; +} + +/** + * @interface + * An interface representing SensitivityLabelsListCurrentByDatabaseOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface SensitivityLabelsListCurrentByDatabaseOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] An OData filter expression that filters elements + * in the collection. + */ + filter?: string; +} + +/** + * @interface + * An interface representing SensitivityLabelsListRecommendedByDatabaseOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface SensitivityLabelsListRecommendedByDatabaseOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [includeDisabledRecommendations] Specifies whether to + * include disabled recommendations or not. + */ + includeDisabledRecommendations?: boolean; + /** + * @member {string} [skipToken] + */ + skipToken?: string; + /** + * @member {string} [filter] An OData filter expression that filters elements + * in the collection. + */ + filter?: string; +} + +/** + * @interface + * An interface representing CapabilitiesListByLocationOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface CapabilitiesListByLocationOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {CapabilityGroup} [include] If specified, restricts the response + * to only include the selected item. Possible values include: + * 'supportedEditions', 'supportedElasticPoolEditions', + * 'supportedManagedInstanceVersions' + */ + include?: CapabilityGroup; +} + +/** + * @interface + * An interface representing ManagedInstanceKeysListByInstanceOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ManagedInstanceKeysListByInstanceOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] An OData filter expression that filters elements + * in the collection. + */ + filter?: string; +} + +/** + * @interface + * An interface representing ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] An OData filter expression that filters elements + * in the collection. + */ + filter?: string; +} + +/** + * @interface + * An interface representing ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [includeDisabledRecommendations] Specifies whether to + * include disabled recommendations or not. + */ + includeDisabledRecommendations?: boolean; + /** + * @member {string} [skipToken] + */ + skipToken?: string; + /** + * @member {string} [filter] An OData filter expression that filters elements + * in the collection. + */ + filter?: string; +} + +/** + * @interface + * An interface representing SqlManagementClientOptions. + * @extends AzureServiceClientOptions + */ +export interface SqlManagementClientOptions extends AzureServiceClientOptions { + /** + * @member {string} [baseUri] + */ + baseUri?: string; +} + + +/** + * @interface + * An interface representing the RecoverableDatabaseListResult. + * The response to a list recoverable databases request + * + * @extends Array + */ +export interface RecoverableDatabaseListResult extends Array { +} + +/** + * @interface + * An interface representing the RestorableDroppedDatabaseListResult. + * The response to a list restorable dropped databases request + * + * @extends Array + */ +export interface RestorableDroppedDatabaseListResult extends Array { +} + +/** + * @interface + * An interface representing the ServerListResult. + * A list of servers. + * + * @extends Array + */ +export interface ServerListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the DataMaskingRuleListResult. + * The response to a list data masking rules request. + * + * @extends Array + */ +export interface DataMaskingRuleListResult extends Array { +} + +/** + * @interface + * An interface representing the FirewallRuleListResult. + * Represents the response to a List Firewall Rules request. + * + * @extends Array + */ +export interface FirewallRuleListResult extends Array { +} + +/** + * @interface + * An interface representing the GeoBackupPolicyListResult. + * The response to a list geo backup policies request. + * + * @extends Array + */ +export interface GeoBackupPolicyListResult extends Array { +} + +/** + * @interface + * An interface representing the MetricListResult. + * The response to a list database metrics request. + * + * @extends Array + */ +export interface MetricListResult extends Array { +} + +/** + * @interface + * An interface representing the MetricDefinitionListResult. + * The response to a list database metric definitions request. + * + * @extends Array + */ +export interface MetricDefinitionListResult extends Array { +} + +/** + * @interface + * An interface representing the DatabaseListResult. + * A list of databases. + * + * @extends Array + */ +export interface DatabaseListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ElasticPoolListResult. + * The result of an elastic pool list request. + * + * @extends Array + */ +export interface ElasticPoolListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the RecommendedElasticPoolListResult. + * Represents the response to a list recommended elastic pool request. + * + * @extends Array + */ +export interface RecommendedElasticPoolListResult extends Array { +} + +/** + * @interface + * An interface representing the RecommendedElasticPoolListMetricsResult. + * Represents the response to a list recommended elastic pool metrics request. + * + * @extends Array + */ +export interface RecommendedElasticPoolListMetricsResult extends Array { +} + +/** + * @interface + * An interface representing the ReplicationLinkListResult. + * Represents the response to a List database replication link request. + * + * @extends Array + */ +export interface ReplicationLinkListResult extends Array { +} + +/** + * @interface + * An interface representing the ServerAdministratorListResult. + * The response to a list Active Directory Administrators request. + * + * @extends Array + */ +export interface ServerAdministratorListResult extends Array { +} + +/** + * @interface + * An interface representing the ServerCommunicationLinkListResult. + * A list of server communication links. + * + * @extends Array + */ +export interface ServerCommunicationLinkListResult extends Array { +} + +/** + * @interface + * An interface representing the ServiceObjectiveListResult. + * Represents the response to a get database service objectives request. + * + * @extends Array + */ +export interface ServiceObjectiveListResult extends Array { +} + +/** + * @interface + * An interface representing the ElasticPoolActivityListResult. + * Represents the response to a list elastic pool activity request. + * + * @extends Array + */ +export interface ElasticPoolActivityListResult extends Array { +} + +/** + * @interface + * An interface representing the ElasticPoolDatabaseActivityListResult. + * Represents the response to a list elastic pool database activity request. + * + * @extends Array + */ +export interface ElasticPoolDatabaseActivityListResult extends Array { +} + +/** + * @interface + * An interface representing the ServiceTierAdvisorListResult. + * Represents the response to a list service tier advisor request. + * + * @extends Array + */ +export interface ServiceTierAdvisorListResult extends Array { +} + +/** + * @interface + * An interface representing the TransparentDataEncryptionActivityListResult. + * Represents the response to a list database transparent data encryption + * activity request. + * + * @extends Array + */ +export interface TransparentDataEncryptionActivityListResult extends Array { +} + +/** + * @interface + * An interface representing the ServerUsageListResult. + * Represents the response to a list server metrics request. + * + * @extends Array + */ +export interface ServerUsageListResult extends Array { +} + +/** + * @interface + * An interface representing the DatabaseUsageListResult. + * The response to a list database metrics request. + * + * @extends Array + */ +export interface DatabaseUsageListResult extends Array { +} + +/** + * @interface + * An interface representing the EncryptionProtectorListResult. + * A list of server encryption protectors. + * + * @extends Array + */ +export interface EncryptionProtectorListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the FailoverGroupListResult. + * A list of failover groups. + * + * @extends Array + */ +export interface FailoverGroupListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ManagedInstanceListResult. + * A list of managed instances. + * + * @extends Array + */ +export interface ManagedInstanceListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the OperationListResult. + * Result of the request to list SQL operations. + * + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ServerKeyListResult. + * A list of server keys. + * + * @extends Array + */ +export interface ServerKeyListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the SyncAgentListResult. + * A list of sync agents. + * + * @extends Array + */ +export interface SyncAgentListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the SyncAgentLinkedDatabaseListResult. + * A list of sync agent linked databases. + * + * @extends Array + */ +export interface SyncAgentLinkedDatabaseListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the SyncDatabaseIdListResult. + * A list of sync database ID properties. + * + * @extends Array + */ +export interface SyncDatabaseIdListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the SyncFullSchemaPropertiesListResult. + * A list of sync schema properties. + * + * @extends Array + */ +export interface SyncFullSchemaPropertiesListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the SyncGroupLogListResult. + * A list of sync group log properties. + * + * @extends Array + */ +export interface SyncGroupLogListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the SyncGroupListResult. + * A list of sync groups. + * + * @extends Array + */ +export interface SyncGroupListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the SyncMemberListResult. + * A list of Azure SQL Database sync members. + * + * @extends Array + */ +export interface SyncMemberListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the SubscriptionUsageListResult. + * A list of subscription usage metrics in a location. + * + * @extends Array + */ +export interface SubscriptionUsageListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the VirtualClusterListResult. + * A list of virtual clusters. + * + * @extends Array + */ +export interface VirtualClusterListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the VirtualNetworkRuleListResult. + * A list of virtual network rules. + * + * @extends Array + */ +export interface VirtualNetworkRuleListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the DatabaseVulnerabilityAssessmentListResult. + * A list of the database's vulnerability assessments. + * + * @extends Array + */ +export interface DatabaseVulnerabilityAssessmentListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the JobAgentListResult. + * A list of Azure SQL job agents. + * + * @extends Array + */ +export interface JobAgentListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the JobCredentialListResult. + * A list of job credentials. + * + * @extends Array + */ +export interface JobCredentialListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the JobExecutionListResult. + * A list of job executions. + * + * @extends Array + */ +export interface JobExecutionListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the JobListResult. + * A list of jobs. + * + * @extends Array + */ +export interface JobListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the JobStepListResult. + * A list of job steps. + * + * @extends Array + */ +export interface JobStepListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the JobTargetGroupListResult. + * A list of target groups. + * + * @extends Array + */ +export interface JobTargetGroupListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the JobVersionListResult. + * A list of job versions. + * + * @extends Array + */ +export interface JobVersionListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the LongTermRetentionBackupListResult. + * A list of long term retention backups. + * + * @extends Array + */ +export interface LongTermRetentionBackupListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ManagedBackupShortTermRetentionPolicyListResult. + * A list of short term retention policies. + * + * @extends Array + */ +export interface ManagedBackupShortTermRetentionPolicyListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ManagedDatabaseListResult. + * A list of managed databases. + * + * @extends Array + */ +export interface ManagedDatabaseListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ServerDnsAliasListResult. + * A list of server DNS aliases. + * + * @extends Array + */ +export interface ServerDnsAliasListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the LogicalServerSecurityAlertPolicyListResult. + * A list of the server's security alert policies. + * + * @extends Array + */ +export interface LogicalServerSecurityAlertPolicyListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the RestorableDroppedManagedDatabaseListResult. + * A list of restorable dropped managed databases. + * + * @extends Array + */ +export interface RestorableDroppedManagedDatabaseListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the RestorePointListResult. + * A list of long term retention backups. + * + * @extends Array + */ +export interface RestorePointListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ManagedDatabaseSecurityAlertPolicyListResult. + * A list of the managed database's security alert policies. + * + * @extends Array + */ +export interface ManagedDatabaseSecurityAlertPolicyListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ManagedServerSecurityAlertPolicyListResult. + * A list of the managed Server's security alert policies. + * + * @extends Array + */ +export interface ManagedServerSecurityAlertPolicyListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the SensitivityLabelListResult. + * A list of sensitivity labels. + * + * @extends Array + */ +export interface SensitivityLabelListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the DatabaseOperationListResult. + * The response to a list database operations request + * + * @extends Array + */ +export interface DatabaseOperationListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ElasticPoolOperationListResult. + * The response to a list elastic pool operations request + * + * @extends Array + */ +export interface ElasticPoolOperationListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the VulnerabilityAssessmentScanRecordListResult. + * A list of vulnerability assessment scan records. + * + * @extends Array + */ +export interface VulnerabilityAssessmentScanRecordListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the InstanceFailoverGroupListResult. + * A list of instance failover groups. + * + * @extends Array + */ +export interface InstanceFailoverGroupListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the BackupShortTermRetentionPolicyListResult. + * A list of short term retention policies. + * + * @extends Array + */ +export interface BackupShortTermRetentionPolicyListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ManagedInstanceKeyListResult. + * A list of managed instance keys. + * + * @extends Array + */ +export interface ManagedInstanceKeyListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ManagedInstanceEncryptionProtectorListResult. + * A list of managed instance encryption protectors. + * + * @extends Array + */ +export interface ManagedInstanceEncryptionProtectorListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the RecoverableManagedDatabaseListResult. + * A list of recoverable managed databases. + * + * @extends Array + */ +export interface RecoverableManagedDatabaseListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ManagedInstanceVulnerabilityAssessmentListResult. + * A list of the ManagedInstance's vulnerability assessments. + * + * @extends Array + */ +export interface ManagedInstanceVulnerabilityAssessmentListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ServerVulnerabilityAssessmentListResult. + * A list of the server's vulnerability assessments. + * + * @extends Array + */ +export interface ServerVulnerabilityAssessmentListResult extends Array { + /** + * @member {string} [nextLink] Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for CheckNameAvailabilityReason. + * Possible values include: 'Invalid', 'AlreadyExists' + * @readonly + * @enum {string} + */ +export type CheckNameAvailabilityReason = 'Invalid' | 'AlreadyExists'; + +/** + * Defines values for ServerConnectionType. + * Possible values include: 'Default', 'Proxy', 'Redirect' + * @readonly + * @enum {string} + */ +export type ServerConnectionType = 'Default' | 'Proxy' | 'Redirect'; + +/** + * Defines values for SecurityAlertPolicyState. + * Possible values include: 'New', 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type SecurityAlertPolicyState = 'New' | 'Enabled' | 'Disabled'; + +/** + * Defines values for SecurityAlertPolicyEmailAccountAdmins. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type SecurityAlertPolicyEmailAccountAdmins = 'Enabled' | 'Disabled'; + +/** + * Defines values for SecurityAlertPolicyUseServerDefault. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type SecurityAlertPolicyUseServerDefault = 'Enabled' | 'Disabled'; + +/** + * Defines values for DataMaskingState. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type DataMaskingState = 'Disabled' | 'Enabled'; + +/** + * Defines values for DataMaskingRuleState. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type DataMaskingRuleState = 'Disabled' | 'Enabled'; + +/** + * Defines values for DataMaskingFunction. + * Possible values include: 'Default', 'CCN', 'Email', 'Number', 'SSN', 'Text' + * @readonly + * @enum {string} + */ +export type DataMaskingFunction = 'Default' | 'CCN' | 'Email' | 'Number' | 'SSN' | 'Text'; + +/** + * Defines values for GeoBackupPolicyState. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type GeoBackupPolicyState = 'Disabled' | 'Enabled'; + +/** + * Defines values for DatabaseEdition. + * Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', + * 'Stretch', 'DataWarehouse', 'System', 'System2' + * @readonly + * @enum {string} + */ +export type DatabaseEdition = 'Web' | 'Business' | 'Basic' | 'Standard' | 'Premium' | 'PremiumRS' | 'Free' | 'Stretch' | 'DataWarehouse' | 'System' | 'System2'; + +/** + * Defines values for ServiceObjectiveName. + * Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', + * 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', + * 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', + * 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', + * 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', + * 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', + * 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + * @readonly + * @enum {string} + */ +export type ServiceObjectiveName = 'System' | 'System0' | 'System1' | 'System2' | 'System3' | 'System4' | 'System2L' | 'System3L' | 'System4L' | 'Free' | 'Basic' | 'S0' | 'S1' | 'S2' | 'S3' | 'S4' | 'S6' | 'S7' | 'S9' | 'S12' | 'P1' | 'P2' | 'P3' | 'P4' | 'P6' | 'P11' | 'P15' | 'PRS1' | 'PRS2' | 'PRS4' | 'PRS6' | 'DW100' | 'DW200' | 'DW300' | 'DW400' | 'DW500' | 'DW600' | 'DW1000' | 'DW1200' | 'DW1000c' | 'DW1500' | 'DW1500c' | 'DW2000' | 'DW2000c' | 'DW3000' | 'DW2500c' | 'DW3000c' | 'DW6000' | 'DW5000c' | 'DW6000c' | 'DW7500c' | 'DW10000c' | 'DW15000c' | 'DW30000c' | 'DS100' | 'DS200' | 'DS300' | 'DS400' | 'DS500' | 'DS600' | 'DS1000' | 'DS1200' | 'DS1500' | 'DS2000' | 'ElasticPool'; + +/** + * Defines values for StorageKeyType. + * Possible values include: 'StorageAccessKey', 'SharedAccessKey' + * @readonly + * @enum {string} + */ +export type StorageKeyType = 'StorageAccessKey' | 'SharedAccessKey'; + +/** + * Defines values for AuthenticationType. + * Possible values include: 'SQL', 'ADPassword' + * @readonly + * @enum {string} + */ +export type AuthenticationType = 'SQL' | 'ADPassword'; + +/** + * Defines values for UnitType. + * Possible values include: 'count', 'bytes', 'seconds', 'percent', 'countPerSecond', + * 'bytesPerSecond' + * @readonly + * @enum {string} + */ +export type UnitType = 'count' | 'bytes' | 'seconds' | 'percent' | 'countPerSecond' | 'bytesPerSecond'; + +/** + * Defines values for PrimaryAggregationType. + * Possible values include: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' + * @readonly + * @enum {string} + */ +export type PrimaryAggregationType = 'None' | 'Average' | 'Count' | 'Minimum' | 'Maximum' | 'Total'; + +/** + * Defines values for UnitDefinitionType. + * Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', + * 'BytesPerSecond' + * @readonly + * @enum {string} + */ +export type UnitDefinitionType = 'Count' | 'Bytes' | 'Seconds' | 'Percent' | 'CountPerSecond' | 'BytesPerSecond'; + +/** + * Defines values for ElasticPoolEdition. + * Possible values include: 'Basic', 'Standard', 'Premium' + * @readonly + * @enum {string} + */ +export type ElasticPoolEdition = 'Basic' | 'Standard' | 'Premium'; + +/** + * Defines values for ReplicationRole. + * Possible values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', 'Copy' + * @readonly + * @enum {string} + */ +export type ReplicationRole = 'Primary' | 'Secondary' | 'NonReadableSecondary' | 'Source' | 'Copy'; + +/** + * Defines values for ReplicationState. + * Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + * @readonly + * @enum {string} + */ +export type ReplicationState = 'PENDING' | 'SEEDING' | 'CATCH_UP' | 'SUSPENDED'; + +/** + * Defines values for RecommendedIndexAction. + * Possible values include: 'Create', 'Drop', 'Rebuild' + * @readonly + * @enum {string} + */ +export type RecommendedIndexAction = 'Create' | 'Drop' | 'Rebuild'; + +/** + * Defines values for RecommendedIndexState. + * Possible values include: 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', + * 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' + * @readonly + * @enum {string} + */ +export type RecommendedIndexState = 'Active' | 'Pending' | 'Executing' | 'Verifying' | 'Pending Revert' | 'Reverting' | 'Reverted' | 'Ignored' | 'Expired' | 'Blocked' | 'Success'; + +/** + * Defines values for RecommendedIndexType. + * Possible values include: 'CLUSTERED', 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + * @readonly + * @enum {string} + */ +export type RecommendedIndexType = 'CLUSTERED' | 'NONCLUSTERED' | 'COLUMNSTORE' | 'CLUSTERED COLUMNSTORE'; + +/** + * Defines values for TransparentDataEncryptionStatus. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type TransparentDataEncryptionStatus = 'Enabled' | 'Disabled'; + +/** + * Defines values for TransparentDataEncryptionActivityStatus. + * Possible values include: 'Encrypting', 'Decrypting' + * @readonly + * @enum {string} + */ +export type TransparentDataEncryptionActivityStatus = 'Encrypting' | 'Decrypting'; + +/** + * Defines values for AutomaticTuningMode. + * Possible values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + * @readonly + * @enum {string} + */ +export type AutomaticTuningMode = 'Inherit' | 'Custom' | 'Auto' | 'Unspecified'; + +/** + * Defines values for AutomaticTuningOptionModeDesired. + * Possible values include: 'Off', 'On', 'Default' + * @readonly + * @enum {string} + */ +export type AutomaticTuningOptionModeDesired = 'Off' | 'On' | 'Default'; + +/** + * Defines values for AutomaticTuningOptionModeActual. + * Possible values include: 'Off', 'On' + * @readonly + * @enum {string} + */ +export type AutomaticTuningOptionModeActual = 'Off' | 'On'; + +/** + * Defines values for AutomaticTuningDisabledReason. + * Possible values include: 'Default', 'Disabled', 'AutoConfigured', 'InheritedFromServer', + * 'QueryStoreOff', 'QueryStoreReadOnly', 'NotSupported' + * @readonly + * @enum {string} + */ +export type AutomaticTuningDisabledReason = 'Default' | 'Disabled' | 'AutoConfigured' | 'InheritedFromServer' | 'QueryStoreOff' | 'QueryStoreReadOnly' | 'NotSupported'; + +/** + * Defines values for ServerKeyType. + * Possible values include: 'ServiceManaged', 'AzureKeyVault' + * @readonly + * @enum {string} + */ +export type ServerKeyType = 'ServiceManaged' | 'AzureKeyVault'; + +/** + * Defines values for ReadWriteEndpointFailoverPolicy. + * Possible values include: 'Manual', 'Automatic' + * @readonly + * @enum {string} + */ +export type ReadWriteEndpointFailoverPolicy = 'Manual' | 'Automatic'; + +/** + * Defines values for ReadOnlyEndpointFailoverPolicy. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type ReadOnlyEndpointFailoverPolicy = 'Disabled' | 'Enabled'; + +/** + * Defines values for FailoverGroupReplicationRole. + * Possible values include: 'Primary', 'Secondary' + * @readonly + * @enum {string} + */ +export type FailoverGroupReplicationRole = 'Primary' | 'Secondary'; + +/** + * Defines values for IdentityType. + * Possible values include: 'SystemAssigned' + * @readonly + * @enum {string} + */ +export type IdentityType = 'SystemAssigned'; + +/** + * Defines values for ManagedInstanceProxyOverride. + * Possible values include: 'Proxy', 'Redirect', 'Default' + * @readonly + * @enum {string} + */ +export type ManagedInstanceProxyOverride = 'Proxy' | 'Redirect' | 'Default'; + +/** + * Defines values for OperationOrigin. + * Possible values include: 'user', 'system' + * @readonly + * @enum {string} + */ +export type OperationOrigin = 'user' | 'system'; + +/** + * Defines values for SyncAgentState. + * Possible values include: 'Online', 'Offline', 'NeverConnected' + * @readonly + * @enum {string} + */ +export type SyncAgentState = 'Online' | 'Offline' | 'NeverConnected'; + +/** + * Defines values for SyncMemberDbType. + * Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase' + * @readonly + * @enum {string} + */ +export type SyncMemberDbType = 'AzureSqlDatabase' | 'SqlServerDatabase'; + +/** + * Defines values for SyncGroupLogType. + * Possible values include: 'All', 'Error', 'Warning', 'Success' + * @readonly + * @enum {string} + */ +export type SyncGroupLogType = 'All' | 'Error' | 'Warning' | 'Success'; + +/** + * Defines values for SyncConflictResolutionPolicy. + * Possible values include: 'HubWin', 'MemberWin' + * @readonly + * @enum {string} + */ +export type SyncConflictResolutionPolicy = 'HubWin' | 'MemberWin'; + +/** + * Defines values for SyncGroupState. + * Possible values include: 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + * @readonly + * @enum {string} + */ +export type SyncGroupState = 'NotReady' | 'Error' | 'Warning' | 'Progressing' | 'Good'; + +/** + * Defines values for SyncDirection. + * Possible values include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' + * @readonly + * @enum {string} + */ +export type SyncDirection = 'Bidirectional' | 'OneWayMemberToHub' | 'OneWayHubToMember'; + +/** + * Defines values for SyncMemberState. + * Possible values include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', + * 'DisabledTombstoneCleanup', 'DisabledBackupRestore', 'SyncSucceededWithWarnings', + * 'SyncCancelling', 'SyncCancelled', 'UnProvisioned', 'Provisioning', 'Provisioned', + * 'ProvisionFailed', 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', + * 'ReprovisionFailed', 'UnReprovisioned' + * @readonly + * @enum {string} + */ +export type SyncMemberState = 'SyncInProgress' | 'SyncSucceeded' | 'SyncFailed' | 'DisabledTombstoneCleanup' | 'DisabledBackupRestore' | 'SyncSucceededWithWarnings' | 'SyncCancelling' | 'SyncCancelled' | 'UnProvisioned' | 'Provisioning' | 'Provisioned' | 'ProvisionFailed' | 'DeProvisioning' | 'DeProvisioned' | 'DeProvisionFailed' | 'Reprovisioning' | 'ReprovisionFailed' | 'UnReprovisioned'; + +/** + * Defines values for VirtualNetworkRuleState. + * Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + * @readonly + * @enum {string} + */ +export type VirtualNetworkRuleState = 'Initializing' | 'InProgress' | 'Ready' | 'Deleting' | 'Unknown'; + +/** + * Defines values for BlobAuditingPolicyState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type BlobAuditingPolicyState = 'Enabled' | 'Disabled'; + +/** + * Defines values for JobAgentState. + * Possible values include: 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + * @readonly + * @enum {string} + */ +export type JobAgentState = 'Creating' | 'Ready' | 'Updating' | 'Deleting' | 'Disabled'; + +/** + * Defines values for JobExecutionLifecycle. + * Possible values include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + * 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', 'TimedOut', 'Canceled', + * 'Skipped' + * @readonly + * @enum {string} + */ +export type JobExecutionLifecycle = 'Created' | 'InProgress' | 'WaitingForChildJobExecutions' | 'WaitingForRetry' | 'Succeeded' | 'SucceededWithSkipped' | 'Failed' | 'TimedOut' | 'Canceled' | 'Skipped'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', 'Canceled' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Created' | 'InProgress' | 'Succeeded' | 'Failed' | 'Canceled'; + +/** + * Defines values for JobTargetType. + * Possible values include: 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', + * 'SqlServer' + * @readonly + * @enum {string} + */ +export type JobTargetType = 'TargetGroup' | 'SqlDatabase' | 'SqlElasticPool' | 'SqlShardMap' | 'SqlServer'; + +/** + * Defines values for JobScheduleType. + * Possible values include: 'Once', 'Recurring' + * @readonly + * @enum {string} + */ +export type JobScheduleType = 'Once' | 'Recurring'; + +/** + * Defines values for JobStepActionType. + * Possible values include: 'TSql' + * @readonly + * @enum {string} + */ +export type JobStepActionType = 'TSql'; + +/** + * Defines values for JobStepActionSource. + * Possible values include: 'Inline' + * @readonly + * @enum {string} + */ +export type JobStepActionSource = 'Inline'; + +/** + * Defines values for JobStepOutputType. + * Possible values include: 'SqlDatabase' + * @readonly + * @enum {string} + */ +export type JobStepOutputType = 'SqlDatabase'; + +/** + * Defines values for JobTargetGroupMembershipType. + * Possible values include: 'Include', 'Exclude' + * @readonly + * @enum {string} + */ +export type JobTargetGroupMembershipType = 'Include' | 'Exclude'; + +/** + * Defines values for ManagedDatabaseStatus. + * Possible values include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' + * @readonly + * @enum {string} + */ +export type ManagedDatabaseStatus = 'Online' | 'Offline' | 'Shutdown' | 'Creating' | 'Inaccessible' | 'Updating'; + +/** + * Defines values for CatalogCollationType. + * Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + * @readonly + * @enum {string} + */ +export type CatalogCollationType = 'DATABASE_DEFAULT' | 'SQL_Latin1_General_CP1_CI_AS'; + +/** + * Defines values for ManagedDatabaseCreateMode. + * Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' + * @readonly + * @enum {string} + */ +export type ManagedDatabaseCreateMode = 'Default' | 'RestoreExternalBackup' | 'PointInTimeRestore' | 'Recovery'; + +/** + * Defines values for AutomaticTuningServerMode. + * Possible values include: 'Custom', 'Auto', 'Unspecified' + * @readonly + * @enum {string} + */ +export type AutomaticTuningServerMode = 'Custom' | 'Auto' | 'Unspecified'; + +/** + * Defines values for AutomaticTuningServerReason. + * Possible values include: 'Default', 'Disabled', 'AutoConfigured' + * @readonly + * @enum {string} + */ +export type AutomaticTuningServerReason = 'Default' | 'Disabled' | 'AutoConfigured'; + +/** + * Defines values for RestorePointType. + * Possible values include: 'CONTINUOUS', 'DISCRETE' + * @readonly + * @enum {string} + */ +export type RestorePointType = 'CONTINUOUS' | 'DISCRETE'; + +/** + * Defines values for ManagementOperationState. + * Possible values include: 'Pending', 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', + * 'Cancelled' + * @readonly + * @enum {string} + */ +export type ManagementOperationState = 'Pending' | 'InProgress' | 'Succeeded' | 'Failed' | 'CancelInProgress' | 'Cancelled'; + +/** + * Defines values for MaxSizeUnit. + * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + * @readonly + * @enum {string} + */ +export type MaxSizeUnit = 'Megabytes' | 'Gigabytes' | 'Terabytes' | 'Petabytes'; + +/** + * Defines values for LogSizeUnit. + * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', 'Percent' + * @readonly + * @enum {string} + */ +export type LogSizeUnit = 'Megabytes' | 'Gigabytes' | 'Terabytes' | 'Petabytes' | 'Percent'; + +/** + * Defines values for CapabilityStatus. + * Possible values include: 'Visible', 'Available', 'Default', 'Disabled' + * @readonly + * @enum {string} + */ +export type CapabilityStatus = 'Visible' | 'Available' | 'Default' | 'Disabled'; + +/** + * Defines values for PerformanceLevelUnit. + * Possible values include: 'DTU', 'VCores' + * @readonly + * @enum {string} + */ +export type PerformanceLevelUnit = 'DTU' | 'VCores'; + +/** + * Defines values for CreateMode. + * Possible values include: 'Default', 'Copy', 'Secondary', 'PointInTimeRestore', 'Restore', + * 'Recovery', 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + * 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + * @readonly + * @enum {string} + */ +export type CreateMode = 'Default' | 'Copy' | 'Secondary' | 'PointInTimeRestore' | 'Restore' | 'Recovery' | 'RestoreExternalBackup' | 'RestoreExternalBackupSecondary' | 'RestoreLongTermRetentionBackup' | 'OnlineSecondary'; + +/** + * Defines values for SampleName. + * Possible values include: 'AdventureWorksLT', 'WideWorldImportersStd', 'WideWorldImportersFull' + * @readonly + * @enum {string} + */ +export type SampleName = 'AdventureWorksLT' | 'WideWorldImportersStd' | 'WideWorldImportersFull'; + +/** + * Defines values for DatabaseStatus. + * Possible values include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', + * 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying', 'Creating', + * 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling' + * @readonly + * @enum {string} + */ +export type DatabaseStatus = 'Online' | 'Restoring' | 'RecoveryPending' | 'Recovering' | 'Suspect' | 'Offline' | 'Standby' | 'Shutdown' | 'EmergencyMode' | 'AutoClosed' | 'Copying' | 'Creating' | 'Inaccessible' | 'OfflineSecondary' | 'Pausing' | 'Paused' | 'Resuming' | 'Scaling'; + +/** + * Defines values for DatabaseLicenseType. + * Possible values include: 'LicenseIncluded', 'BasePrice' + * @readonly + * @enum {string} + */ +export type DatabaseLicenseType = 'LicenseIncluded' | 'BasePrice'; + +/** + * Defines values for DatabaseReadScale. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type DatabaseReadScale = 'Enabled' | 'Disabled'; + +/** + * Defines values for ElasticPoolState. + * Possible values include: 'Creating', 'Ready', 'Disabled' + * @readonly + * @enum {string} + */ +export type ElasticPoolState = 'Creating' | 'Ready' | 'Disabled'; + +/** + * Defines values for ElasticPoolLicenseType. + * Possible values include: 'LicenseIncluded', 'BasePrice' + * @readonly + * @enum {string} + */ +export type ElasticPoolLicenseType = 'LicenseIncluded' | 'BasePrice'; + +/** + * Defines values for VulnerabilityAssessmentScanTriggerType. + * Possible values include: 'OnDemand', 'Recurring' + * @readonly + * @enum {string} + */ +export type VulnerabilityAssessmentScanTriggerType = 'OnDemand' | 'Recurring'; + +/** + * Defines values for VulnerabilityAssessmentScanState. + * Possible values include: 'Passed', 'Failed', 'FailedToRun', 'InProgress' + * @readonly + * @enum {string} + */ +export type VulnerabilityAssessmentScanState = 'Passed' | 'Failed' | 'FailedToRun' | 'InProgress'; + +/** + * Defines values for InstanceFailoverGroupReplicationRole. + * Possible values include: 'Primary', 'Secondary' + * @readonly + * @enum {string} + */ +export type InstanceFailoverGroupReplicationRole = 'Primary' | 'Secondary'; + +/** + * Defines values for LongTermRetentionDatabaseState. + * Possible values include: 'All', 'Live', 'Deleted' + * @readonly + * @enum {string} + */ +export type LongTermRetentionDatabaseState = 'All' | 'Live' | 'Deleted'; + +/** + * Defines values for VulnerabilityAssessmentPolicyBaselineName. + * Possible values include: 'master', 'default' + * @readonly + * @enum {string} + */ +export type VulnerabilityAssessmentPolicyBaselineName = 'master' | 'default'; + +/** + * Defines values for SensitivityLabelSource. + * Possible values include: 'current', 'recommended' + * @readonly + * @enum {string} + */ +export type SensitivityLabelSource = 'current' | 'recommended'; + +/** + * Defines values for CapabilityGroup. + * Possible values include: 'supportedEditions', 'supportedElasticPoolEditions', + * 'supportedManagedInstanceVersions' + * @readonly + * @enum {string} + */ +export type CapabilityGroup = 'supportedEditions' | 'supportedElasticPoolEditions' | 'supportedManagedInstanceVersions'; + +/** + * Defines values for Type. + * Possible values include: 'All', 'Error', 'Warning', 'Success' + * @readonly + * @enum {string} + */ +export type Type = 'All' | 'Error' | 'Warning' | 'Success'; + +/** + * Contains response data for the get operation. + */ +export type RecoverableDatabasesGetResponse = RecoverableDatabase & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RecoverableDatabase; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type RecoverableDatabasesListByServerResponse = RecoverableDatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RecoverableDatabaseListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RestorableDroppedDatabasesGetResponse = RestorableDroppedDatabase & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RestorableDroppedDatabase; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type RestorableDroppedDatabasesListByServerResponse = RestorableDroppedDatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RestorableDroppedDatabaseListResult; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type ServersCheckNameAvailabilityResponse = CheckNameAvailabilityResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: CheckNameAvailabilityResponse; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServersListResponse = ServerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ServersListByResourceGroupResponse = ServerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServersGetResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServersCreateOrUpdateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ServersUpdateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServersBeginCreateOrUpdateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ServersBeginUpdateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ServersListNextResponse = ServerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ServersListByResourceGroupNextResponse = ServerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerConnectionPoliciesCreateOrUpdateResponse = ServerConnectionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerConnectionPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerConnectionPoliciesGetResponse = ServerConnectionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerConnectionPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DatabaseThreatDetectionPoliciesGetResponse = DatabaseSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DatabaseThreatDetectionPoliciesCreateOrUpdateResponse = DatabaseSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DataMaskingPoliciesCreateOrUpdateResponse = DataMaskingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMaskingPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DataMaskingPoliciesGetResponse = DataMaskingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMaskingPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DataMaskingRulesCreateOrUpdateResponse = DataMaskingRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMaskingRule; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type DataMaskingRulesListByDatabaseResponse = DataMaskingRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataMaskingRuleListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type FirewallRulesGetResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type FirewallRulesListByServerResponse = FirewallRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRuleListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type GeoBackupPoliciesCreateOrUpdateResponse = GeoBackupPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: GeoBackupPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type GeoBackupPoliciesGetResponse = GeoBackupPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: GeoBackupPolicy; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type GeoBackupPoliciesListByDatabaseResponse = GeoBackupPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: GeoBackupPolicyListResult; + }; +}; + +/** + * Contains response data for the importMethod operation. + */ +export type DatabasesImportMethodResponse = ImportExportResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ImportExportResponse; + }; +}; + +/** + * Contains response data for the createImportOperation operation. + */ +export type DatabasesCreateImportOperationResponse = ImportExportResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ImportExportResponse; + }; +}; + +/** + * Contains response data for the exportMethod operation. + */ +export type DatabasesExportMethodResponse = ImportExportResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ImportExportResponse; + }; +}; + +/** + * Contains response data for the listMetrics operation. + */ +export type DatabasesListMetricsResponse = MetricListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: MetricListResult; + }; +}; + +/** + * Contains response data for the listMetricDefinitions operation. + */ +export type DatabasesListMetricDefinitionsResponse = MetricDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: MetricDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type DatabasesListByServerResponse = DatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DatabasesGetResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DatabasesCreateOrUpdateResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type DatabasesUpdateResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the listByElasticPool operation. + */ +export type DatabasesListByElasticPoolResponse = DatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseListResult; + }; +}; + +/** + * Contains response data for the pause operation. + */ +export type DatabasesPauseResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the resume operation. + */ +export type DatabasesResumeResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the beginImportMethod operation. + */ +export type DatabasesBeginImportMethodResponse = ImportExportResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ImportExportResponse; + }; +}; + +/** + * Contains response data for the beginCreateImportOperation operation. + */ +export type DatabasesBeginCreateImportOperationResponse = ImportExportResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ImportExportResponse; + }; +}; + +/** + * Contains response data for the beginExportMethod operation. + */ +export type DatabasesBeginExportMethodResponse = ImportExportResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ImportExportResponse; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type DatabasesBeginCreateOrUpdateResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type DatabasesBeginUpdateResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the beginPause operation. + */ +export type DatabasesBeginPauseResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the beginResume operation. + */ +export type DatabasesBeginResumeResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type DatabasesListByServerNextResponse = DatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseListResult; + }; +}; + +/** + * Contains response data for the listByElasticPoolNext operation. + */ +export type DatabasesListByElasticPoolNextResponse = DatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseListResult; + }; +}; + +/** + * Contains response data for the listMetrics operation. + */ +export type ElasticPoolsListMetricsResponse = MetricListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: MetricListResult; + }; +}; + +/** + * Contains response data for the listMetricDefinitions operation. + */ +export type ElasticPoolsListMetricDefinitionsResponse = MetricDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: MetricDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ElasticPoolsListByServerResponse = ElasticPoolListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPoolListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ElasticPoolsGetResponse = ElasticPool & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPool; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ElasticPoolsCreateOrUpdateResponse = ElasticPool & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPool; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ElasticPoolsUpdateResponse = ElasticPool & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPool; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ElasticPoolsBeginCreateOrUpdateResponse = ElasticPool & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPool; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ElasticPoolsBeginUpdateResponse = ElasticPool & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPool; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type ElasticPoolsListByServerNextResponse = ElasticPoolListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPoolListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RecommendedElasticPoolsGetResponse = RecommendedElasticPool & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RecommendedElasticPool; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type RecommendedElasticPoolsListByServerResponse = RecommendedElasticPoolListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RecommendedElasticPoolListResult; + }; +}; + +/** + * Contains response data for the listMetrics operation. + */ +export type RecommendedElasticPoolsListMetricsResponse = RecommendedElasticPoolListMetricsResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RecommendedElasticPoolListMetricsResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ReplicationLinksGetResponse = ReplicationLink & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReplicationLink; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type ReplicationLinksListByDatabaseResponse = ReplicationLinkListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReplicationLinkListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerAzureADAdministratorsCreateOrUpdateResponse = ServerAzureADAdministrator & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAzureADAdministrator; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type ServerAzureADAdministratorsDeleteMethodResponse = ServerAzureADAdministrator & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAzureADAdministrator; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerAzureADAdministratorsGetResponse = ServerAzureADAdministrator & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAzureADAdministrator; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ServerAzureADAdministratorsListByServerResponse = ServerAdministratorListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAdministratorListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServerAzureADAdministratorsBeginCreateOrUpdateResponse = ServerAzureADAdministrator & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAzureADAdministrator; + }; +}; + +/** + * Contains response data for the beginDeleteMethod operation. + */ +export type ServerAzureADAdministratorsBeginDeleteMethodResponse = ServerAzureADAdministrator & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAzureADAdministrator; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerCommunicationLinksGetResponse = ServerCommunicationLink & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerCommunicationLink; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerCommunicationLinksCreateOrUpdateResponse = ServerCommunicationLink & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerCommunicationLink; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ServerCommunicationLinksListByServerResponse = ServerCommunicationLinkListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerCommunicationLinkListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServerCommunicationLinksBeginCreateOrUpdateResponse = ServerCommunicationLink & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerCommunicationLink; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServiceObjectivesGetResponse = ServiceObjective & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceObjective; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ServiceObjectivesListByServerResponse = ServiceObjectiveListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceObjectiveListResult; + }; +}; + +/** + * Contains response data for the listByElasticPool operation. + */ +export type ElasticPoolActivitiesListByElasticPoolResponse = ElasticPoolActivityListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPoolActivityListResult; + }; +}; + +/** + * Contains response data for the listByElasticPool operation. + */ +export type ElasticPoolDatabaseActivitiesListByElasticPoolResponse = ElasticPoolDatabaseActivityListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPoolDatabaseActivityListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServiceTierAdvisorsGetResponse = ServiceTierAdvisor & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceTierAdvisor; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type ServiceTierAdvisorsListByDatabaseResponse = ServiceTierAdvisorListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceTierAdvisorListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type TransparentDataEncryptionsCreateOrUpdateResponse = TransparentDataEncryption & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransparentDataEncryption; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type TransparentDataEncryptionsGetResponse = TransparentDataEncryption & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransparentDataEncryption; + }; +}; + +/** + * Contains response data for the listByConfiguration operation. + */ +export type TransparentDataEncryptionActivitiesListByConfigurationResponse = TransparentDataEncryptionActivityListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransparentDataEncryptionActivityListResult; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ServerUsagesListByServerResponse = ServerUsageListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerUsageListResult; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type DatabaseUsagesListByDatabaseResponse = DatabaseUsageListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseUsageListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DatabaseAutomaticTuningGetResponse = DatabaseAutomaticTuning & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseAutomaticTuning; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type DatabaseAutomaticTuningUpdateResponse = DatabaseAutomaticTuning & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseAutomaticTuning; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type EncryptionProtectorsListByServerResponse = EncryptionProtectorListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EncryptionProtectorListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type EncryptionProtectorsGetResponse = EncryptionProtector & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EncryptionProtector; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type EncryptionProtectorsCreateOrUpdateResponse = EncryptionProtector & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EncryptionProtector; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type EncryptionProtectorsBeginCreateOrUpdateResponse = EncryptionProtector & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EncryptionProtector; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type EncryptionProtectorsListByServerNextResponse = EncryptionProtectorListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EncryptionProtectorListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type FailoverGroupsGetResponse = FailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroup; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type FailoverGroupsCreateOrUpdateResponse = FailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroup; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type FailoverGroupsUpdateResponse = FailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroup; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type FailoverGroupsListByServerResponse = FailoverGroupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroupListResult; + }; +}; + +/** + * Contains response data for the failover operation. + */ +export type FailoverGroupsFailoverResponse = FailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroup; + }; +}; + +/** + * Contains response data for the forceFailoverAllowDataLoss operation. + */ +export type FailoverGroupsForceFailoverAllowDataLossResponse = FailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroup; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type FailoverGroupsBeginCreateOrUpdateResponse = FailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroup; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type FailoverGroupsBeginUpdateResponse = FailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroup; + }; +}; + +/** + * Contains response data for the beginFailover operation. + */ +export type FailoverGroupsBeginFailoverResponse = FailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroup; + }; +}; + +/** + * Contains response data for the beginForceFailoverAllowDataLoss operation. + */ +export type FailoverGroupsBeginForceFailoverAllowDataLossResponse = FailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroup; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type FailoverGroupsListByServerNextResponse = FailoverGroupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FailoverGroupListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ManagedInstancesListResponse = ManagedInstanceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ManagedInstancesListByResourceGroupResponse = ManagedInstanceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedInstancesGetResponse = ManagedInstance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstance; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedInstancesCreateOrUpdateResponse = ManagedInstance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstance; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ManagedInstancesUpdateResponse = ManagedInstance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstance; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ManagedInstancesBeginCreateOrUpdateResponse = ManagedInstance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstance; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ManagedInstancesBeginUpdateResponse = ManagedInstance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstance; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ManagedInstancesListNextResponse = ManagedInstanceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ManagedInstancesListByResourceGroupNextResponse = ManagedInstanceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ServerKeysListByServerResponse = ServerKeyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerKeyListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerKeysGetResponse = ServerKey & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerKey; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerKeysCreateOrUpdateResponse = ServerKey & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerKey; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServerKeysBeginCreateOrUpdateResponse = ServerKey & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerKey; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type ServerKeysListByServerNextResponse = ServerKeyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerKeyListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SyncAgentsGetResponse = SyncAgent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncAgent; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type SyncAgentsCreateOrUpdateResponse = SyncAgent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncAgent; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type SyncAgentsListByServerResponse = SyncAgentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncAgentListResult; + }; +}; + +/** + * Contains response data for the generateKey operation. + */ +export type SyncAgentsGenerateKeyResponse = SyncAgentKeyProperties & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncAgentKeyProperties; + }; +}; + +/** + * Contains response data for the listLinkedDatabases operation. + */ +export type SyncAgentsListLinkedDatabasesResponse = SyncAgentLinkedDatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncAgentLinkedDatabaseListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type SyncAgentsBeginCreateOrUpdateResponse = SyncAgent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncAgent; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type SyncAgentsListByServerNextResponse = SyncAgentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncAgentListResult; + }; +}; + +/** + * Contains response data for the listLinkedDatabasesNext operation. + */ +export type SyncAgentsListLinkedDatabasesNextResponse = SyncAgentLinkedDatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncAgentLinkedDatabaseListResult; + }; +}; + +/** + * Contains response data for the listSyncDatabaseIds operation. + */ +export type SyncGroupsListSyncDatabaseIdsResponse = SyncDatabaseIdListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncDatabaseIdListResult; + }; +}; + +/** + * Contains response data for the listHubSchemas operation. + */ +export type SyncGroupsListHubSchemasResponse = SyncFullSchemaPropertiesListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncFullSchemaPropertiesListResult; + }; +}; + +/** + * Contains response data for the listLogs operation. + */ +export type SyncGroupsListLogsResponse = SyncGroupLogListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncGroupLogListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SyncGroupsGetResponse = SyncGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncGroup; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type SyncGroupsCreateOrUpdateResponse = SyncGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncGroup; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type SyncGroupsUpdateResponse = SyncGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncGroup; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type SyncGroupsListByDatabaseResponse = SyncGroupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncGroupListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type SyncGroupsBeginCreateOrUpdateResponse = SyncGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncGroup; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type SyncGroupsBeginUpdateResponse = SyncGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncGroup; + }; +}; + +/** + * Contains response data for the listSyncDatabaseIdsNext operation. + */ +export type SyncGroupsListSyncDatabaseIdsNextResponse = SyncDatabaseIdListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncDatabaseIdListResult; + }; +}; + +/** + * Contains response data for the listHubSchemasNext operation. + */ +export type SyncGroupsListHubSchemasNextResponse = SyncFullSchemaPropertiesListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncFullSchemaPropertiesListResult; + }; +}; + +/** + * Contains response data for the listLogsNext operation. + */ +export type SyncGroupsListLogsNextResponse = SyncGroupLogListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncGroupLogListResult; + }; +}; + +/** + * Contains response data for the listByDatabaseNext operation. + */ +export type SyncGroupsListByDatabaseNextResponse = SyncGroupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncGroupListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SyncMembersGetResponse = SyncMember & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncMember; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type SyncMembersCreateOrUpdateResponse = SyncMember & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncMember; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type SyncMembersUpdateResponse = SyncMember & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncMember; + }; +}; + +/** + * Contains response data for the listBySyncGroup operation. + */ +export type SyncMembersListBySyncGroupResponse = SyncMemberListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncMemberListResult; + }; +}; + +/** + * Contains response data for the listMemberSchemas operation. + */ +export type SyncMembersListMemberSchemasResponse = SyncFullSchemaPropertiesListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncFullSchemaPropertiesListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type SyncMembersBeginCreateOrUpdateResponse = SyncMember & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncMember; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type SyncMembersBeginUpdateResponse = SyncMember & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncMember; + }; +}; + +/** + * Contains response data for the listBySyncGroupNext operation. + */ +export type SyncMembersListBySyncGroupNextResponse = SyncMemberListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncMemberListResult; + }; +}; + +/** + * Contains response data for the listMemberSchemasNext operation. + */ +export type SyncMembersListMemberSchemasNextResponse = SyncFullSchemaPropertiesListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SyncFullSchemaPropertiesListResult; + }; +}; + +/** + * Contains response data for the listByLocation operation. + */ +export type SubscriptionUsagesListByLocationResponse = SubscriptionUsageListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SubscriptionUsageListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SubscriptionUsagesGetResponse = SubscriptionUsage & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SubscriptionUsage; + }; +}; + +/** + * Contains response data for the listByLocationNext operation. + */ +export type SubscriptionUsagesListByLocationNextResponse = SubscriptionUsageListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SubscriptionUsageListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type VirtualClustersListResponse = VirtualClusterListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualClusterListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type VirtualClustersListByResourceGroupResponse = VirtualClusterListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualClusterListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VirtualClustersGetResponse = VirtualCluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualCluster; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type VirtualClustersUpdateResponse = VirtualCluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualCluster; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type VirtualClustersBeginUpdateResponse = VirtualCluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualCluster; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type VirtualClustersListNextResponse = VirtualClusterListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualClusterListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type VirtualClustersListByResourceGroupNextResponse = VirtualClusterListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualClusterListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VirtualNetworkRulesGetResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRuleListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type VirtualNetworkRulesBeginCreateOrUpdateResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type VirtualNetworkRulesListByServerNextResponse = VirtualNetworkRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRuleListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ExtendedDatabaseBlobAuditingPoliciesGetResponse = ExtendedDatabaseBlobAuditingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExtendedDatabaseBlobAuditingPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateResponse = ExtendedDatabaseBlobAuditingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExtendedDatabaseBlobAuditingPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ExtendedServerBlobAuditingPoliciesGetResponse = ExtendedServerBlobAuditingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExtendedServerBlobAuditingPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ExtendedServerBlobAuditingPoliciesCreateOrUpdateResponse = ExtendedServerBlobAuditingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExtendedServerBlobAuditingPolicy; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ExtendedServerBlobAuditingPoliciesBeginCreateOrUpdateResponse = ExtendedServerBlobAuditingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExtendedServerBlobAuditingPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerBlobAuditingPoliciesGetResponse = ServerBlobAuditingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerBlobAuditingPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerBlobAuditingPoliciesCreateOrUpdateResponse = ServerBlobAuditingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerBlobAuditingPolicy; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServerBlobAuditingPoliciesBeginCreateOrUpdateResponse = ServerBlobAuditingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerBlobAuditingPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DatabaseBlobAuditingPoliciesGetResponse = DatabaseBlobAuditingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseBlobAuditingPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DatabaseBlobAuditingPoliciesCreateOrUpdateResponse = DatabaseBlobAuditingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseBlobAuditingPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DatabaseVulnerabilityAssessmentRuleBaselinesGetResponse = DatabaseVulnerabilityAssessmentRuleBaseline & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessmentRuleBaseline; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse = DatabaseVulnerabilityAssessmentRuleBaseline & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessmentRuleBaseline; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DatabaseVulnerabilityAssessmentsGetResponse = DatabaseVulnerabilityAssessment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessment; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DatabaseVulnerabilityAssessmentsCreateOrUpdateResponse = DatabaseVulnerabilityAssessment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessment; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type DatabaseVulnerabilityAssessmentsListByDatabaseResponse = DatabaseVulnerabilityAssessmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessmentListResult; + }; +}; + +/** + * Contains response data for the listByDatabaseNext operation. + */ +export type DatabaseVulnerabilityAssessmentsListByDatabaseNextResponse = DatabaseVulnerabilityAssessmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessmentListResult; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type JobAgentsListByServerResponse = JobAgentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobAgentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobAgentsGetResponse = JobAgent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobAgent; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type JobAgentsCreateOrUpdateResponse = JobAgent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobAgent; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type JobAgentsUpdateResponse = JobAgent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobAgent; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type JobAgentsBeginCreateOrUpdateResponse = JobAgent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobAgent; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type JobAgentsBeginUpdateResponse = JobAgent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobAgent; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type JobAgentsListByServerNextResponse = JobAgentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobAgentListResult; + }; +}; + +/** + * Contains response data for the listByAgent operation. + */ +export type JobCredentialsListByAgentResponse = JobCredentialListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobCredentialListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobCredentialsGetResponse = JobCredential & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobCredential; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type JobCredentialsCreateOrUpdateResponse = JobCredential & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobCredential; + }; +}; + +/** + * Contains response data for the listByAgentNext operation. + */ +export type JobCredentialsListByAgentNextResponse = JobCredentialListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobCredentialListResult; + }; +}; + +/** + * Contains response data for the listByAgent operation. + */ +export type JobExecutionsListByAgentResponse = JobExecutionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecutionListResult; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type JobExecutionsCreateResponse = JobExecution & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecution; + }; +}; + +/** + * Contains response data for the listByJob operation. + */ +export type JobExecutionsListByJobResponse = JobExecutionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecutionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobExecutionsGetResponse = JobExecution & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecution; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type JobExecutionsCreateOrUpdateResponse = JobExecution & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecution; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type JobExecutionsBeginCreateResponse = JobExecution & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecution; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type JobExecutionsBeginCreateOrUpdateResponse = JobExecution & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecution; + }; +}; + +/** + * Contains response data for the listByAgentNext operation. + */ +export type JobExecutionsListByAgentNextResponse = JobExecutionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecutionListResult; + }; +}; + +/** + * Contains response data for the listByJobNext operation. + */ +export type JobExecutionsListByJobNextResponse = JobExecutionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecutionListResult; + }; +}; + +/** + * Contains response data for the listByAgent operation. + */ +export type JobsListByAgentResponse = JobListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobsGetResponse = Job & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Job; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type JobsCreateOrUpdateResponse = Job & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Job; + }; +}; + +/** + * Contains response data for the listByAgentNext operation. + */ +export type JobsListByAgentNextResponse = JobListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobListResult; + }; +}; + +/** + * Contains response data for the listByJobExecution operation. + */ +export type JobStepExecutionsListByJobExecutionResponse = JobExecutionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecutionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobStepExecutionsGetResponse = JobExecution & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecution; + }; +}; + +/** + * Contains response data for the listByJobExecutionNext operation. + */ +export type JobStepExecutionsListByJobExecutionNextResponse = JobExecutionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecutionListResult; + }; +}; + +/** + * Contains response data for the listByVersion operation. + */ +export type JobStepsListByVersionResponse = JobStepListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobStepListResult; + }; +}; + +/** + * Contains response data for the getByVersion operation. + */ +export type JobStepsGetByVersionResponse = JobStep & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobStep; + }; +}; + +/** + * Contains response data for the listByJob operation. + */ +export type JobStepsListByJobResponse = JobStepListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobStepListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobStepsGetResponse = JobStep & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobStep; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type JobStepsCreateOrUpdateResponse = JobStep & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobStep; + }; +}; + +/** + * Contains response data for the listByVersionNext operation. + */ +export type JobStepsListByVersionNextResponse = JobStepListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobStepListResult; + }; +}; + +/** + * Contains response data for the listByJobNext operation. + */ +export type JobStepsListByJobNextResponse = JobStepListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobStepListResult; + }; +}; + +/** + * Contains response data for the listByJobExecution operation. + */ +export type JobTargetExecutionsListByJobExecutionResponse = JobExecutionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecutionListResult; + }; +}; + +/** + * Contains response data for the listByStep operation. + */ +export type JobTargetExecutionsListByStepResponse = JobExecutionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecutionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobTargetExecutionsGetResponse = JobExecution & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecution; + }; +}; + +/** + * Contains response data for the listByJobExecutionNext operation. + */ +export type JobTargetExecutionsListByJobExecutionNextResponse = JobExecutionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecutionListResult; + }; +}; + +/** + * Contains response data for the listByStepNext operation. + */ +export type JobTargetExecutionsListByStepNextResponse = JobExecutionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobExecutionListResult; + }; +}; + +/** + * Contains response data for the listByAgent operation. + */ +export type JobTargetGroupsListByAgentResponse = JobTargetGroupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobTargetGroupListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobTargetGroupsGetResponse = JobTargetGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobTargetGroup; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type JobTargetGroupsCreateOrUpdateResponse = JobTargetGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobTargetGroup; + }; +}; + +/** + * Contains response data for the listByAgentNext operation. + */ +export type JobTargetGroupsListByAgentNextResponse = JobTargetGroupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobTargetGroupListResult; + }; +}; + +/** + * Contains response data for the listByJob operation. + */ +export type JobVersionsListByJobResponse = JobVersionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobVersionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobVersionsGetResponse = JobVersion & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobVersion; + }; +}; + +/** + * Contains response data for the listByJobNext operation. + */ +export type JobVersionsListByJobNextResponse = JobVersionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobVersionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type LongTermRetentionBackupsGetResponse = LongTermRetentionBackup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LongTermRetentionBackup; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type LongTermRetentionBackupsListByDatabaseResponse = LongTermRetentionBackupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LongTermRetentionBackupListResult; + }; +}; + +/** + * Contains response data for the listByLocation operation. + */ +export type LongTermRetentionBackupsListByLocationResponse = LongTermRetentionBackupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LongTermRetentionBackupListResult; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type LongTermRetentionBackupsListByServerResponse = LongTermRetentionBackupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LongTermRetentionBackupListResult; + }; +}; + +/** + * Contains response data for the listByDatabaseNext operation. + */ +export type LongTermRetentionBackupsListByDatabaseNextResponse = LongTermRetentionBackupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LongTermRetentionBackupListResult; + }; +}; + +/** + * Contains response data for the listByLocationNext operation. + */ +export type LongTermRetentionBackupsListByLocationNextResponse = LongTermRetentionBackupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LongTermRetentionBackupListResult; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type LongTermRetentionBackupsListByServerNextResponse = LongTermRetentionBackupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LongTermRetentionBackupListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BackupLongTermRetentionPoliciesGetResponse = BackupLongTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupLongTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type BackupLongTermRetentionPoliciesCreateOrUpdateResponse = BackupLongTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupLongTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type BackupLongTermRetentionPoliciesListByDatabaseResponse = BackupLongTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupLongTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type BackupLongTermRetentionPoliciesBeginCreateOrUpdateResponse = BackupLongTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupLongTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedBackupShortTermRetentionPoliciesGetResponse = ManagedBackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedBackupShortTermRetentionPoliciesCreateOrUpdateResponse = ManagedBackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ManagedBackupShortTermRetentionPoliciesUpdateResponse = ManagedBackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type ManagedBackupShortTermRetentionPoliciesListByDatabaseResponse = ManagedBackupShortTermRetentionPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicyListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ManagedBackupShortTermRetentionPoliciesBeginCreateOrUpdateResponse = ManagedBackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ManagedBackupShortTermRetentionPoliciesBeginUpdateResponse = ManagedBackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the listByDatabaseNext operation. + */ +export type ManagedBackupShortTermRetentionPoliciesListByDatabaseNextResponse = ManagedBackupShortTermRetentionPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicyListResult; + }; +}; + +/** + * Contains response data for the listByInstance operation. + */ +export type ManagedDatabasesListByInstanceResponse = ManagedDatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabaseListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedDatabasesGetResponse = ManagedDatabase & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabase; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedDatabasesCreateOrUpdateResponse = ManagedDatabase & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabase; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ManagedDatabasesUpdateResponse = ManagedDatabase & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabase; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ManagedDatabasesBeginCreateOrUpdateResponse = ManagedDatabase & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabase; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ManagedDatabasesBeginUpdateResponse = ManagedDatabase & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabase; + }; +}; + +/** + * Contains response data for the listByInstanceNext operation. + */ +export type ManagedDatabasesListByInstanceNextResponse = ManagedDatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabaseListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetResponse = ManagedBackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateResponse = ManagedBackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateResponse = ManagedBackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the listByRestorableDroppedDatabase operation. + */ +export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseResponse = ManagedBackupShortTermRetentionPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicyListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesBeginCreateOrUpdateResponse = ManagedBackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesBeginUpdateResponse = ManagedBackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the listByRestorableDroppedDatabaseNext operation. + */ +export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseNextResponse = ManagedBackupShortTermRetentionPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedBackupShortTermRetentionPolicyListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerAutomaticTuningGetResponse = ServerAutomaticTuning & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAutomaticTuning; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ServerAutomaticTuningUpdateResponse = ServerAutomaticTuning & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAutomaticTuning; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerDnsAliasesGetResponse = ServerDnsAlias & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerDnsAlias; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerDnsAliasesCreateOrUpdateResponse = ServerDnsAlias & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerDnsAlias; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ServerDnsAliasesListByServerResponse = ServerDnsAliasListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerDnsAliasListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServerDnsAliasesBeginCreateOrUpdateResponse = ServerDnsAlias & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerDnsAlias; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type ServerDnsAliasesListByServerNextResponse = ServerDnsAliasListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerDnsAliasListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ServerSecurityAlertPoliciesListByServerResponse = LogicalServerSecurityAlertPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LogicalServerSecurityAlertPolicyListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type ServerSecurityAlertPoliciesListByServerNextResponse = LogicalServerSecurityAlertPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LogicalServerSecurityAlertPolicyListResult; + }; +}; + +/** + * Contains response data for the listByInstance operation. + */ +export type RestorableDroppedManagedDatabasesListByInstanceResponse = RestorableDroppedManagedDatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RestorableDroppedManagedDatabaseListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RestorableDroppedManagedDatabasesGetResponse = RestorableDroppedManagedDatabase & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RestorableDroppedManagedDatabase; + }; +}; + +/** + * Contains response data for the listByInstanceNext operation. + */ +export type RestorableDroppedManagedDatabasesListByInstanceNextResponse = RestorableDroppedManagedDatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RestorableDroppedManagedDatabaseListResult; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type RestorePointsListByDatabaseResponse = RestorePointListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RestorePointListResult; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type RestorePointsCreateResponse = RestorePoint & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RestorePoint; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RestorePointsGetResponse = RestorePoint & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RestorePoint; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type RestorePointsBeginCreateResponse = RestorePoint & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RestorePoint; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedDatabaseSecurityAlertPoliciesGetResponse = ManagedDatabaseSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabaseSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateResponse = ManagedDatabaseSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabaseSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type ManagedDatabaseSecurityAlertPoliciesListByDatabaseResponse = ManagedDatabaseSecurityAlertPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabaseSecurityAlertPolicyListResult; + }; +}; + +/** + * Contains response data for the listByDatabaseNext operation. + */ +export type ManagedDatabaseSecurityAlertPoliciesListByDatabaseNextResponse = ManagedDatabaseSecurityAlertPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedDatabaseSecurityAlertPolicyListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedServerSecurityAlertPoliciesGetResponse = ManagedServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedServerSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedServerSecurityAlertPoliciesCreateOrUpdateResponse = ManagedServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedServerSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the listByInstance operation. + */ +export type ManagedServerSecurityAlertPoliciesListByInstanceResponse = ManagedServerSecurityAlertPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedServerSecurityAlertPolicyListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ManagedServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ManagedServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedServerSecurityAlertPolicy; + }; +}; + +/** + * Contains response data for the listByInstanceNext operation. + */ +export type ManagedServerSecurityAlertPoliciesListByInstanceNextResponse = ManagedServerSecurityAlertPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedServerSecurityAlertPolicyListResult; + }; +}; + +/** + * Contains response data for the listCurrentByDatabase operation. + */ +export type SensitivityLabelsListCurrentByDatabaseResponse = SensitivityLabelListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabelListResult; + }; +}; + +/** + * Contains response data for the listRecommendedByDatabase operation. + */ +export type SensitivityLabelsListRecommendedByDatabaseResponse = SensitivityLabelListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabelListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SensitivityLabelsGetResponse = SensitivityLabel & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabel; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type SensitivityLabelsCreateOrUpdateResponse = SensitivityLabel & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabel; + }; +}; + +/** + * Contains response data for the listCurrentByDatabaseNext operation. + */ +export type SensitivityLabelsListCurrentByDatabaseNextResponse = SensitivityLabelListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabelListResult; + }; +}; + +/** + * Contains response data for the listRecommendedByDatabaseNext operation. + */ +export type SensitivityLabelsListRecommendedByDatabaseNextResponse = SensitivityLabelListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabelListResult; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type DatabaseOperationsListByDatabaseResponse = DatabaseOperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseOperationListResult; + }; +}; + +/** + * Contains response data for the listByDatabaseNext operation. + */ +export type DatabaseOperationsListByDatabaseNextResponse = DatabaseOperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseOperationListResult; + }; +}; + +/** + * Contains response data for the listByElasticPool operation. + */ +export type ElasticPoolOperationsListByElasticPoolResponse = ElasticPoolOperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPoolOperationListResult; + }; +}; + +/** + * Contains response data for the listByElasticPoolNext operation. + */ +export type ElasticPoolOperationsListByElasticPoolNextResponse = ElasticPoolOperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ElasticPoolOperationListResult; + }; +}; + +/** + * Contains response data for the listByLocation operation. + */ +export type CapabilitiesListByLocationResponse = LocationCapabilities & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LocationCapabilities; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type DatabaseVulnerabilityAssessmentScansListByDatabaseResponse = VulnerabilityAssessmentScanRecordListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VulnerabilityAssessmentScanRecordListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DatabaseVulnerabilityAssessmentScansGetResponse = VulnerabilityAssessmentScanRecord & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VulnerabilityAssessmentScanRecord; + }; +}; + +/** + * Contains response data for the exportMethod operation. + */ +export type DatabaseVulnerabilityAssessmentScansExportMethodResponse = DatabaseVulnerabilityAssessmentScansExport & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessmentScansExport; + }; +}; + +/** + * Contains response data for the listByDatabaseNext operation. + */ +export type DatabaseVulnerabilityAssessmentScansListByDatabaseNextResponse = VulnerabilityAssessmentScanRecordListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VulnerabilityAssessmentScanRecordListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetResponse = DatabaseVulnerabilityAssessmentRuleBaseline & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessmentRuleBaseline; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse = DatabaseVulnerabilityAssessmentRuleBaseline & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessmentRuleBaseline; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseResponse = VulnerabilityAssessmentScanRecordListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VulnerabilityAssessmentScanRecordListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedDatabaseVulnerabilityAssessmentScansGetResponse = VulnerabilityAssessmentScanRecord & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VulnerabilityAssessmentScanRecord; + }; +}; + +/** + * Contains response data for the exportMethod operation. + */ +export type ManagedDatabaseVulnerabilityAssessmentScansExportMethodResponse = DatabaseVulnerabilityAssessmentScansExport & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessmentScansExport; + }; +}; + +/** + * Contains response data for the listByDatabaseNext operation. + */ +export type ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseNextResponse = VulnerabilityAssessmentScanRecordListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: VulnerabilityAssessmentScanRecordListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedDatabaseVulnerabilityAssessmentsGetResponse = DatabaseVulnerabilityAssessment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessment; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateResponse = DatabaseVulnerabilityAssessment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessment; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type ManagedDatabaseVulnerabilityAssessmentsListByDatabaseResponse = DatabaseVulnerabilityAssessmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessmentListResult; + }; +}; + +/** + * Contains response data for the listByDatabaseNext operation. + */ +export type ManagedDatabaseVulnerabilityAssessmentsListByDatabaseNextResponse = DatabaseVulnerabilityAssessmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseVulnerabilityAssessmentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InstanceFailoverGroupsGetResponse = InstanceFailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstanceFailoverGroup; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type InstanceFailoverGroupsCreateOrUpdateResponse = InstanceFailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstanceFailoverGroup; + }; +}; + +/** + * Contains response data for the listByLocation operation. + */ +export type InstanceFailoverGroupsListByLocationResponse = InstanceFailoverGroupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstanceFailoverGroupListResult; + }; +}; + +/** + * Contains response data for the failover operation. + */ +export type InstanceFailoverGroupsFailoverResponse = InstanceFailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstanceFailoverGroup; + }; +}; + +/** + * Contains response data for the forceFailoverAllowDataLoss operation. + */ +export type InstanceFailoverGroupsForceFailoverAllowDataLossResponse = InstanceFailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstanceFailoverGroup; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type InstanceFailoverGroupsBeginCreateOrUpdateResponse = InstanceFailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstanceFailoverGroup; + }; +}; + +/** + * Contains response data for the beginFailover operation. + */ +export type InstanceFailoverGroupsBeginFailoverResponse = InstanceFailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstanceFailoverGroup; + }; +}; + +/** + * Contains response data for the beginForceFailoverAllowDataLoss operation. + */ +export type InstanceFailoverGroupsBeginForceFailoverAllowDataLossResponse = InstanceFailoverGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstanceFailoverGroup; + }; +}; + +/** + * Contains response data for the listByLocationNext operation. + */ +export type InstanceFailoverGroupsListByLocationNextResponse = InstanceFailoverGroupListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstanceFailoverGroupListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BackupShortTermRetentionPoliciesGetResponse = BackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type BackupShortTermRetentionPoliciesCreateOrUpdateResponse = BackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type BackupShortTermRetentionPoliciesUpdateResponse = BackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the listByDatabase operation. + */ +export type BackupShortTermRetentionPoliciesListByDatabaseResponse = BackupShortTermRetentionPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupShortTermRetentionPolicyListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type BackupShortTermRetentionPoliciesBeginCreateOrUpdateResponse = BackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type BackupShortTermRetentionPoliciesBeginUpdateResponse = BackupShortTermRetentionPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupShortTermRetentionPolicy; + }; +}; + +/** + * Contains response data for the listByDatabaseNext operation. + */ +export type BackupShortTermRetentionPoliciesListByDatabaseNextResponse = BackupShortTermRetentionPolicyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BackupShortTermRetentionPolicyListResult; + }; +}; + +/** + * Contains response data for the listByInstance operation. + */ +export type ManagedInstanceKeysListByInstanceResponse = ManagedInstanceKeyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceKeyListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedInstanceKeysGetResponse = ManagedInstanceKey & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceKey; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedInstanceKeysCreateOrUpdateResponse = ManagedInstanceKey & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceKey; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ManagedInstanceKeysBeginCreateOrUpdateResponse = ManagedInstanceKey & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceKey; + }; +}; + +/** + * Contains response data for the listByInstanceNext operation. + */ +export type ManagedInstanceKeysListByInstanceNextResponse = ManagedInstanceKeyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceKeyListResult; + }; +}; + +/** + * Contains response data for the listByInstance operation. + */ +export type ManagedInstanceEncryptionProtectorsListByInstanceResponse = ManagedInstanceEncryptionProtectorListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceEncryptionProtectorListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedInstanceEncryptionProtectorsGetResponse = ManagedInstanceEncryptionProtector & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceEncryptionProtector; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedInstanceEncryptionProtectorsCreateOrUpdateResponse = ManagedInstanceEncryptionProtector & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceEncryptionProtector; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ManagedInstanceEncryptionProtectorsBeginCreateOrUpdateResponse = ManagedInstanceEncryptionProtector & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceEncryptionProtector; + }; +}; + +/** + * Contains response data for the listByInstanceNext operation. + */ +export type ManagedInstanceEncryptionProtectorsListByInstanceNextResponse = ManagedInstanceEncryptionProtectorListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceEncryptionProtectorListResult; + }; +}; + +/** + * Contains response data for the listByInstance operation. + */ +export type RecoverableManagedDatabasesListByInstanceResponse = RecoverableManagedDatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RecoverableManagedDatabaseListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RecoverableManagedDatabasesGetResponse = RecoverableManagedDatabase & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RecoverableManagedDatabase; + }; +}; + +/** + * Contains response data for the listByInstanceNext operation. + */ +export type RecoverableManagedDatabasesListByInstanceNextResponse = RecoverableManagedDatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: RecoverableManagedDatabaseListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedInstanceVulnerabilityAssessmentsGetResponse = ManagedInstanceVulnerabilityAssessment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceVulnerabilityAssessment; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateResponse = ManagedInstanceVulnerabilityAssessment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceVulnerabilityAssessment; + }; +}; + +/** + * Contains response data for the listByInstance operation. + */ +export type ManagedInstanceVulnerabilityAssessmentsListByInstanceResponse = ManagedInstanceVulnerabilityAssessmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceVulnerabilityAssessmentListResult; + }; +}; + +/** + * Contains response data for the listByInstanceNext operation. + */ +export type ManagedInstanceVulnerabilityAssessmentsListByInstanceNextResponse = ManagedInstanceVulnerabilityAssessmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedInstanceVulnerabilityAssessmentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerVulnerabilityAssessmentsGetResponse = ServerVulnerabilityAssessment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerVulnerabilityAssessment; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerVulnerabilityAssessmentsCreateOrUpdateResponse = ServerVulnerabilityAssessment & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerVulnerabilityAssessment; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ServerVulnerabilityAssessmentsListByServerResponse = ServerVulnerabilityAssessmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerVulnerabilityAssessmentListResult; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type ServerVulnerabilityAssessmentsListByServerNextResponse = ServerVulnerabilityAssessmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerVulnerabilityAssessmentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedDatabaseSensitivityLabelsGetResponse = SensitivityLabel & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabel; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedDatabaseSensitivityLabelsCreateOrUpdateResponse = SensitivityLabel & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabel; + }; +}; + +/** + * Contains response data for the listCurrentByDatabase operation. + */ +export type ManagedDatabaseSensitivityLabelsListCurrentByDatabaseResponse = SensitivityLabelListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabelListResult; + }; +}; + +/** + * Contains response data for the listRecommendedByDatabase operation. + */ +export type ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseResponse = SensitivityLabelListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabelListResult; + }; +}; + +/** + * Contains response data for the listCurrentByDatabaseNext operation. + */ +export type ManagedDatabaseSensitivityLabelsListCurrentByDatabaseNextResponse = SensitivityLabelListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabelListResult; + }; +}; + +/** + * Contains response data for the listRecommendedByDatabaseNext operation. + */ +export type ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseNextResponse = SensitivityLabelListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SensitivityLabelListResult; + }; +}; diff --git a/packages/@azure/arm-sql/lib/models/instanceFailoverGroupsMappers.ts b/packages/@azure/arm-sql/lib/models/instanceFailoverGroupsMappers.ts new file mode 100644 index 000000000000..3059e05886fe --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/instanceFailoverGroupsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + InstanceFailoverGroup, + ProxyResource, + Resource, + BaseResource, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + CloudError, + InstanceFailoverGroupListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/jobAgentsMappers.ts b/packages/@azure/arm-sql/lib/models/jobAgentsMappers.ts new file mode 100644 index 000000000000..213ea3d56879 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/jobAgentsMappers.ts @@ -0,0 +1,119 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + JobAgentListResult, + JobAgent, + TrackedResource, + Resource, + BaseResource, + Sku, + CloudError, + JobAgentUpdate, + ProxyResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment, + RecoverableDatabase, + RestorableDroppedDatabase +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/jobCredentialsMappers.ts b/packages/@azure/arm-sql/lib/models/jobCredentialsMappers.ts new file mode 100644 index 000000000000..96c1ea8c8ca6 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/jobCredentialsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + JobCredentialListResult, + JobCredential, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/jobExecutionsMappers.ts b/packages/@azure/arm-sql/lib/models/jobExecutionsMappers.ts new file mode 100644 index 000000000000..09748d530070 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/jobExecutionsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + JobExecutionListResult, + JobExecution, + ProxyResource, + Resource, + BaseResource, + JobExecutionTarget, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/jobStepExecutionsMappers.ts b/packages/@azure/arm-sql/lib/models/jobStepExecutionsMappers.ts new file mode 100644 index 000000000000..09748d530070 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/jobStepExecutionsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + JobExecutionListResult, + JobExecution, + ProxyResource, + Resource, + BaseResource, + JobExecutionTarget, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/jobStepsMappers.ts b/packages/@azure/arm-sql/lib/models/jobStepsMappers.ts new file mode 100644 index 000000000000..aa7d1d31d347 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/jobStepsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + JobStepListResult, + JobStep, + ProxyResource, + Resource, + BaseResource, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/jobTargetExecutionsMappers.ts b/packages/@azure/arm-sql/lib/models/jobTargetExecutionsMappers.ts new file mode 100644 index 000000000000..09748d530070 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/jobTargetExecutionsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + JobExecutionListResult, + JobExecution, + ProxyResource, + Resource, + BaseResource, + JobExecutionTarget, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/jobTargetGroupsMappers.ts b/packages/@azure/arm-sql/lib/models/jobTargetGroupsMappers.ts new file mode 100644 index 000000000000..2761e8d82439 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/jobTargetGroupsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + JobTargetGroupListResult, + JobTargetGroup, + ProxyResource, + Resource, + BaseResource, + JobTarget, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/jobVersionsMappers.ts b/packages/@azure/arm-sql/lib/models/jobVersionsMappers.ts new file mode 100644 index 000000000000..c8c94c04adad --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/jobVersionsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + JobVersionListResult, + JobVersion, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/jobsMappers.ts b/packages/@azure/arm-sql/lib/models/jobsMappers.ts new file mode 100644 index 000000000000..ea204984b318 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/jobsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + JobListResult, + Job, + ProxyResource, + Resource, + BaseResource, + JobSchedule, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/longTermRetentionBackupsMappers.ts b/packages/@azure/arm-sql/lib/models/longTermRetentionBackupsMappers.ts new file mode 100644 index 000000000000..2ae0a65895f3 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/longTermRetentionBackupsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + LongTermRetentionBackup, + ProxyResource, + Resource, + BaseResource, + CloudError, + LongTermRetentionBackupListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedBackupShortTermRetentionPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/managedBackupShortTermRetentionPoliciesMappers.ts new file mode 100644 index 000000000000..0d6647cc1f29 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedBackupShortTermRetentionPoliciesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ManagedBackupShortTermRetentionPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + ManagedBackupShortTermRetentionPolicyListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedDatabaseSecurityAlertPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/managedDatabaseSecurityAlertPoliciesMappers.ts new file mode 100644 index 000000000000..b6c9aa3fde19 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedDatabaseSecurityAlertPoliciesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ManagedDatabaseSecurityAlertPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + ManagedDatabaseSecurityAlertPolicyListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedDatabaseSensitivityLabelsMappers.ts b/packages/@azure/arm-sql/lib/models/managedDatabaseSensitivityLabelsMappers.ts new file mode 100644 index 000000000000..55a69b7ff73b --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedDatabaseSensitivityLabelsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + SensitivityLabel, + ProxyResource, + Resource, + BaseResource, + CloudError, + SensitivityLabelListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentRuleBaselinesMappers.ts b/packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentRuleBaselinesMappers.ts new file mode 100644 index 000000000000..8f28b6480e12 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentRuleBaselinesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DatabaseVulnerabilityAssessmentRuleBaseline, + ProxyResource, + Resource, + BaseResource, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentScansMappers.ts b/packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentScansMappers.ts new file mode 100644 index 000000000000..420534e66fae --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentScansMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + VulnerabilityAssessmentScanRecordListResult, + VulnerabilityAssessmentScanRecord, + ProxyResource, + Resource, + BaseResource, + VulnerabilityAssessmentScanError, + CloudError, + DatabaseVulnerabilityAssessmentScansExport, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentsMappers.ts b/packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentsMappers.ts new file mode 100644 index 000000000000..f012d61e782a --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedDatabaseVulnerabilityAssessmentsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + DatabaseVulnerabilityAssessment, + ProxyResource, + Resource, + BaseResource, + VulnerabilityAssessmentRecurringScansProperties, + CloudError, + DatabaseVulnerabilityAssessmentListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedDatabasesMappers.ts b/packages/@azure/arm-sql/lib/models/managedDatabasesMappers.ts new file mode 100644 index 000000000000..8ccde91b74f7 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedDatabasesMappers.ts @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + CompleteDatabaseRestoreDefinition, + CloudError, + ManagedDatabaseListResult, + ManagedDatabase, + TrackedResource, + Resource, + BaseResource, + ManagedDatabaseUpdate, + ProxyResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment, + RecoverableDatabase, + RestorableDroppedDatabase +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedInstanceEncryptionProtectorsMappers.ts b/packages/@azure/arm-sql/lib/models/managedInstanceEncryptionProtectorsMappers.ts new file mode 100644 index 000000000000..87d002f475c8 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedInstanceEncryptionProtectorsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ManagedInstanceEncryptionProtectorListResult, + ManagedInstanceEncryptionProtector, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedInstanceKeysMappers.ts b/packages/@azure/arm-sql/lib/models/managedInstanceKeysMappers.ts new file mode 100644 index 000000000000..8e51edff2434 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedInstanceKeysMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ManagedInstanceKeyListResult, + ManagedInstanceKey, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedInstanceTdeCertificatesMappers.ts b/packages/@azure/arm-sql/lib/models/managedInstanceTdeCertificatesMappers.ts new file mode 100644 index 000000000000..c944f88f0250 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedInstanceTdeCertificatesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + TdeCertificate, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedInstanceVulnerabilityAssessmentsMappers.ts b/packages/@azure/arm-sql/lib/models/managedInstanceVulnerabilityAssessmentsMappers.ts new file mode 100644 index 000000000000..631a64067e34 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedInstanceVulnerabilityAssessmentsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ManagedInstanceVulnerabilityAssessment, + ProxyResource, + Resource, + BaseResource, + VulnerabilityAssessmentRecurringScansProperties, + CloudError, + ManagedInstanceVulnerabilityAssessmentListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedInstancesMappers.ts b/packages/@azure/arm-sql/lib/models/managedInstancesMappers.ts new file mode 100644 index 000000000000..0c8dc874675e --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedInstancesMappers.ts @@ -0,0 +1,119 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ManagedInstanceListResult, + ManagedInstance, + TrackedResource, + Resource, + BaseResource, + ResourceIdentity, + Sku, + CloudError, + ManagedInstanceUpdate, + ProxyResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment, + RecoverableDatabase, + RestorableDroppedDatabase +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/managedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesMappers.ts new file mode 100644 index 000000000000..0d6647cc1f29 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ManagedBackupShortTermRetentionPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + ManagedBackupShortTermRetentionPolicyListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/managedServerSecurityAlertPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/managedServerSecurityAlertPoliciesMappers.ts new file mode 100644 index 000000000000..199dec5d152d --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/managedServerSecurityAlertPoliciesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ManagedServerSecurityAlertPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + ManagedServerSecurityAlertPolicyListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/mappers.ts b/packages/@azure/arm-sql/lib/models/mappers.ts new file mode 100644 index 000000000000..1822570b67ce --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/mappers.ts @@ -0,0 +1,9717 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const RecoverableDatabase: msRest.CompositeMapper = { + serializedName: "RecoverableDatabase", + type: { + name: "Composite", + className: "RecoverableDatabase", + modelProperties: { + ...ProxyResource.type.modelProperties, + edition: { + readOnly: true, + serializedName: "properties.edition", + type: { + name: "String" + } + }, + serviceLevelObjective: { + readOnly: true, + serializedName: "properties.serviceLevelObjective", + type: { + name: "String" + } + }, + elasticPoolName: { + readOnly: true, + serializedName: "properties.elasticPoolName", + type: { + name: "String" + } + }, + lastAvailableBackupDate: { + readOnly: true, + serializedName: "properties.lastAvailableBackupDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const RestorableDroppedDatabase: msRest.CompositeMapper = { + serializedName: "RestorableDroppedDatabase", + type: { + name: "Composite", + className: "RestorableDroppedDatabase", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + databaseName: { + readOnly: true, + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + edition: { + readOnly: true, + serializedName: "properties.edition", + type: { + name: "String" + } + }, + maxSizeBytes: { + readOnly: true, + serializedName: "properties.maxSizeBytes", + type: { + name: "String" + } + }, + serviceLevelObjective: { + readOnly: true, + serializedName: "properties.serviceLevelObjective", + type: { + name: "String" + } + }, + elasticPoolName: { + readOnly: true, + serializedName: "properties.elasticPoolName", + type: { + name: "String" + } + }, + creationDate: { + readOnly: true, + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + }, + deletionDate: { + readOnly: true, + serializedName: "properties.deletionDate", + type: { + name: "DateTime" + } + }, + earliestRestoreDate: { + readOnly: true, + serializedName: "properties.earliestRestoreDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CheckNameAvailabilityRequest: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityRequest", + type: { + name: "Composite", + className: "CheckNameAvailabilityRequest", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + required: true, + isConstant: true, + serializedName: "type", + defaultValue: 'Microsoft.Sql/servers', + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityResponse: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityResponse", + type: { + name: "Composite", + className: "CheckNameAvailabilityResponse", + modelProperties: { + available: { + readOnly: true, + serializedName: "available", + type: { + name: "Boolean" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + reason: { + readOnly: true, + serializedName: "reason", + type: { + name: "Enum", + allowedValues: [ + "Invalid", + "AlreadyExists" + ] + } + } + } + } +}; + +export const ServerConnectionPolicy: msRest.CompositeMapper = { + serializedName: "ServerConnectionPolicy", + type: { + name: "Composite", + className: "ServerConnectionPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + connectionType: { + required: true, + serializedName: "properties.connectionType", + type: { + name: "Enum", + allowedValues: [ + "Default", + "Proxy", + "Redirect" + ] + } + } + } + } +}; + +export const DatabaseSecurityAlertPolicy: msRest.CompositeMapper = { + serializedName: "DatabaseSecurityAlertPolicy", + type: { + name: "Composite", + className: "DatabaseSecurityAlertPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "New", + "Enabled", + "Disabled" + ] + } + }, + disabledAlerts: { + serializedName: "properties.disabledAlerts", + type: { + name: "String" + } + }, + emailAddresses: { + serializedName: "properties.emailAddresses", + type: { + name: "String" + } + }, + emailAccountAdmins: { + serializedName: "properties.emailAccountAdmins", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + }, + useServerDefault: { + serializedName: "properties.useServerDefault", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + } + } + } +}; + +export const DataMaskingPolicy: msRest.CompositeMapper = { + serializedName: "DataMaskingPolicy", + type: { + name: "Composite", + className: "DataMaskingPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + dataMaskingState: { + required: true, + serializedName: "properties.dataMaskingState", + type: { + name: "Enum", + allowedValues: [ + "Disabled", + "Enabled" + ] + } + }, + exemptPrincipals: { + serializedName: "properties.exemptPrincipals", + type: { + name: "String" + } + }, + applicationPrincipals: { + readOnly: true, + serializedName: "properties.applicationPrincipals", + type: { + name: "String" + } + }, + maskingLevel: { + readOnly: true, + serializedName: "properties.maskingLevel", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const DataMaskingRule: msRest.CompositeMapper = { + serializedName: "DataMaskingRule", + type: { + name: "Composite", + className: "DataMaskingRule", + modelProperties: { + ...ProxyResource.type.modelProperties, + dataMaskingRuleId: { + readOnly: true, + serializedName: "properties.id", + type: { + name: "String" + } + }, + aliasName: { + serializedName: "properties.aliasName", + type: { + name: "String" + } + }, + ruleState: { + serializedName: "properties.ruleState", + type: { + name: "Enum", + allowedValues: [ + "Disabled", + "Enabled" + ] + } + }, + schemaName: { + required: true, + serializedName: "properties.schemaName", + type: { + name: "String" + } + }, + tableName: { + required: true, + serializedName: "properties.tableName", + type: { + name: "String" + } + }, + columnName: { + required: true, + serializedName: "properties.columnName", + type: { + name: "String" + } + }, + maskingFunction: { + required: true, + serializedName: "properties.maskingFunction", + type: { + name: "Enum", + allowedValues: [ + "Default", + "CCN", + "Email", + "Number", + "SSN", + "Text" + ] + } + }, + numberFrom: { + serializedName: "properties.numberFrom", + type: { + name: "String" + } + }, + numberTo: { + serializedName: "properties.numberTo", + type: { + name: "String" + } + }, + prefixSize: { + serializedName: "properties.prefixSize", + type: { + name: "String" + } + }, + suffixSize: { + serializedName: "properties.suffixSize", + type: { + name: "String" + } + }, + replacementString: { + serializedName: "properties.replacementString", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const FirewallRule: msRest.CompositeMapper = { + serializedName: "FirewallRule", + type: { + name: "Composite", + className: "FirewallRule", + modelProperties: { + ...ProxyResource.type.modelProperties, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + startIpAddress: { + required: true, + serializedName: "properties.startIpAddress", + type: { + name: "String" + } + }, + endIpAddress: { + required: true, + serializedName: "properties.endIpAddress", + type: { + name: "String" + } + } + } + } +}; + +export const GeoBackupPolicy: msRest.CompositeMapper = { + serializedName: "GeoBackupPolicy", + type: { + name: "Composite", + className: "GeoBackupPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Disabled", + "Enabled" + ] + } + }, + storageType: { + readOnly: true, + serializedName: "properties.storageType", + type: { + name: "String" + } + }, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ImportExtensionRequest: msRest.CompositeMapper = { + serializedName: "ImportExtensionRequest", + type: { + name: "Composite", + className: "ImportExtensionRequest", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + storageKeyType: { + required: true, + serializedName: "properties.storageKeyType", + type: { + name: "Enum", + allowedValues: [ + "StorageAccessKey", + "SharedAccessKey" + ] + } + }, + storageKey: { + required: true, + serializedName: "properties.storageKey", + type: { + name: "String" + } + }, + storageUri: { + required: true, + serializedName: "properties.storageUri", + type: { + name: "String" + } + }, + administratorLogin: { + required: true, + serializedName: "properties.administratorLogin", + type: { + name: "String" + } + }, + administratorLoginPassword: { + required: true, + serializedName: "properties.administratorLoginPassword", + type: { + name: "String" + } + }, + authenticationType: { + serializedName: "properties.authenticationType", + defaultValue: 'SQL', + type: { + name: "Enum", + allowedValues: [ + "SQL", + "ADPassword" + ] + } + }, + operationMode: { + required: true, + isConstant: true, + serializedName: "properties.operationMode", + defaultValue: 'Import', + type: { + name: "String" + } + } + } + } +}; + +export const ImportExportResponse: msRest.CompositeMapper = { + serializedName: "ImportExportResponse", + type: { + name: "Composite", + className: "ImportExportResponse", + modelProperties: { + ...ProxyResource.type.modelProperties, + requestType: { + readOnly: true, + serializedName: "properties.requestType", + type: { + name: "String" + } + }, + requestId: { + readOnly: true, + serializedName: "properties.requestId", + type: { + name: "Uuid" + } + }, + serverName: { + readOnly: true, + serializedName: "properties.serverName", + type: { + name: "String" + } + }, + databaseName: { + readOnly: true, + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "properties.lastModifiedTime", + type: { + name: "String" + } + }, + queuedTime: { + readOnly: true, + serializedName: "properties.queuedTime", + type: { + name: "String" + } + }, + blobUri: { + readOnly: true, + serializedName: "properties.blobUri", + type: { + name: "String" + } + }, + errorMessage: { + readOnly: true, + serializedName: "properties.errorMessage", + type: { + name: "String" + } + } + } + } +}; + +export const ExportRequest: msRest.CompositeMapper = { + serializedName: "ExportRequest", + type: { + name: "Composite", + className: "ExportRequest", + modelProperties: { + storageKeyType: { + required: true, + serializedName: "storageKeyType", + type: { + name: "Enum", + allowedValues: [ + "StorageAccessKey", + "SharedAccessKey" + ] + } + }, + storageKey: { + required: true, + serializedName: "storageKey", + type: { + name: "String" + } + }, + storageUri: { + required: true, + serializedName: "storageUri", + type: { + name: "String" + } + }, + administratorLogin: { + required: true, + serializedName: "administratorLogin", + type: { + name: "String" + } + }, + administratorLoginPassword: { + required: true, + serializedName: "administratorLoginPassword", + type: { + name: "String" + } + }, + authenticationType: { + serializedName: "authenticationType", + defaultValue: 'SQL', + type: { + name: "Enum", + allowedValues: [ + "SQL", + "ADPassword" + ] + } + } + } + } +}; + +export const ImportRequest: msRest.CompositeMapper = { + serializedName: "ImportRequest", + type: { + name: "Composite", + className: "ImportRequest", + modelProperties: { + ...ExportRequest.type.modelProperties, + databaseName: { + required: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + edition: { + required: true, + serializedName: "edition", + type: { + name: "String" + } + }, + serviceObjectiveName: { + required: true, + serializedName: "serviceObjectiveName", + type: { + name: "String" + } + }, + maxSizeBytes: { + required: true, + serializedName: "maxSizeBytes", + type: { + name: "String" + } + } + } + } +}; + +export const MetricValue: msRest.CompositeMapper = { + serializedName: "MetricValue", + type: { + name: "Composite", + className: "MetricValue", + modelProperties: { + count: { + readOnly: true, + serializedName: "count", + type: { + name: "Number" + } + }, + average: { + readOnly: true, + serializedName: "average", + type: { + name: "Number" + } + }, + maximum: { + readOnly: true, + serializedName: "maximum", + type: { + name: "Number" + } + }, + minimum: { + readOnly: true, + serializedName: "minimum", + type: { + name: "Number" + } + }, + timestamp: { + readOnly: true, + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + total: { + readOnly: true, + serializedName: "total", + type: { + name: "Number" + } + } + } + } +}; + +export const MetricName: msRest.CompositeMapper = { + serializedName: "MetricName", + type: { + name: "Composite", + className: "MetricName", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "String" + } + }, + localizedValue: { + readOnly: true, + serializedName: "localizedValue", + type: { + name: "String" + } + } + } + } +}; + +export const Metric: msRest.CompositeMapper = { + serializedName: "Metric", + type: { + name: "Composite", + className: "Metric", + modelProperties: { + startTime: { + readOnly: true, + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + readOnly: true, + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + timeGrain: { + readOnly: true, + serializedName: "timeGrain", + type: { + name: "String" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "Composite", + className: "MetricName" + } + }, + metricValues: { + readOnly: true, + serializedName: "metricValues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricValue" + } + } + } + } + } + } +}; + +export const MetricAvailability: msRest.CompositeMapper = { + serializedName: "MetricAvailability", + type: { + name: "Composite", + className: "MetricAvailability", + modelProperties: { + retention: { + readOnly: true, + serializedName: "retention", + type: { + name: "String" + } + }, + timeGrain: { + readOnly: true, + serializedName: "timeGrain", + type: { + name: "String" + } + } + } + } +}; + +export const MetricDefinition: msRest.CompositeMapper = { + serializedName: "MetricDefinition", + type: { + name: "Composite", + className: "MetricDefinition", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "Composite", + className: "MetricName" + } + }, + primaryAggregationType: { + readOnly: true, + serializedName: "primaryAggregationType", + type: { + name: "String" + } + }, + resourceUri: { + readOnly: true, + serializedName: "resourceUri", + type: { + name: "String" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + }, + metricAvailabilities: { + readOnly: true, + serializedName: "metricAvailabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricAvailability" + } + } + } + } + } + } +}; + +export const RecommendedElasticPoolMetric: msRest.CompositeMapper = { + serializedName: "RecommendedElasticPoolMetric", + type: { + name: "Composite", + className: "RecommendedElasticPoolMetric", + modelProperties: { + dateTime: { + serializedName: "dateTime", + type: { + name: "DateTime" + } + }, + dtu: { + serializedName: "dtu", + type: { + name: "Number" + } + }, + sizeGB: { + serializedName: "sizeGB", + type: { + name: "Number" + } + } + } + } +}; + +export const RecommendedElasticPool: msRest.CompositeMapper = { + serializedName: "RecommendedElasticPool", + type: { + name: "Composite", + className: "RecommendedElasticPool", + modelProperties: { + ...ProxyResource.type.modelProperties, + databaseEdition: { + readOnly: true, + serializedName: "properties.databaseEdition", + type: { + name: "String" + } + }, + dtu: { + serializedName: "properties.dtu", + type: { + name: "Number" + } + }, + databaseDtuMin: { + serializedName: "properties.databaseDtuMin", + type: { + name: "Number" + } + }, + databaseDtuMax: { + serializedName: "properties.databaseDtuMax", + type: { + name: "Number" + } + }, + storageMB: { + serializedName: "properties.storageMB", + type: { + name: "Number" + } + }, + observationPeriodStart: { + readOnly: true, + serializedName: "properties.observationPeriodStart", + type: { + name: "DateTime" + } + }, + observationPeriodEnd: { + readOnly: true, + serializedName: "properties.observationPeriodEnd", + type: { + name: "DateTime" + } + }, + maxObservedDtu: { + readOnly: true, + serializedName: "properties.maxObservedDtu", + type: { + name: "Number" + } + }, + maxObservedStorageMB: { + readOnly: true, + serializedName: "properties.maxObservedStorageMB", + type: { + name: "Number" + } + }, + databases: { + readOnly: true, + serializedName: "properties.databases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrackedResource" + } + } + } + }, + metrics: { + readOnly: true, + serializedName: "properties.metrics", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendedElasticPoolMetric" + } + } + } + } + } + } +}; + +export const ReplicationLink: msRest.CompositeMapper = { + serializedName: "ReplicationLink", + type: { + name: "Composite", + className: "ReplicationLink", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + isTerminationAllowed: { + readOnly: true, + serializedName: "properties.isTerminationAllowed", + type: { + name: "Boolean" + } + }, + replicationMode: { + readOnly: true, + serializedName: "properties.replicationMode", + type: { + name: "String" + } + }, + partnerServer: { + readOnly: true, + serializedName: "properties.partnerServer", + type: { + name: "String" + } + }, + partnerDatabase: { + readOnly: true, + serializedName: "properties.partnerDatabase", + type: { + name: "String" + } + }, + partnerLocation: { + readOnly: true, + serializedName: "properties.partnerLocation", + type: { + name: "String" + } + }, + role: { + readOnly: true, + serializedName: "properties.role", + type: { + name: "Enum", + allowedValues: [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ] + } + }, + partnerRole: { + readOnly: true, + serializedName: "properties.partnerRole", + type: { + name: "Enum", + allowedValues: [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ] + } + }, + startTime: { + readOnly: true, + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + percentComplete: { + readOnly: true, + serializedName: "properties.percentComplete", + type: { + name: "Number" + } + }, + replicationState: { + readOnly: true, + serializedName: "properties.replicationState", + type: { + name: "String" + } + } + } + } +}; + +export const ServerAzureADAdministrator: msRest.CompositeMapper = { + serializedName: "ServerAzureADAdministrator", + type: { + name: "Composite", + className: "ServerAzureADAdministrator", + modelProperties: { + ...ProxyResource.type.modelProperties, + administratorType: { + required: true, + isConstant: true, + serializedName: "properties.administratorType", + defaultValue: 'ActiveDirectory', + type: { + name: "String" + } + }, + login: { + required: true, + serializedName: "properties.login", + type: { + name: "String" + } + }, + sid: { + required: true, + serializedName: "properties.sid", + type: { + name: "Uuid" + } + }, + tenantId: { + required: true, + serializedName: "properties.tenantId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const ServerCommunicationLink: msRest.CompositeMapper = { + serializedName: "ServerCommunicationLink", + type: { + name: "Composite", + className: "ServerCommunicationLink", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + partnerServer: { + required: true, + serializedName: "properties.partnerServer", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceObjective: msRest.CompositeMapper = { + serializedName: "ServiceObjective", + type: { + name: "Composite", + className: "ServiceObjective", + modelProperties: { + ...ProxyResource.type.modelProperties, + serviceObjectiveName: { + readOnly: true, + serializedName: "properties.serviceObjectiveName", + type: { + name: "String" + } + }, + isDefault: { + nullable: false, + readOnly: true, + serializedName: "properties.isDefault", + type: { + name: "Boolean" + } + }, + isSystem: { + nullable: false, + readOnly: true, + serializedName: "properties.isSystem", + type: { + name: "Boolean" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + enabled: { + nullable: false, + readOnly: true, + serializedName: "properties.enabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ElasticPoolActivity: msRest.CompositeMapper = { + serializedName: "ElasticPoolActivity", + type: { + name: "Composite", + className: "ElasticPoolActivity", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + endTime: { + readOnly: true, + serializedName: "properties.endTime", + type: { + name: "DateTime" + } + }, + errorCode: { + readOnly: true, + serializedName: "properties.errorCode", + type: { + name: "Number" + } + }, + errorMessage: { + readOnly: true, + serializedName: "properties.errorMessage", + type: { + name: "String" + } + }, + errorSeverity: { + readOnly: true, + serializedName: "properties.errorSeverity", + type: { + name: "Number" + } + }, + operation: { + readOnly: true, + serializedName: "properties.operation", + type: { + name: "String" + } + }, + operationId: { + nullable: false, + readOnly: true, + serializedName: "properties.operationId", + type: { + name: "Uuid" + } + }, + percentComplete: { + readOnly: true, + serializedName: "properties.percentComplete", + type: { + name: "Number" + } + }, + requestedDatabaseDtuMax: { + readOnly: true, + serializedName: "properties.requestedDatabaseDtuMax", + type: { + name: "Number" + } + }, + requestedDatabaseDtuMin: { + readOnly: true, + serializedName: "properties.requestedDatabaseDtuMin", + type: { + name: "Number" + } + }, + requestedDtu: { + readOnly: true, + serializedName: "properties.requestedDtu", + type: { + name: "Number" + } + }, + requestedElasticPoolName: { + readOnly: true, + serializedName: "properties.requestedElasticPoolName", + type: { + name: "String" + } + }, + requestedStorageLimitInGB: { + readOnly: true, + serializedName: "properties.requestedStorageLimitInGB", + type: { + name: "Number" + } + }, + elasticPoolName: { + readOnly: true, + serializedName: "properties.elasticPoolName", + type: { + name: "String" + } + }, + serverName: { + readOnly: true, + serializedName: "properties.serverName", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + requestedStorageLimitInMB: { + readOnly: true, + serializedName: "properties.requestedStorageLimitInMB", + type: { + name: "Number" + } + }, + requestedDatabaseDtuGuarantee: { + readOnly: true, + serializedName: "properties.requestedDatabaseDtuGuarantee", + type: { + name: "Number" + } + }, + requestedDatabaseDtuCap: { + readOnly: true, + serializedName: "properties.requestedDatabaseDtuCap", + type: { + name: "Number" + } + }, + requestedDtuGuarantee: { + readOnly: true, + serializedName: "properties.requestedDtuGuarantee", + type: { + name: "Number" + } + } + } + } +}; + +export const ElasticPoolDatabaseActivity: msRest.CompositeMapper = { + serializedName: "ElasticPoolDatabaseActivity", + type: { + name: "Composite", + className: "ElasticPoolDatabaseActivity", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + databaseName: { + readOnly: true, + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + endTime: { + readOnly: true, + serializedName: "properties.endTime", + type: { + name: "DateTime" + } + }, + errorCode: { + readOnly: true, + serializedName: "properties.errorCode", + type: { + name: "Number" + } + }, + errorMessage: { + readOnly: true, + serializedName: "properties.errorMessage", + type: { + name: "String" + } + }, + errorSeverity: { + readOnly: true, + serializedName: "properties.errorSeverity", + type: { + name: "Number" + } + }, + operation: { + readOnly: true, + serializedName: "properties.operation", + type: { + name: "String" + } + }, + operationId: { + nullable: false, + readOnly: true, + serializedName: "properties.operationId", + type: { + name: "Uuid" + } + }, + percentComplete: { + readOnly: true, + serializedName: "properties.percentComplete", + type: { + name: "Number" + } + }, + requestedElasticPoolName: { + readOnly: true, + serializedName: "properties.requestedElasticPoolName", + type: { + name: "String" + } + }, + currentElasticPoolName: { + readOnly: true, + serializedName: "properties.currentElasticPoolName", + type: { + name: "String" + } + }, + currentServiceObjective: { + readOnly: true, + serializedName: "properties.currentServiceObjective", + type: { + name: "String" + } + }, + requestedServiceObjective: { + readOnly: true, + serializedName: "properties.requestedServiceObjective", + type: { + name: "String" + } + }, + serverName: { + readOnly: true, + serializedName: "properties.serverName", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + } + } + } +}; + +export const OperationImpact: msRest.CompositeMapper = { + serializedName: "OperationImpact", + type: { + name: "Composite", + className: "OperationImpact", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + }, + changeValueAbsolute: { + readOnly: true, + serializedName: "changeValueAbsolute", + type: { + name: "Number" + } + }, + changeValueRelative: { + readOnly: true, + serializedName: "changeValueRelative", + type: { + name: "Number" + } + } + } + } +}; + +export const RecommendedIndex: msRest.CompositeMapper = { + serializedName: "RecommendedIndex", + type: { + name: "Composite", + className: "RecommendedIndex", + modelProperties: { + ...ProxyResource.type.modelProperties, + action: { + readOnly: true, + serializedName: "properties.action", + type: { + name: "Enum", + allowedValues: [ + "Create", + "Drop", + "Rebuild" + ] + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Active", + "Pending", + "Executing", + "Verifying", + "Pending Revert", + "Reverting", + "Reverted", + "Ignored", + "Expired", + "Blocked", + "Success" + ] + } + }, + created: { + readOnly: true, + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + lastModified: { + readOnly: true, + serializedName: "properties.lastModified", + type: { + name: "DateTime" + } + }, + indexType: { + readOnly: true, + serializedName: "properties.indexType", + type: { + name: "Enum", + allowedValues: [ + "CLUSTERED", + "NONCLUSTERED", + "COLUMNSTORE", + "CLUSTERED COLUMNSTORE" + ] + } + }, + schema: { + readOnly: true, + serializedName: "properties.schema", + type: { + name: "String" + } + }, + table: { + readOnly: true, + serializedName: "properties.table", + type: { + name: "String" + } + }, + columns: { + readOnly: true, + serializedName: "properties.columns", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + includedColumns: { + readOnly: true, + serializedName: "properties.includedColumns", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + indexScript: { + readOnly: true, + serializedName: "properties.indexScript", + type: { + name: "String" + } + }, + estimatedImpact: { + readOnly: true, + serializedName: "properties.estimatedImpact", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationImpact" + } + } + } + }, + reportedImpact: { + readOnly: true, + serializedName: "properties.reportedImpact", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationImpact" + } + } + } + } + } + } +}; + +export const TransparentDataEncryption: msRest.CompositeMapper = { + serializedName: "TransparentDataEncryption", + type: { + name: "Composite", + className: "TransparentDataEncryption", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + } + } + } +}; + +export const SloUsageMetric: msRest.CompositeMapper = { + serializedName: "SloUsageMetric", + type: { + name: "Composite", + className: "SloUsageMetric", + modelProperties: { + serviceLevelObjective: { + readOnly: true, + serializedName: "serviceLevelObjective", + type: { + name: "String" + } + }, + serviceLevelObjectiveId: { + nullable: false, + readOnly: true, + serializedName: "serviceLevelObjectiveId", + type: { + name: "Uuid" + } + }, + inRangeTimeRatio: { + nullable: false, + readOnly: true, + serializedName: "inRangeTimeRatio", + type: { + name: "Number" + } + } + } + } +}; + +export const ServiceTierAdvisor: msRest.CompositeMapper = { + serializedName: "ServiceTierAdvisor", + type: { + name: "Composite", + className: "ServiceTierAdvisor", + modelProperties: { + ...ProxyResource.type.modelProperties, + observationPeriodStart: { + readOnly: true, + serializedName: "properties.observationPeriodStart", + type: { + name: "DateTime" + } + }, + observationPeriodEnd: { + readOnly: true, + serializedName: "properties.observationPeriodEnd", + type: { + name: "DateTime" + } + }, + activeTimeRatio: { + readOnly: true, + serializedName: "properties.activeTimeRatio", + type: { + name: "Number" + } + }, + minDtu: { + readOnly: true, + serializedName: "properties.minDtu", + type: { + name: "Number" + } + }, + avgDtu: { + readOnly: true, + serializedName: "properties.avgDtu", + type: { + name: "Number" + } + }, + maxDtu: { + readOnly: true, + serializedName: "properties.maxDtu", + type: { + name: "Number" + } + }, + maxSizeInGB: { + readOnly: true, + serializedName: "properties.maxSizeInGB", + type: { + name: "Number" + } + }, + serviceLevelObjectiveUsageMetrics: { + readOnly: true, + serializedName: "properties.serviceLevelObjectiveUsageMetrics", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SloUsageMetric" + } + } + } + }, + currentServiceLevelObjective: { + readOnly: true, + serializedName: "properties.currentServiceLevelObjective", + type: { + name: "String" + } + }, + currentServiceLevelObjectiveId: { + readOnly: true, + serializedName: "properties.currentServiceLevelObjectiveId", + type: { + name: "Uuid" + } + }, + usageBasedRecommendationServiceLevelObjective: { + readOnly: true, + serializedName: "properties.usageBasedRecommendationServiceLevelObjective", + type: { + name: "String" + } + }, + usageBasedRecommendationServiceLevelObjectiveId: { + readOnly: true, + serializedName: "properties.usageBasedRecommendationServiceLevelObjectiveId", + type: { + name: "Uuid" + } + }, + databaseSizeBasedRecommendationServiceLevelObjective: { + readOnly: true, + serializedName: "properties.databaseSizeBasedRecommendationServiceLevelObjective", + type: { + name: "String" + } + }, + databaseSizeBasedRecommendationServiceLevelObjectiveId: { + readOnly: true, + serializedName: "properties.databaseSizeBasedRecommendationServiceLevelObjectiveId", + type: { + name: "Uuid" + } + }, + disasterPlanBasedRecommendationServiceLevelObjective: { + readOnly: true, + serializedName: "properties.disasterPlanBasedRecommendationServiceLevelObjective", + type: { + name: "String" + } + }, + disasterPlanBasedRecommendationServiceLevelObjectiveId: { + readOnly: true, + serializedName: "properties.disasterPlanBasedRecommendationServiceLevelObjectiveId", + type: { + name: "Uuid" + } + }, + overallRecommendationServiceLevelObjective: { + readOnly: true, + serializedName: "properties.overallRecommendationServiceLevelObjective", + type: { + name: "String" + } + }, + overallRecommendationServiceLevelObjectiveId: { + readOnly: true, + serializedName: "properties.overallRecommendationServiceLevelObjectiveId", + type: { + name: "Uuid" + } + }, + confidence: { + nullable: false, + readOnly: true, + serializedName: "properties.confidence", + type: { + name: "Number" + } + } + } + } +}; + +export const TransparentDataEncryptionActivity: msRest.CompositeMapper = { + serializedName: "TransparentDataEncryptionActivity", + type: { + name: "Composite", + className: "TransparentDataEncryptionActivity", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + percentComplete: { + readOnly: true, + serializedName: "properties.percentComplete", + type: { + name: "Number" + } + } + } + } +}; + +export const ServerUsage: msRest.CompositeMapper = { + serializedName: "ServerUsage", + type: { + name: "Composite", + className: "ServerUsage", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + resourceName: { + readOnly: true, + serializedName: "resourceName", + type: { + name: "String" + } + }, + displayName: { + readOnly: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + currentValue: { + readOnly: true, + serializedName: "currentValue", + type: { + name: "Number" + } + }, + limit: { + readOnly: true, + serializedName: "limit", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + }, + nextResetTime: { + readOnly: true, + serializedName: "nextResetTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const DatabaseUsage: msRest.CompositeMapper = { + serializedName: "DatabaseUsage", + type: { + name: "Composite", + className: "DatabaseUsage", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + resourceName: { + readOnly: true, + serializedName: "resourceName", + type: { + name: "String" + } + }, + displayName: { + readOnly: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + currentValue: { + readOnly: true, + serializedName: "currentValue", + type: { + name: "Number" + } + }, + limit: { + readOnly: true, + serializedName: "limit", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + }, + nextResetTime: { + readOnly: true, + serializedName: "nextResetTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AutomaticTuningOptions: msRest.CompositeMapper = { + serializedName: "AutomaticTuningOptions", + type: { + name: "Composite", + className: "AutomaticTuningOptions", + modelProperties: { + desiredState: { + serializedName: "desiredState", + type: { + name: "Enum", + allowedValues: [ + "Off", + "On", + "Default" + ] + } + }, + actualState: { + readOnly: true, + serializedName: "actualState", + type: { + name: "Enum", + allowedValues: [ + "Off", + "On" + ] + } + }, + reasonCode: { + readOnly: true, + serializedName: "reasonCode", + type: { + name: "Number" + } + }, + reasonDesc: { + readOnly: true, + serializedName: "reasonDesc", + type: { + name: "Enum", + allowedValues: [ + "Default", + "Disabled", + "AutoConfigured", + "InheritedFromServer", + "QueryStoreOff", + "QueryStoreReadOnly", + "NotSupported" + ] + } + } + } + } +}; + +export const DatabaseAutomaticTuning: msRest.CompositeMapper = { + serializedName: "DatabaseAutomaticTuning", + type: { + name: "Composite", + className: "DatabaseAutomaticTuning", + modelProperties: { + ...ProxyResource.type.modelProperties, + desiredState: { + serializedName: "properties.desiredState", + type: { + name: "Enum", + allowedValues: [ + "Inherit", + "Custom", + "Auto", + "Unspecified" + ] + } + }, + actualState: { + readOnly: true, + serializedName: "properties.actualState", + type: { + name: "Enum", + allowedValues: [ + "Inherit", + "Custom", + "Auto", + "Unspecified" + ] + } + }, + options: { + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "AutomaticTuningOptions" + } + } + } + } + } + } +}; + +export const EncryptionProtector: msRest.CompositeMapper = { + serializedName: "EncryptionProtector", + type: { + name: "Composite", + className: "EncryptionProtector", + modelProperties: { + ...ProxyResource.type.modelProperties, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + subregion: { + readOnly: true, + serializedName: "properties.subregion", + type: { + name: "String" + } + }, + serverKeyName: { + serializedName: "properties.serverKeyName", + type: { + name: "String" + } + }, + serverKeyType: { + required: true, + serializedName: "properties.serverKeyType", + type: { + name: "String" + } + }, + uri: { + readOnly: true, + serializedName: "properties.uri", + type: { + name: "String" + } + }, + thumbprint: { + readOnly: true, + serializedName: "properties.thumbprint", + type: { + name: "String" + } + } + } + } +}; + +export const FailoverGroupReadWriteEndpoint: msRest.CompositeMapper = { + serializedName: "FailoverGroupReadWriteEndpoint", + type: { + name: "Composite", + className: "FailoverGroupReadWriteEndpoint", + modelProperties: { + failoverPolicy: { + required: true, + serializedName: "failoverPolicy", + type: { + name: "String" + } + }, + failoverWithDataLossGracePeriodMinutes: { + serializedName: "failoverWithDataLossGracePeriodMinutes", + type: { + name: "Number" + } + } + } + } +}; + +export const FailoverGroupReadOnlyEndpoint: msRest.CompositeMapper = { + serializedName: "FailoverGroupReadOnlyEndpoint", + type: { + name: "Composite", + className: "FailoverGroupReadOnlyEndpoint", + modelProperties: { + failoverPolicy: { + serializedName: "failoverPolicy", + type: { + name: "String" + } + } + } + } +}; + +export const PartnerInfo: msRest.CompositeMapper = { + serializedName: "PartnerInfo", + type: { + name: "Composite", + className: "PartnerInfo", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + replicationRole: { + readOnly: true, + serializedName: "replicationRole", + type: { + name: "String" + } + } + } + } +}; + +export const FailoverGroup: msRest.CompositeMapper = { + serializedName: "FailoverGroup", + type: { + name: "Composite", + className: "FailoverGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + readWriteEndpoint: { + required: true, + serializedName: "properties.readWriteEndpoint", + type: { + name: "Composite", + className: "FailoverGroupReadWriteEndpoint" + } + }, + readOnlyEndpoint: { + serializedName: "properties.readOnlyEndpoint", + type: { + name: "Composite", + className: "FailoverGroupReadOnlyEndpoint" + } + }, + replicationRole: { + readOnly: true, + serializedName: "properties.replicationRole", + type: { + name: "String" + } + }, + replicationState: { + readOnly: true, + serializedName: "properties.replicationState", + type: { + name: "String" + } + }, + partnerServers: { + required: true, + serializedName: "properties.partnerServers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PartnerInfo" + } + } + } + }, + databases: { + serializedName: "properties.databases", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const FailoverGroupUpdate: msRest.CompositeMapper = { + serializedName: "FailoverGroupUpdate", + type: { + name: "Composite", + className: "FailoverGroupUpdate", + modelProperties: { + readWriteEndpoint: { + serializedName: "properties.readWriteEndpoint", + type: { + name: "Composite", + className: "FailoverGroupReadWriteEndpoint" + } + }, + readOnlyEndpoint: { + serializedName: "properties.readOnlyEndpoint", + type: { + name: "Composite", + className: "FailoverGroupReadOnlyEndpoint" + } + }, + databases: { + serializedName: "properties.databases", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ResourceIdentity: msRest.CompositeMapper = { + serializedName: "ResourceIdentity", + type: { + name: "Composite", + className: "ResourceIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + } + } + } +}; + +export const ManagedInstance: msRest.CompositeMapper = { + serializedName: "ManagedInstance", + type: { + name: "Composite", + className: "ManagedInstance", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + fullyQualifiedDomainName: { + readOnly: true, + serializedName: "properties.fullyQualifiedDomainName", + type: { + name: "String" + } + }, + administratorLogin: { + serializedName: "properties.administratorLogin", + type: { + name: "String" + } + }, + administratorLoginPassword: { + serializedName: "properties.administratorLoginPassword", + type: { + name: "String" + } + }, + subnetId: { + serializedName: "properties.subnetId", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + licenseType: { + serializedName: "properties.licenseType", + type: { + name: "String" + } + }, + vCores: { + serializedName: "properties.vCores", + type: { + name: "Number" + } + }, + storageSizeInGB: { + serializedName: "properties.storageSizeInGB", + type: { + name: "Number" + } + }, + collation: { + serializedName: "properties.collation", + type: { + name: "String" + } + }, + dnsZone: { + readOnly: true, + serializedName: "properties.dnsZone", + type: { + name: "String" + } + }, + dnsZonePartner: { + serializedName: "properties.dnsZonePartner", + type: { + name: "String" + } + }, + publicDataEndpointEnabled: { + serializedName: "properties.publicDataEndpointEnabled", + type: { + name: "Boolean" + } + }, + proxyOverride: { + serializedName: "properties.proxyOverride", + type: { + name: "String" + } + }, + timezoneId: { + serializedName: "properties.timezoneId", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceUpdate: msRest.CompositeMapper = { + serializedName: "ManagedInstanceUpdate", + type: { + name: "Composite", + className: "ManagedInstanceUpdate", + modelProperties: { + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + fullyQualifiedDomainName: { + readOnly: true, + serializedName: "properties.fullyQualifiedDomainName", + type: { + name: "String" + } + }, + administratorLogin: { + serializedName: "properties.administratorLogin", + type: { + name: "String" + } + }, + administratorLoginPassword: { + serializedName: "properties.administratorLoginPassword", + type: { + name: "String" + } + }, + subnetId: { + serializedName: "properties.subnetId", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + licenseType: { + serializedName: "properties.licenseType", + type: { + name: "String" + } + }, + vCores: { + serializedName: "properties.vCores", + type: { + name: "Number" + } + }, + storageSizeInGB: { + serializedName: "properties.storageSizeInGB", + type: { + name: "Number" + } + }, + collation: { + serializedName: "properties.collation", + type: { + name: "String" + } + }, + dnsZone: { + readOnly: true, + serializedName: "properties.dnsZone", + type: { + name: "String" + } + }, + dnsZonePartner: { + serializedName: "properties.dnsZonePartner", + type: { + name: "String" + } + }, + publicDataEndpointEnabled: { + serializedName: "properties.publicDataEndpointEnabled", + type: { + name: "Boolean" + } + }, + proxyOverride: { + serializedName: "properties.proxyOverride", + type: { + name: "String" + } + }, + timezoneId: { + serializedName: "properties.timezoneId", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + readOnly: true, + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + readOnly: true, + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + readOnly: true, + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + } + } + } +}; + +export const ServerKey: msRest.CompositeMapper = { + serializedName: "ServerKey", + type: { + name: "Composite", + className: "ServerKey", + modelProperties: { + ...ProxyResource.type.modelProperties, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + subregion: { + readOnly: true, + serializedName: "properties.subregion", + type: { + name: "String" + } + }, + serverKeyType: { + required: true, + serializedName: "properties.serverKeyType", + type: { + name: "String" + } + }, + uri: { + serializedName: "properties.uri", + type: { + name: "String" + } + }, + thumbprint: { + serializedName: "properties.thumbprint", + type: { + name: "String" + } + }, + creationDate: { + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const Server: msRest.CompositeMapper = { + serializedName: "Server", + type: { + name: "Composite", + className: "Server", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + administratorLogin: { + serializedName: "properties.administratorLogin", + type: { + name: "String" + } + }, + administratorLoginPassword: { + serializedName: "properties.administratorLoginPassword", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + fullyQualifiedDomainName: { + readOnly: true, + serializedName: "properties.fullyQualifiedDomainName", + type: { + name: "String" + } + } + } + } +}; + +export const ServerUpdate: msRest.CompositeMapper = { + serializedName: "ServerUpdate", + type: { + name: "Composite", + className: "ServerUpdate", + modelProperties: { + administratorLogin: { + serializedName: "properties.administratorLogin", + type: { + name: "String" + } + }, + administratorLoginPassword: { + serializedName: "properties.administratorLoginPassword", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + fullyQualifiedDomainName: { + readOnly: true, + serializedName: "properties.fullyQualifiedDomainName", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SyncAgent: msRest.CompositeMapper = { + serializedName: "SyncAgent", + type: { + name: "Composite", + className: "SyncAgent", + modelProperties: { + ...ProxyResource.type.modelProperties, + syncAgentName: { + readOnly: true, + serializedName: "properties.name", + type: { + name: "String" + } + }, + syncDatabaseId: { + serializedName: "properties.syncDatabaseId", + type: { + name: "String" + } + }, + lastAliveTime: { + readOnly: true, + serializedName: "properties.lastAliveTime", + type: { + name: "DateTime" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + isUpToDate: { + readOnly: true, + serializedName: "properties.isUpToDate", + type: { + name: "Boolean" + } + }, + expiryTime: { + readOnly: true, + serializedName: "properties.expiryTime", + type: { + name: "DateTime" + } + }, + version: { + readOnly: true, + serializedName: "properties.version", + type: { + name: "String" + } + } + } + } +}; + +export const SyncAgentKeyProperties: msRest.CompositeMapper = { + serializedName: "SyncAgentKeyProperties", + type: { + name: "Composite", + className: "SyncAgentKeyProperties", + modelProperties: { + syncAgentKey: { + readOnly: true, + serializedName: "syncAgentKey", + type: { + name: "String" + } + } + } + } +}; + +export const SyncAgentLinkedDatabase: msRest.CompositeMapper = { + serializedName: "SyncAgentLinkedDatabase", + type: { + name: "Composite", + className: "SyncAgentLinkedDatabase", + modelProperties: { + ...ProxyResource.type.modelProperties, + databaseType: { + readOnly: true, + serializedName: "properties.databaseType", + type: { + name: "String" + } + }, + databaseId: { + readOnly: true, + serializedName: "properties.databaseId", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + serverName: { + readOnly: true, + serializedName: "properties.serverName", + type: { + name: "String" + } + }, + databaseName: { + readOnly: true, + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + userName: { + readOnly: true, + serializedName: "properties.userName", + type: { + name: "String" + } + } + } + } +}; + +export const SyncDatabaseIdProperties: msRest.CompositeMapper = { + serializedName: "SyncDatabaseIdProperties", + type: { + name: "Composite", + className: "SyncDatabaseIdProperties", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const SyncFullSchemaTableColumn: msRest.CompositeMapper = { + serializedName: "SyncFullSchemaTableColumn", + type: { + name: "Composite", + className: "SyncFullSchemaTableColumn", + modelProperties: { + dataSize: { + readOnly: true, + serializedName: "dataSize", + type: { + name: "String" + } + }, + dataType: { + readOnly: true, + serializedName: "dataType", + type: { + name: "String" + } + }, + errorId: { + readOnly: true, + serializedName: "errorId", + type: { + name: "String" + } + }, + hasError: { + readOnly: true, + serializedName: "hasError", + type: { + name: "Boolean" + } + }, + isPrimaryKey: { + readOnly: true, + serializedName: "isPrimaryKey", + type: { + name: "Boolean" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + quotedName: { + readOnly: true, + serializedName: "quotedName", + type: { + name: "String" + } + } + } + } +}; + +export const SyncFullSchemaTable: msRest.CompositeMapper = { + serializedName: "SyncFullSchemaTable", + type: { + name: "Composite", + className: "SyncFullSchemaTable", + modelProperties: { + columns: { + readOnly: true, + serializedName: "columns", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncFullSchemaTableColumn" + } + } + } + }, + errorId: { + readOnly: true, + serializedName: "errorId", + type: { + name: "String" + } + }, + hasError: { + readOnly: true, + serializedName: "hasError", + type: { + name: "Boolean" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + quotedName: { + readOnly: true, + serializedName: "quotedName", + type: { + name: "String" + } + } + } + } +}; + +export const SyncFullSchemaProperties: msRest.CompositeMapper = { + serializedName: "SyncFullSchemaProperties", + type: { + name: "Composite", + className: "SyncFullSchemaProperties", + modelProperties: { + tables: { + readOnly: true, + serializedName: "tables", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncFullSchemaTable" + } + } + } + }, + lastUpdateTime: { + readOnly: true, + serializedName: "lastUpdateTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const SyncGroupLogProperties: msRest.CompositeMapper = { + serializedName: "SyncGroupLogProperties", + type: { + name: "Composite", + className: "SyncGroupLogProperties", + modelProperties: { + timestamp: { + readOnly: true, + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + source: { + readOnly: true, + serializedName: "source", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "String" + } + }, + tracingId: { + readOnly: true, + serializedName: "tracingId", + type: { + name: "Uuid" + } + }, + operationStatus: { + readOnly: true, + serializedName: "operationStatus", + type: { + name: "String" + } + } + } + } +}; + +export const SyncGroupSchemaTableColumn: msRest.CompositeMapper = { + serializedName: "SyncGroupSchemaTableColumn", + type: { + name: "Composite", + className: "SyncGroupSchemaTableColumn", + modelProperties: { + quotedName: { + serializedName: "quotedName", + type: { + name: "String" + } + }, + dataSize: { + serializedName: "dataSize", + type: { + name: "String" + } + }, + dataType: { + serializedName: "dataType", + type: { + name: "String" + } + } + } + } +}; + +export const SyncGroupSchemaTable: msRest.CompositeMapper = { + serializedName: "SyncGroupSchemaTable", + type: { + name: "Composite", + className: "SyncGroupSchemaTable", + modelProperties: { + columns: { + serializedName: "columns", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncGroupSchemaTableColumn" + } + } + } + }, + quotedName: { + serializedName: "quotedName", + type: { + name: "String" + } + } + } + } +}; + +export const SyncGroupSchema: msRest.CompositeMapper = { + serializedName: "SyncGroupSchema", + type: { + name: "Composite", + className: "SyncGroupSchema", + modelProperties: { + tables: { + serializedName: "tables", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncGroupSchemaTable" + } + } + } + }, + masterSyncMemberName: { + serializedName: "masterSyncMemberName", + type: { + name: "String" + } + } + } + } +}; + +export const SyncGroup: msRest.CompositeMapper = { + serializedName: "SyncGroup", + type: { + name: "Composite", + className: "SyncGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + interval: { + serializedName: "properties.interval", + type: { + name: "Number" + } + }, + lastSyncTime: { + readOnly: true, + serializedName: "properties.lastSyncTime", + type: { + name: "DateTime" + } + }, + conflictResolutionPolicy: { + serializedName: "properties.conflictResolutionPolicy", + type: { + name: "String" + } + }, + syncDatabaseId: { + serializedName: "properties.syncDatabaseId", + type: { + name: "String" + } + }, + hubDatabaseUserName: { + serializedName: "properties.hubDatabaseUserName", + type: { + name: "String" + } + }, + hubDatabasePassword: { + serializedName: "properties.hubDatabasePassword", + type: { + name: "String" + } + }, + syncState: { + readOnly: true, + serializedName: "properties.syncState", + type: { + name: "String" + } + }, + schema: { + serializedName: "properties.schema", + type: { + name: "Composite", + className: "SyncGroupSchema" + } + } + } + } +}; + +export const SyncMember: msRest.CompositeMapper = { + serializedName: "SyncMember", + type: { + name: "Composite", + className: "SyncMember", + modelProperties: { + ...ProxyResource.type.modelProperties, + databaseType: { + serializedName: "properties.databaseType", + type: { + name: "String" + } + }, + syncAgentId: { + serializedName: "properties.syncAgentId", + type: { + name: "String" + } + }, + sqlServerDatabaseId: { + serializedName: "properties.sqlServerDatabaseId", + type: { + name: "Uuid" + } + }, + serverName: { + serializedName: "properties.serverName", + type: { + name: "String" + } + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + userName: { + serializedName: "properties.userName", + type: { + name: "String" + } + }, + password: { + serializedName: "properties.password", + type: { + name: "String" + } + }, + syncDirection: { + serializedName: "properties.syncDirection", + type: { + name: "String" + } + }, + syncState: { + readOnly: true, + serializedName: "properties.syncState", + type: { + name: "String" + } + } + } + } +}; + +export const SubscriptionUsage: msRest.CompositeMapper = { + serializedName: "SubscriptionUsage", + type: { + name: "Composite", + className: "SubscriptionUsage", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + currentValue: { + readOnly: true, + serializedName: "properties.currentValue", + type: { + name: "Number" + } + }, + limit: { + readOnly: true, + serializedName: "properties.limit", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "properties.unit", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualCluster: msRest.CompositeMapper = { + serializedName: "VirtualCluster", + type: { + name: "Composite", + className: "VirtualCluster", + modelProperties: { + ...TrackedResource.type.modelProperties, + subnetId: { + readOnly: true, + serializedName: "properties.subnetId", + type: { + name: "String" + } + }, + family: { + serializedName: "properties.family", + type: { + name: "String" + } + }, + childResources: { + readOnly: true, + serializedName: "properties.childResources", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VirtualClusterUpdate: msRest.CompositeMapper = { + serializedName: "VirtualClusterUpdate", + type: { + name: "Composite", + className: "VirtualClusterUpdate", + modelProperties: { + subnetId: { + readOnly: true, + serializedName: "properties.subnetId", + type: { + name: "String" + } + }, + family: { + serializedName: "properties.family", + type: { + name: "String" + } + }, + childResources: { + readOnly: true, + serializedName: "properties.childResources", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VirtualNetworkRule: msRest.CompositeMapper = { + serializedName: "VirtualNetworkRule", + type: { + name: "Composite", + className: "VirtualNetworkRule", + modelProperties: { + ...ProxyResource.type.modelProperties, + virtualNetworkSubnetId: { + required: true, + serializedName: "properties.virtualNetworkSubnetId", + type: { + name: "String" + } + }, + ignoreMissingVnetServiceEndpoint: { + serializedName: "properties.ignoreMissingVnetServiceEndpoint", + type: { + name: "Boolean" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + } + } + } +}; + +export const ExtendedDatabaseBlobAuditingPolicy: msRest.CompositeMapper = { + serializedName: "ExtendedDatabaseBlobAuditingPolicy", + type: { + name: "Composite", + className: "ExtendedDatabaseBlobAuditingPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + predicateExpression: { + serializedName: "properties.predicateExpression", + type: { + name: "String" + } + }, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + }, + auditActionsAndGroups: { + serializedName: "properties.auditActionsAndGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + storageAccountSubscriptionId: { + serializedName: "properties.storageAccountSubscriptionId", + type: { + name: "Uuid" + } + }, + isStorageSecondaryKeyInUse: { + serializedName: "properties.isStorageSecondaryKeyInUse", + type: { + name: "Boolean" + } + }, + isAzureMonitorTargetEnabled: { + serializedName: "properties.isAzureMonitorTargetEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ExtendedServerBlobAuditingPolicy: msRest.CompositeMapper = { + serializedName: "ExtendedServerBlobAuditingPolicy", + type: { + name: "Composite", + className: "ExtendedServerBlobAuditingPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + predicateExpression: { + serializedName: "properties.predicateExpression", + type: { + name: "String" + } + }, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + }, + auditActionsAndGroups: { + serializedName: "properties.auditActionsAndGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + storageAccountSubscriptionId: { + serializedName: "properties.storageAccountSubscriptionId", + type: { + name: "Uuid" + } + }, + isStorageSecondaryKeyInUse: { + serializedName: "properties.isStorageSecondaryKeyInUse", + type: { + name: "Boolean" + } + }, + isAzureMonitorTargetEnabled: { + serializedName: "properties.isAzureMonitorTargetEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ServerBlobAuditingPolicy: msRest.CompositeMapper = { + serializedName: "ServerBlobAuditingPolicy", + type: { + name: "Composite", + className: "ServerBlobAuditingPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + }, + auditActionsAndGroups: { + serializedName: "properties.auditActionsAndGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + storageAccountSubscriptionId: { + serializedName: "properties.storageAccountSubscriptionId", + type: { + name: "Uuid" + } + }, + isStorageSecondaryKeyInUse: { + serializedName: "properties.isStorageSecondaryKeyInUse", + type: { + name: "Boolean" + } + }, + isAzureMonitorTargetEnabled: { + serializedName: "properties.isAzureMonitorTargetEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const DatabaseBlobAuditingPolicy: msRest.CompositeMapper = { + serializedName: "DatabaseBlobAuditingPolicy", + type: { + name: "Composite", + className: "DatabaseBlobAuditingPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + }, + auditActionsAndGroups: { + serializedName: "properties.auditActionsAndGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + storageAccountSubscriptionId: { + serializedName: "properties.storageAccountSubscriptionId", + type: { + name: "Uuid" + } + }, + isStorageSecondaryKeyInUse: { + serializedName: "properties.isStorageSecondaryKeyInUse", + type: { + name: "Boolean" + } + }, + isAzureMonitorTargetEnabled: { + serializedName: "properties.isAzureMonitorTargetEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const DatabaseVulnerabilityAssessmentRuleBaselineItem: msRest.CompositeMapper = { + serializedName: "DatabaseVulnerabilityAssessmentRuleBaselineItem", + type: { + name: "Composite", + className: "DatabaseVulnerabilityAssessmentRuleBaselineItem", + modelProperties: { + result: { + required: true, + serializedName: "result", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DatabaseVulnerabilityAssessmentRuleBaseline: msRest.CompositeMapper = { + serializedName: "DatabaseVulnerabilityAssessmentRuleBaseline", + type: { + name: "Composite", + className: "DatabaseVulnerabilityAssessmentRuleBaseline", + modelProperties: { + ...ProxyResource.type.modelProperties, + baselineResults: { + required: true, + serializedName: "properties.baselineResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseVulnerabilityAssessmentRuleBaselineItem" + } + } + } + } + } + } +}; + +export const VulnerabilityAssessmentRecurringScansProperties: msRest.CompositeMapper = { + serializedName: "VulnerabilityAssessmentRecurringScansProperties", + type: { + name: "Composite", + className: "VulnerabilityAssessmentRecurringScansProperties", + modelProperties: { + isEnabled: { + serializedName: "isEnabled", + type: { + name: "Boolean" + } + }, + emailSubscriptionAdmins: { + serializedName: "emailSubscriptionAdmins", + defaultValue: true, + type: { + name: "Boolean" + } + }, + emails: { + serializedName: "emails", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DatabaseVulnerabilityAssessment: msRest.CompositeMapper = { + serializedName: "DatabaseVulnerabilityAssessment", + type: { + name: "Composite", + className: "DatabaseVulnerabilityAssessment", + modelProperties: { + ...ProxyResource.type.modelProperties, + storageContainerPath: { + serializedName: "properties.storageContainerPath", + type: { + name: "String" + } + }, + storageContainerSasKey: { + serializedName: "properties.storageContainerSasKey", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + recurringScans: { + serializedName: "properties.recurringScans", + type: { + name: "Composite", + className: "VulnerabilityAssessmentRecurringScansProperties" + } + } + } + } +}; + +export const JobAgent: msRest.CompositeMapper = { + serializedName: "JobAgent", + type: { + name: "Composite", + className: "JobAgent", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + databaseId: { + required: true, + serializedName: "properties.databaseId", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + } + } + } +}; + +export const JobAgentUpdate: msRest.CompositeMapper = { + serializedName: "JobAgentUpdate", + type: { + name: "Composite", + className: "JobAgentUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const JobCredential: msRest.CompositeMapper = { + serializedName: "JobCredential", + type: { + name: "Composite", + className: "JobCredential", + modelProperties: { + ...ProxyResource.type.modelProperties, + username: { + required: true, + serializedName: "properties.username", + type: { + name: "String" + } + }, + password: { + required: true, + serializedName: "properties.password", + type: { + name: "String" + } + } + } + } +}; + +export const JobExecutionTarget: msRest.CompositeMapper = { + serializedName: "JobExecutionTarget", + type: { + name: "Composite", + className: "JobExecutionTarget", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + serverName: { + readOnly: true, + serializedName: "serverName", + type: { + name: "String" + } + }, + databaseName: { + readOnly: true, + serializedName: "databaseName", + type: { + name: "String" + } + } + } + } +}; + +export const JobExecution: msRest.CompositeMapper = { + serializedName: "JobExecution", + type: { + name: "Composite", + className: "JobExecution", + modelProperties: { + ...ProxyResource.type.modelProperties, + jobVersion: { + readOnly: true, + serializedName: "properties.jobVersion", + type: { + name: "Number" + } + }, + stepName: { + readOnly: true, + serializedName: "properties.stepName", + type: { + name: "String" + } + }, + stepId: { + readOnly: true, + serializedName: "properties.stepId", + type: { + name: "Number" + } + }, + jobExecutionId: { + readOnly: true, + serializedName: "properties.jobExecutionId", + type: { + name: "Uuid" + } + }, + lifecycle: { + readOnly: true, + serializedName: "properties.lifecycle", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + createTime: { + readOnly: true, + serializedName: "properties.createTime", + type: { + name: "DateTime" + } + }, + startTime: { + readOnly: true, + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + endTime: { + readOnly: true, + serializedName: "properties.endTime", + type: { + name: "DateTime" + } + }, + currentAttempts: { + serializedName: "properties.currentAttempts", + type: { + name: "Number" + } + }, + currentAttemptStartTime: { + readOnly: true, + serializedName: "properties.currentAttemptStartTime", + type: { + name: "DateTime" + } + }, + lastMessage: { + readOnly: true, + serializedName: "properties.lastMessage", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "properties.target", + type: { + name: "Composite", + className: "JobExecutionTarget" + } + } + } + } +}; + +export const JobSchedule: msRest.CompositeMapper = { + serializedName: "JobSchedule", + type: { + name: "Composite", + className: "JobSchedule", + modelProperties: { + startTime: { + serializedName: "startTime", + defaultValue: new Date('0001-01-01T00:00:00Z'), + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + defaultValue: new Date('9999-12-31T11:59:59Z'), + type: { + name: "DateTime" + } + }, + type: { + serializedName: "type", + defaultValue: 'Once', + type: { + name: "Enum", + allowedValues: [ + "Once", + "Recurring" + ] + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + interval: { + serializedName: "interval", + type: { + name: "String" + } + } + } + } +}; + +export const Job: msRest.CompositeMapper = { + serializedName: "Job", + type: { + name: "Composite", + className: "Job", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + defaultValue: '', + type: { + name: "String" + } + }, + version: { + readOnly: true, + serializedName: "properties.version", + type: { + name: "Number" + } + }, + schedule: { + serializedName: "properties.schedule", + type: { + name: "Composite", + className: "JobSchedule" + } + } + } + } +}; + +export const JobStepAction: msRest.CompositeMapper = { + serializedName: "JobStepAction", + type: { + name: "Composite", + className: "JobStepAction", + modelProperties: { + type: { + serializedName: "type", + defaultValue: 'TSql', + type: { + name: "String" + } + }, + source: { + serializedName: "source", + defaultValue: 'Inline', + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const JobStepOutput: msRest.CompositeMapper = { + serializedName: "JobStepOutput", + type: { + name: "Composite", + className: "JobStepOutput", + modelProperties: { + type: { + serializedName: "type", + defaultValue: 'SqlDatabase', + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "Uuid" + } + }, + resourceGroupName: { + serializedName: "resourceGroupName", + type: { + name: "String" + } + }, + serverName: { + required: true, + serializedName: "serverName", + type: { + name: "String" + } + }, + databaseName: { + required: true, + serializedName: "databaseName", + type: { + name: "String" + } + }, + schemaName: { + serializedName: "schemaName", + defaultValue: 'dbo', + type: { + name: "String" + } + }, + tableName: { + required: true, + serializedName: "tableName", + type: { + name: "String" + } + }, + credential: { + required: true, + serializedName: "credential", + type: { + name: "String" + } + } + } + } +}; + +export const JobStepExecutionOptions: msRest.CompositeMapper = { + serializedName: "JobStepExecutionOptions", + type: { + name: "Composite", + className: "JobStepExecutionOptions", + modelProperties: { + timeoutSeconds: { + serializedName: "timeoutSeconds", + defaultValue: 43200, + type: { + name: "Number" + } + }, + retryAttempts: { + serializedName: "retryAttempts", + defaultValue: 10, + type: { + name: "Number" + } + }, + initialRetryIntervalSeconds: { + serializedName: "initialRetryIntervalSeconds", + defaultValue: 1, + type: { + name: "Number" + } + }, + maximumRetryIntervalSeconds: { + serializedName: "maximumRetryIntervalSeconds", + defaultValue: 120, + type: { + name: "Number" + } + }, + retryIntervalBackoffMultiplier: { + serializedName: "retryIntervalBackoffMultiplier", + defaultValue: 2, + type: { + name: "Number" + } + } + } + } +}; + +export const JobStep: msRest.CompositeMapper = { + serializedName: "JobStep", + type: { + name: "Composite", + className: "JobStep", + modelProperties: { + ...ProxyResource.type.modelProperties, + stepId: { + serializedName: "properties.stepId", + type: { + name: "Number" + } + }, + targetGroup: { + required: true, + serializedName: "properties.targetGroup", + type: { + name: "String" + } + }, + credential: { + required: true, + serializedName: "properties.credential", + type: { + name: "String" + } + }, + action: { + required: true, + serializedName: "properties.action", + type: { + name: "Composite", + className: "JobStepAction" + } + }, + output: { + serializedName: "properties.output", + type: { + name: "Composite", + className: "JobStepOutput" + } + }, + executionOptions: { + serializedName: "properties.executionOptions", + type: { + name: "Composite", + className: "JobStepExecutionOptions" + } + } + } + } +}; + +export const JobTarget: msRest.CompositeMapper = { + serializedName: "JobTarget", + type: { + name: "Composite", + className: "JobTarget", + modelProperties: { + membershipType: { + serializedName: "membershipType", + defaultValue: 'Include', + type: { + name: "Enum", + allowedValues: [ + "Include", + "Exclude" + ] + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + }, + serverName: { + serializedName: "serverName", + type: { + name: "String" + } + }, + databaseName: { + serializedName: "databaseName", + type: { + name: "String" + } + }, + elasticPoolName: { + serializedName: "elasticPoolName", + type: { + name: "String" + } + }, + shardMapName: { + serializedName: "shardMapName", + type: { + name: "String" + } + }, + refreshCredential: { + serializedName: "refreshCredential", + type: { + name: "String" + } + } + } + } +}; + +export const JobTargetGroup: msRest.CompositeMapper = { + serializedName: "JobTargetGroup", + type: { + name: "Composite", + className: "JobTargetGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + members: { + required: true, + serializedName: "properties.members", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobTarget" + } + } + } + } + } + } +}; + +export const JobVersion: msRest.CompositeMapper = { + serializedName: "JobVersion", + type: { + name: "Composite", + className: "JobVersion", + modelProperties: { + ...ProxyResource.type.modelProperties + } + } +}; + +export const LongTermRetentionBackup: msRest.CompositeMapper = { + serializedName: "LongTermRetentionBackup", + type: { + name: "Composite", + className: "LongTermRetentionBackup", + modelProperties: { + ...ProxyResource.type.modelProperties, + serverName: { + readOnly: true, + serializedName: "properties.serverName", + type: { + name: "String" + } + }, + serverCreateTime: { + readOnly: true, + serializedName: "properties.serverCreateTime", + type: { + name: "DateTime" + } + }, + databaseName: { + readOnly: true, + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + databaseDeletionTime: { + readOnly: true, + serializedName: "properties.databaseDeletionTime", + type: { + name: "DateTime" + } + }, + backupTime: { + readOnly: true, + serializedName: "properties.backupTime", + type: { + name: "DateTime" + } + }, + backupExpirationTime: { + readOnly: true, + serializedName: "properties.backupExpirationTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const BackupLongTermRetentionPolicy: msRest.CompositeMapper = { + serializedName: "BackupLongTermRetentionPolicy", + type: { + name: "Composite", + className: "BackupLongTermRetentionPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + weeklyRetention: { + serializedName: "properties.weeklyRetention", + type: { + name: "String" + } + }, + monthlyRetention: { + serializedName: "properties.monthlyRetention", + type: { + name: "String" + } + }, + yearlyRetention: { + serializedName: "properties.yearlyRetention", + type: { + name: "String" + } + }, + weekOfYear: { + serializedName: "properties.weekOfYear", + type: { + name: "Number" + } + } + } + } +}; + +export const ManagedBackupShortTermRetentionPolicy: msRest.CompositeMapper = { + serializedName: "ManagedBackupShortTermRetentionPolicy", + type: { + name: "Composite", + className: "ManagedBackupShortTermRetentionPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + } + } + } +}; + +export const CompleteDatabaseRestoreDefinition: msRest.CompositeMapper = { + serializedName: "CompleteDatabaseRestoreDefinition", + type: { + name: "Composite", + className: "CompleteDatabaseRestoreDefinition", + modelProperties: { + lastBackupName: { + required: true, + serializedName: "lastBackupName", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedDatabase: msRest.CompositeMapper = { + serializedName: "ManagedDatabase", + type: { + name: "Composite", + className: "ManagedDatabase", + modelProperties: { + ...TrackedResource.type.modelProperties, + collation: { + serializedName: "properties.collation", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + creationDate: { + readOnly: true, + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + }, + earliestRestorePoint: { + readOnly: true, + serializedName: "properties.earliestRestorePoint", + type: { + name: "DateTime" + } + }, + restorePointInTime: { + serializedName: "properties.restorePointInTime", + type: { + name: "DateTime" + } + }, + defaultSecondaryLocation: { + readOnly: true, + serializedName: "properties.defaultSecondaryLocation", + type: { + name: "String" + } + }, + catalogCollation: { + serializedName: "properties.catalogCollation", + type: { + name: "String" + } + }, + createMode: { + serializedName: "properties.createMode", + type: { + name: "String" + } + }, + storageContainerUri: { + serializedName: "properties.storageContainerUri", + type: { + name: "String" + } + }, + sourceDatabaseId: { + serializedName: "properties.sourceDatabaseId", + type: { + name: "String" + } + }, + restorableDroppedDatabaseId: { + serializedName: "properties.restorableDroppedDatabaseId", + type: { + name: "String" + } + }, + storageContainerSasToken: { + serializedName: "properties.storageContainerSasToken", + type: { + name: "String" + } + }, + failoverGroupId: { + readOnly: true, + serializedName: "properties.failoverGroupId", + type: { + name: "String" + } + }, + recoverableDatabaseId: { + serializedName: "properties.recoverableDatabaseId", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedDatabaseUpdate: msRest.CompositeMapper = { + serializedName: "ManagedDatabaseUpdate", + type: { + name: "Composite", + className: "ManagedDatabaseUpdate", + modelProperties: { + collation: { + serializedName: "properties.collation", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + creationDate: { + readOnly: true, + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + }, + earliestRestorePoint: { + readOnly: true, + serializedName: "properties.earliestRestorePoint", + type: { + name: "DateTime" + } + }, + restorePointInTime: { + serializedName: "properties.restorePointInTime", + type: { + name: "DateTime" + } + }, + defaultSecondaryLocation: { + readOnly: true, + serializedName: "properties.defaultSecondaryLocation", + type: { + name: "String" + } + }, + catalogCollation: { + serializedName: "properties.catalogCollation", + type: { + name: "String" + } + }, + createMode: { + serializedName: "properties.createMode", + type: { + name: "String" + } + }, + storageContainerUri: { + serializedName: "properties.storageContainerUri", + type: { + name: "String" + } + }, + sourceDatabaseId: { + serializedName: "properties.sourceDatabaseId", + type: { + name: "String" + } + }, + restorableDroppedDatabaseId: { + serializedName: "properties.restorableDroppedDatabaseId", + type: { + name: "String" + } + }, + storageContainerSasToken: { + serializedName: "properties.storageContainerSasToken", + type: { + name: "String" + } + }, + failoverGroupId: { + readOnly: true, + serializedName: "properties.failoverGroupId", + type: { + name: "String" + } + }, + recoverableDatabaseId: { + serializedName: "properties.recoverableDatabaseId", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AutomaticTuningServerOptions: msRest.CompositeMapper = { + serializedName: "AutomaticTuningServerOptions", + type: { + name: "Composite", + className: "AutomaticTuningServerOptions", + modelProperties: { + desiredState: { + serializedName: "desiredState", + type: { + name: "Enum", + allowedValues: [ + "Off", + "On", + "Default" + ] + } + }, + actualState: { + readOnly: true, + serializedName: "actualState", + type: { + name: "Enum", + allowedValues: [ + "Off", + "On" + ] + } + }, + reasonCode: { + readOnly: true, + serializedName: "reasonCode", + type: { + name: "Number" + } + }, + reasonDesc: { + readOnly: true, + serializedName: "reasonDesc", + type: { + name: "Enum", + allowedValues: [ + "Default", + "Disabled", + "AutoConfigured" + ] + } + } + } + } +}; + +export const ServerAutomaticTuning: msRest.CompositeMapper = { + serializedName: "ServerAutomaticTuning", + type: { + name: "Composite", + className: "ServerAutomaticTuning", + modelProperties: { + ...ProxyResource.type.modelProperties, + desiredState: { + serializedName: "properties.desiredState", + type: { + name: "Enum", + allowedValues: [ + "Custom", + "Auto", + "Unspecified" + ] + } + }, + actualState: { + readOnly: true, + serializedName: "properties.actualState", + type: { + name: "Enum", + allowedValues: [ + "Custom", + "Auto", + "Unspecified" + ] + } + }, + options: { + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "AutomaticTuningServerOptions" + } + } + } + } + } + } +}; + +export const ServerDnsAlias: msRest.CompositeMapper = { + serializedName: "ServerDnsAlias", + type: { + name: "Composite", + className: "ServerDnsAlias", + modelProperties: { + ...ProxyResource.type.modelProperties, + azureDnsRecord: { + readOnly: true, + serializedName: "properties.azureDnsRecord", + type: { + name: "String" + } + } + } + } +}; + +export const ServerDnsAliasAcquisition: msRest.CompositeMapper = { + serializedName: "ServerDnsAliasAcquisition", + type: { + name: "Composite", + className: "ServerDnsAliasAcquisition", + modelProperties: { + oldServerDnsAliasId: { + serializedName: "oldServerDnsAliasId", + type: { + name: "String" + } + } + } + } +}; + +export const ServerSecurityAlertPolicy: msRest.CompositeMapper = { + serializedName: "ServerSecurityAlertPolicy", + type: { + name: "Composite", + className: "ServerSecurityAlertPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "New", + "Enabled", + "Disabled" + ] + } + }, + disabledAlerts: { + serializedName: "properties.disabledAlerts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + emailAddresses: { + serializedName: "properties.emailAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + emailAccountAdmins: { + serializedName: "properties.emailAccountAdmins", + type: { + name: "Boolean" + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + }, + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const RestorableDroppedManagedDatabase: msRest.CompositeMapper = { + serializedName: "RestorableDroppedManagedDatabase", + type: { + name: "Composite", + className: "RestorableDroppedManagedDatabase", + modelProperties: { + ...TrackedResource.type.modelProperties, + databaseName: { + readOnly: true, + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + creationDate: { + readOnly: true, + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + }, + deletionDate: { + readOnly: true, + serializedName: "properties.deletionDate", + type: { + name: "DateTime" + } + }, + earliestRestoreDate: { + readOnly: true, + serializedName: "properties.earliestRestoreDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const RestorePoint: msRest.CompositeMapper = { + serializedName: "RestorePoint", + type: { + name: "Composite", + className: "RestorePoint", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + restorePointType: { + readOnly: true, + serializedName: "properties.restorePointType", + type: { + name: "Enum", + allowedValues: [ + "CONTINUOUS", + "DISCRETE" + ] + } + }, + earliestRestoreDate: { + readOnly: true, + serializedName: "properties.earliestRestoreDate", + type: { + name: "DateTime" + } + }, + restorePointCreationDate: { + readOnly: true, + serializedName: "properties.restorePointCreationDate", + type: { + name: "DateTime" + } + }, + restorePointLabel: { + readOnly: true, + serializedName: "properties.restorePointLabel", + type: { + name: "String" + } + } + } + } +}; + +export const CreateDatabaseRestorePointDefinition: msRest.CompositeMapper = { + serializedName: "CreateDatabaseRestorePointDefinition", + type: { + name: "Composite", + className: "CreateDatabaseRestorePointDefinition", + modelProperties: { + restorePointLabel: { + required: true, + serializedName: "restorePointLabel", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedDatabaseSecurityAlertPolicy: msRest.CompositeMapper = { + serializedName: "ManagedDatabaseSecurityAlertPolicy", + type: { + name: "Composite", + className: "ManagedDatabaseSecurityAlertPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "New", + "Enabled", + "Disabled" + ] + } + }, + disabledAlerts: { + serializedName: "properties.disabledAlerts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + emailAddresses: { + serializedName: "properties.emailAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + emailAccountAdmins: { + serializedName: "properties.emailAccountAdmins", + type: { + name: "Boolean" + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + }, + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ManagedServerSecurityAlertPolicy: msRest.CompositeMapper = { + serializedName: "ManagedServerSecurityAlertPolicy", + type: { + name: "Composite", + className: "ManagedServerSecurityAlertPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "New", + "Enabled", + "Disabled" + ] + } + }, + disabledAlerts: { + serializedName: "properties.disabledAlerts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + emailAddresses: { + serializedName: "properties.emailAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + emailAccountAdmins: { + serializedName: "properties.emailAccountAdmins", + type: { + name: "Boolean" + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + }, + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const SensitivityLabel: msRest.CompositeMapper = { + serializedName: "SensitivityLabel", + type: { + name: "Composite", + className: "SensitivityLabel", + modelProperties: { + ...ProxyResource.type.modelProperties, + labelName: { + serializedName: "properties.labelName", + type: { + name: "String" + } + }, + labelId: { + serializedName: "properties.labelId", + type: { + name: "String" + } + }, + informationType: { + serializedName: "properties.informationType", + type: { + name: "String" + } + }, + informationTypeId: { + serializedName: "properties.informationTypeId", + type: { + name: "String" + } + }, + isDisabled: { + readOnly: true, + serializedName: "properties.isDisabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const DatabaseOperation: msRest.CompositeMapper = { + serializedName: "DatabaseOperation", + type: { + name: "Composite", + className: "DatabaseOperation", + modelProperties: { + ...ProxyResource.type.modelProperties, + databaseName: { + readOnly: true, + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "properties.operation", + type: { + name: "String" + } + }, + operationFriendlyName: { + readOnly: true, + serializedName: "properties.operationFriendlyName", + type: { + name: "String" + } + }, + percentComplete: { + readOnly: true, + serializedName: "properties.percentComplete", + type: { + name: "Number" + } + }, + serverName: { + readOnly: true, + serializedName: "properties.serverName", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + errorCode: { + readOnly: true, + serializedName: "properties.errorCode", + type: { + name: "Number" + } + }, + errorDescription: { + readOnly: true, + serializedName: "properties.errorDescription", + type: { + name: "String" + } + }, + errorSeverity: { + readOnly: true, + serializedName: "properties.errorSeverity", + type: { + name: "Number" + } + }, + isUserError: { + readOnly: true, + serializedName: "properties.isUserError", + type: { + name: "Boolean" + } + }, + estimatedCompletionTime: { + readOnly: true, + serializedName: "properties.estimatedCompletionTime", + type: { + name: "DateTime" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + isCancellable: { + readOnly: true, + serializedName: "properties.isCancellable", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ElasticPoolOperation: msRest.CompositeMapper = { + serializedName: "ElasticPoolOperation", + type: { + name: "Composite", + className: "ElasticPoolOperation", + modelProperties: { + ...ProxyResource.type.modelProperties, + elasticPoolName: { + readOnly: true, + serializedName: "properties.elasticPoolName", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "properties.operation", + type: { + name: "String" + } + }, + operationFriendlyName: { + readOnly: true, + serializedName: "properties.operationFriendlyName", + type: { + name: "String" + } + }, + percentComplete: { + readOnly: true, + serializedName: "properties.percentComplete", + type: { + name: "Number" + } + }, + serverName: { + readOnly: true, + serializedName: "properties.serverName", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + errorCode: { + readOnly: true, + serializedName: "properties.errorCode", + type: { + name: "Number" + } + }, + errorDescription: { + readOnly: true, + serializedName: "properties.errorDescription", + type: { + name: "String" + } + }, + errorSeverity: { + readOnly: true, + serializedName: "properties.errorSeverity", + type: { + name: "Number" + } + }, + isUserError: { + readOnly: true, + serializedName: "properties.isUserError", + type: { + name: "Boolean" + } + }, + estimatedCompletionTime: { + readOnly: true, + serializedName: "properties.estimatedCompletionTime", + type: { + name: "DateTime" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + isCancellable: { + readOnly: true, + serializedName: "properties.isCancellable", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MaxSizeCapability: msRest.CompositeMapper = { + serializedName: "MaxSizeCapability", + type: { + name: "Composite", + className: "MaxSizeCapability", + modelProperties: { + limit: { + readOnly: true, + serializedName: "limit", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const LogSizeCapability: msRest.CompositeMapper = { + serializedName: "LogSizeCapability", + type: { + name: "Composite", + className: "LogSizeCapability", + modelProperties: { + limit: { + readOnly: true, + serializedName: "limit", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const MaxSizeRangeCapability: msRest.CompositeMapper = { + serializedName: "MaxSizeRangeCapability", + type: { + name: "Composite", + className: "MaxSizeRangeCapability", + modelProperties: { + minValue: { + readOnly: true, + serializedName: "minValue", + type: { + name: "Composite", + className: "MaxSizeCapability" + } + }, + maxValue: { + readOnly: true, + serializedName: "maxValue", + type: { + name: "Composite", + className: "MaxSizeCapability" + } + }, + scaleSize: { + readOnly: true, + serializedName: "scaleSize", + type: { + name: "Composite", + className: "MaxSizeCapability" + } + }, + logSize: { + readOnly: true, + serializedName: "logSize", + type: { + name: "Composite", + className: "LogSizeCapability" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const PerformanceLevelCapability: msRest.CompositeMapper = { + serializedName: "PerformanceLevelCapability", + type: { + name: "Composite", + className: "PerformanceLevelCapability", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const LicenseTypeCapability: msRest.CompositeMapper = { + serializedName: "LicenseTypeCapability", + type: { + name: "Composite", + className: "LicenseTypeCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceObjectiveCapability: msRest.CompositeMapper = { + serializedName: "ServiceObjectiveCapability", + type: { + name: "Composite", + className: "ServiceObjectiveCapability", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "Uuid" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + supportedMaxSizes: { + readOnly: true, + serializedName: "supportedMaxSizes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaxSizeRangeCapability" + } + } + } + }, + performanceLevel: { + readOnly: true, + serializedName: "performanceLevel", + type: { + name: "Composite", + className: "PerformanceLevelCapability" + } + }, + sku: { + readOnly: true, + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + supportedLicenseTypes: { + readOnly: true, + serializedName: "supportedLicenseTypes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LicenseTypeCapability" + } + } + } + }, + includedMaxSize: { + readOnly: true, + serializedName: "includedMaxSize", + type: { + name: "Composite", + className: "MaxSizeCapability" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const EditionCapability: msRest.CompositeMapper = { + serializedName: "EditionCapability", + type: { + name: "Composite", + className: "EditionCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + supportedServiceLevelObjectives: { + readOnly: true, + serializedName: "supportedServiceLevelObjectives", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceObjectiveCapability" + } + } + } + }, + zoneRedundant: { + readOnly: true, + serializedName: "zoneRedundant", + type: { + name: "Boolean" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolPerDatabaseMinPerformanceLevelCapability: msRest.CompositeMapper = { + serializedName: "ElasticPoolPerDatabaseMinPerformanceLevelCapability", + type: { + name: "Composite", + className: "ElasticPoolPerDatabaseMinPerformanceLevelCapability", + modelProperties: { + limit: { + readOnly: true, + serializedName: "limit", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolPerDatabaseMaxPerformanceLevelCapability: msRest.CompositeMapper = { + serializedName: "ElasticPoolPerDatabaseMaxPerformanceLevelCapability", + type: { + name: "Composite", + className: "ElasticPoolPerDatabaseMaxPerformanceLevelCapability", + modelProperties: { + limit: { + readOnly: true, + serializedName: "limit", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + }, + supportedPerDatabaseMinPerformanceLevels: { + readOnly: true, + serializedName: "supportedPerDatabaseMinPerformanceLevels", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPoolPerDatabaseMinPerformanceLevelCapability" + } + } + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolPerformanceLevelCapability: msRest.CompositeMapper = { + serializedName: "ElasticPoolPerformanceLevelCapability", + type: { + name: "Composite", + className: "ElasticPoolPerformanceLevelCapability", + modelProperties: { + performanceLevel: { + readOnly: true, + serializedName: "performanceLevel", + type: { + name: "Composite", + className: "PerformanceLevelCapability" + } + }, + sku: { + readOnly: true, + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + supportedLicenseTypes: { + readOnly: true, + serializedName: "supportedLicenseTypes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LicenseTypeCapability" + } + } + } + }, + maxDatabaseCount: { + readOnly: true, + serializedName: "maxDatabaseCount", + type: { + name: "Number" + } + }, + includedMaxSize: { + readOnly: true, + serializedName: "includedMaxSize", + type: { + name: "Composite", + className: "MaxSizeCapability" + } + }, + supportedMaxSizes: { + readOnly: true, + serializedName: "supportedMaxSizes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaxSizeRangeCapability" + } + } + } + }, + supportedPerDatabaseMaxSizes: { + readOnly: true, + serializedName: "supportedPerDatabaseMaxSizes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaxSizeRangeCapability" + } + } + } + }, + supportedPerDatabaseMaxPerformanceLevels: { + readOnly: true, + serializedName: "supportedPerDatabaseMaxPerformanceLevels", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPoolPerDatabaseMaxPerformanceLevelCapability" + } + } + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolEditionCapability: msRest.CompositeMapper = { + serializedName: "ElasticPoolEditionCapability", + type: { + name: "Composite", + className: "ElasticPoolEditionCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + supportedElasticPoolPerformanceLevels: { + readOnly: true, + serializedName: "supportedElasticPoolPerformanceLevels", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPoolPerformanceLevelCapability" + } + } + } + }, + zoneRedundant: { + readOnly: true, + serializedName: "zoneRedundant", + type: { + name: "Boolean" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ServerVersionCapability: msRest.CompositeMapper = { + serializedName: "ServerVersionCapability", + type: { + name: "Composite", + className: "ServerVersionCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + supportedEditions: { + readOnly: true, + serializedName: "supportedEditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EditionCapability" + } + } + } + }, + supportedElasticPoolEditions: { + readOnly: true, + serializedName: "supportedElasticPoolEditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPoolEditionCapability" + } + } + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceVcoresCapability: msRest.CompositeMapper = { + serializedName: "ManagedInstanceVcoresCapability", + type: { + name: "Composite", + className: "ManagedInstanceVcoresCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Number" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceFamilyCapability: msRest.CompositeMapper = { + serializedName: "ManagedInstanceFamilyCapability", + type: { + name: "Composite", + className: "ManagedInstanceFamilyCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + sku: { + readOnly: true, + serializedName: "sku", + type: { + name: "String" + } + }, + supportedLicenseTypes: { + readOnly: true, + serializedName: "supportedLicenseTypes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LicenseTypeCapability" + } + } + } + }, + supportedVcoresValues: { + readOnly: true, + serializedName: "supportedVcoresValues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceVcoresCapability" + } + } + } + }, + includedMaxSize: { + readOnly: true, + serializedName: "includedMaxSize", + type: { + name: "Composite", + className: "MaxSizeCapability" + } + }, + supportedStorageSizes: { + readOnly: true, + serializedName: "supportedStorageSizes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaxSizeRangeCapability" + } + } + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceEditionCapability: msRest.CompositeMapper = { + serializedName: "ManagedInstanceEditionCapability", + type: { + name: "Composite", + className: "ManagedInstanceEditionCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + supportedFamilies: { + readOnly: true, + serializedName: "supportedFamilies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceFamilyCapability" + } + } + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceVersionCapability: msRest.CompositeMapper = { + serializedName: "ManagedInstanceVersionCapability", + type: { + name: "Composite", + className: "ManagedInstanceVersionCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + supportedEditions: { + readOnly: true, + serializedName: "supportedEditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceEditionCapability" + } + } + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const LocationCapabilities: msRest.CompositeMapper = { + serializedName: "LocationCapabilities", + type: { + name: "Composite", + className: "LocationCapabilities", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + supportedServerVersions: { + readOnly: true, + serializedName: "supportedServerVersions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerVersionCapability" + } + } + } + }, + supportedManagedInstanceVersions: { + readOnly: true, + serializedName: "supportedManagedInstanceVersions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceVersionCapability" + } + } + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Visible", + "Available", + "Default", + "Disabled" + ] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const Database: msRest.CompositeMapper = { + serializedName: "Database", + type: { + name: "Composite", + className: "Database", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + managedBy: { + readOnly: true, + serializedName: "managedBy", + type: { + name: "String" + } + }, + createMode: { + serializedName: "properties.createMode", + type: { + name: "String" + } + }, + collation: { + serializedName: "properties.collation", + type: { + name: "String" + } + }, + maxSizeBytes: { + serializedName: "properties.maxSizeBytes", + type: { + name: "Number" + } + }, + sampleName: { + serializedName: "properties.sampleName", + type: { + name: "String" + } + }, + elasticPoolId: { + serializedName: "properties.elasticPoolId", + type: { + name: "String" + } + }, + sourceDatabaseId: { + serializedName: "properties.sourceDatabaseId", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + databaseId: { + readOnly: true, + serializedName: "properties.databaseId", + type: { + name: "Uuid" + } + }, + creationDate: { + readOnly: true, + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + }, + currentServiceObjectiveName: { + readOnly: true, + serializedName: "properties.currentServiceObjectiveName", + type: { + name: "String" + } + }, + requestedServiceObjectiveName: { + readOnly: true, + serializedName: "properties.requestedServiceObjectiveName", + type: { + name: "String" + } + }, + defaultSecondaryLocation: { + readOnly: true, + serializedName: "properties.defaultSecondaryLocation", + type: { + name: "String" + } + }, + failoverGroupId: { + readOnly: true, + serializedName: "properties.failoverGroupId", + type: { + name: "String" + } + }, + restorePointInTime: { + serializedName: "properties.restorePointInTime", + type: { + name: "DateTime" + } + }, + sourceDatabaseDeletionDate: { + serializedName: "properties.sourceDatabaseDeletionDate", + type: { + name: "DateTime" + } + }, + recoveryServicesRecoveryPointId: { + serializedName: "properties.recoveryServicesRecoveryPointId", + type: { + name: "String" + } + }, + longTermRetentionBackupResourceId: { + serializedName: "properties.longTermRetentionBackupResourceId", + type: { + name: "String" + } + }, + recoverableDatabaseId: { + serializedName: "properties.recoverableDatabaseId", + type: { + name: "String" + } + }, + restorableDroppedDatabaseId: { + serializedName: "properties.restorableDroppedDatabaseId", + type: { + name: "String" + } + }, + catalogCollation: { + serializedName: "properties.catalogCollation", + type: { + name: "String" + } + }, + zoneRedundant: { + serializedName: "properties.zoneRedundant", + type: { + name: "Boolean" + } + }, + licenseType: { + serializedName: "properties.licenseType", + type: { + name: "String" + } + }, + maxLogSizeBytes: { + readOnly: true, + serializedName: "properties.maxLogSizeBytes", + type: { + name: "Number" + } + }, + earliestRestoreDate: { + readOnly: true, + serializedName: "properties.earliestRestoreDate", + type: { + name: "DateTime" + } + }, + readScale: { + serializedName: "properties.readScale", + type: { + name: "String" + } + }, + currentSku: { + readOnly: true, + serializedName: "properties.currentSku", + type: { + name: "Composite", + className: "Sku" + } + } + } + } +}; + +export const DatabaseUpdate: msRest.CompositeMapper = { + serializedName: "DatabaseUpdate", + type: { + name: "Composite", + className: "DatabaseUpdate", + modelProperties: { + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + createMode: { + serializedName: "properties.createMode", + type: { + name: "String" + } + }, + collation: { + serializedName: "properties.collation", + type: { + name: "String" + } + }, + maxSizeBytes: { + serializedName: "properties.maxSizeBytes", + type: { + name: "Number" + } + }, + sampleName: { + serializedName: "properties.sampleName", + type: { + name: "String" + } + }, + elasticPoolId: { + serializedName: "properties.elasticPoolId", + type: { + name: "String" + } + }, + sourceDatabaseId: { + serializedName: "properties.sourceDatabaseId", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + databaseId: { + readOnly: true, + serializedName: "properties.databaseId", + type: { + name: "Uuid" + } + }, + creationDate: { + readOnly: true, + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + }, + currentServiceObjectiveName: { + readOnly: true, + serializedName: "properties.currentServiceObjectiveName", + type: { + name: "String" + } + }, + requestedServiceObjectiveName: { + readOnly: true, + serializedName: "properties.requestedServiceObjectiveName", + type: { + name: "String" + } + }, + defaultSecondaryLocation: { + readOnly: true, + serializedName: "properties.defaultSecondaryLocation", + type: { + name: "String" + } + }, + failoverGroupId: { + readOnly: true, + serializedName: "properties.failoverGroupId", + type: { + name: "String" + } + }, + restorePointInTime: { + serializedName: "properties.restorePointInTime", + type: { + name: "DateTime" + } + }, + sourceDatabaseDeletionDate: { + serializedName: "properties.sourceDatabaseDeletionDate", + type: { + name: "DateTime" + } + }, + recoveryServicesRecoveryPointId: { + serializedName: "properties.recoveryServicesRecoveryPointId", + type: { + name: "String" + } + }, + longTermRetentionBackupResourceId: { + serializedName: "properties.longTermRetentionBackupResourceId", + type: { + name: "String" + } + }, + recoverableDatabaseId: { + serializedName: "properties.recoverableDatabaseId", + type: { + name: "String" + } + }, + restorableDroppedDatabaseId: { + serializedName: "properties.restorableDroppedDatabaseId", + type: { + name: "String" + } + }, + catalogCollation: { + serializedName: "properties.catalogCollation", + type: { + name: "String" + } + }, + zoneRedundant: { + serializedName: "properties.zoneRedundant", + type: { + name: "Boolean" + } + }, + licenseType: { + serializedName: "properties.licenseType", + type: { + name: "String" + } + }, + maxLogSizeBytes: { + readOnly: true, + serializedName: "properties.maxLogSizeBytes", + type: { + name: "Number" + } + }, + earliestRestoreDate: { + readOnly: true, + serializedName: "properties.earliestRestoreDate", + type: { + name: "DateTime" + } + }, + readScale: { + serializedName: "properties.readScale", + type: { + name: "String" + } + }, + currentSku: { + readOnly: true, + serializedName: "properties.currentSku", + type: { + name: "Composite", + className: "Sku" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ResourceMoveDefinition: msRest.CompositeMapper = { + serializedName: "ResourceMoveDefinition", + type: { + name: "Composite", + className: "ResourceMoveDefinition", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolPerDatabaseSettings: msRest.CompositeMapper = { + serializedName: "ElasticPoolPerDatabaseSettings", + type: { + name: "Composite", + className: "ElasticPoolPerDatabaseSettings", + modelProperties: { + minCapacity: { + serializedName: "minCapacity", + type: { + name: "Number" + } + }, + maxCapacity: { + serializedName: "maxCapacity", + type: { + name: "Number" + } + } + } + } +}; + +export const ElasticPool: msRest.CompositeMapper = { + serializedName: "ElasticPool", + type: { + name: "Composite", + className: "ElasticPool", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + creationDate: { + readOnly: true, + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + }, + maxSizeBytes: { + serializedName: "properties.maxSizeBytes", + type: { + name: "Number" + } + }, + perDatabaseSettings: { + serializedName: "properties.perDatabaseSettings", + type: { + name: "Composite", + className: "ElasticPoolPerDatabaseSettings" + } + }, + zoneRedundant: { + serializedName: "properties.zoneRedundant", + type: { + name: "Boolean" + } + }, + licenseType: { + serializedName: "properties.licenseType", + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolUpdate: msRest.CompositeMapper = { + serializedName: "ElasticPoolUpdate", + type: { + name: "Composite", + className: "ElasticPoolUpdate", + modelProperties: { + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + maxSizeBytes: { + serializedName: "properties.maxSizeBytes", + type: { + name: "Number" + } + }, + perDatabaseSettings: { + serializedName: "properties.perDatabaseSettings", + type: { + name: "Composite", + className: "ElasticPoolPerDatabaseSettings" + } + }, + zoneRedundant: { + serializedName: "properties.zoneRedundant", + type: { + name: "Boolean" + } + }, + licenseType: { + serializedName: "properties.licenseType", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VulnerabilityAssessmentScanError: msRest.CompositeMapper = { + serializedName: "VulnerabilityAssessmentScanError", + type: { + name: "Composite", + className: "VulnerabilityAssessmentScanError", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const VulnerabilityAssessmentScanRecord: msRest.CompositeMapper = { + serializedName: "VulnerabilityAssessmentScanRecord", + type: { + name: "Composite", + className: "VulnerabilityAssessmentScanRecord", + modelProperties: { + ...ProxyResource.type.modelProperties, + scanId: { + readOnly: true, + serializedName: "properties.scanId", + type: { + name: "String" + } + }, + triggerType: { + readOnly: true, + serializedName: "properties.triggerType", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + endTime: { + readOnly: true, + serializedName: "properties.endTime", + type: { + name: "DateTime" + } + }, + errors: { + readOnly: true, + serializedName: "properties.errors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VulnerabilityAssessmentScanError" + } + } + } + }, + storageContainerPath: { + readOnly: true, + serializedName: "properties.storageContainerPath", + type: { + name: "String" + } + }, + numberOfFailedSecurityChecks: { + readOnly: true, + serializedName: "properties.numberOfFailedSecurityChecks", + type: { + name: "Number" + } + } + } + } +}; + +export const DatabaseVulnerabilityAssessmentScansExport: msRest.CompositeMapper = { + serializedName: "DatabaseVulnerabilityAssessmentScansExport", + type: { + name: "Composite", + className: "DatabaseVulnerabilityAssessmentScansExport", + modelProperties: { + ...ProxyResource.type.modelProperties, + exportedReportLocation: { + readOnly: true, + serializedName: "properties.exportedReportLocation", + type: { + name: "String" + } + } + } + } +}; + +export const InstanceFailoverGroupReadWriteEndpoint: msRest.CompositeMapper = { + serializedName: "InstanceFailoverGroupReadWriteEndpoint", + type: { + name: "Composite", + className: "InstanceFailoverGroupReadWriteEndpoint", + modelProperties: { + failoverPolicy: { + required: true, + serializedName: "failoverPolicy", + type: { + name: "String" + } + }, + failoverWithDataLossGracePeriodMinutes: { + serializedName: "failoverWithDataLossGracePeriodMinutes", + type: { + name: "Number" + } + } + } + } +}; + +export const InstanceFailoverGroupReadOnlyEndpoint: msRest.CompositeMapper = { + serializedName: "InstanceFailoverGroupReadOnlyEndpoint", + type: { + name: "Composite", + className: "InstanceFailoverGroupReadOnlyEndpoint", + modelProperties: { + failoverPolicy: { + serializedName: "failoverPolicy", + type: { + name: "String" + } + } + } + } +}; + +export const PartnerRegionInfo: msRest.CompositeMapper = { + serializedName: "PartnerRegionInfo", + type: { + name: "Composite", + className: "PartnerRegionInfo", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + replicationRole: { + readOnly: true, + serializedName: "replicationRole", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstancePairInfo: msRest.CompositeMapper = { + serializedName: "ManagedInstancePairInfo", + type: { + name: "Composite", + className: "ManagedInstancePairInfo", + modelProperties: { + primaryManagedInstanceId: { + serializedName: "primaryManagedInstanceId", + type: { + name: "String" + } + }, + partnerManagedInstanceId: { + serializedName: "partnerManagedInstanceId", + type: { + name: "String" + } + } + } + } +}; + +export const InstanceFailoverGroup: msRest.CompositeMapper = { + serializedName: "InstanceFailoverGroup", + type: { + name: "Composite", + className: "InstanceFailoverGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + readWriteEndpoint: { + required: true, + serializedName: "properties.readWriteEndpoint", + type: { + name: "Composite", + className: "InstanceFailoverGroupReadWriteEndpoint" + } + }, + readOnlyEndpoint: { + serializedName: "properties.readOnlyEndpoint", + type: { + name: "Composite", + className: "InstanceFailoverGroupReadOnlyEndpoint" + } + }, + replicationRole: { + readOnly: true, + serializedName: "properties.replicationRole", + type: { + name: "String" + } + }, + replicationState: { + readOnly: true, + serializedName: "properties.replicationState", + type: { + name: "String" + } + }, + partnerRegions: { + required: true, + serializedName: "properties.partnerRegions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PartnerRegionInfo" + } + } + } + }, + managedInstancePairs: { + required: true, + serializedName: "properties.managedInstancePairs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstancePairInfo" + } + } + } + } + } + } +}; + +export const BackupShortTermRetentionPolicy: msRest.CompositeMapper = { + serializedName: "BackupShortTermRetentionPolicy", + type: { + name: "Composite", + className: "BackupShortTermRetentionPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + } + } + } +}; + +export const TdeCertificate: msRest.CompositeMapper = { + serializedName: "TdeCertificate", + type: { + name: "Composite", + className: "TdeCertificate", + modelProperties: { + ...ProxyResource.type.modelProperties, + privateBlob: { + required: true, + serializedName: "properties.privateBlob", + type: { + name: "String" + } + }, + certPassword: { + serializedName: "properties.certPassword", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceKey: msRest.CompositeMapper = { + serializedName: "ManagedInstanceKey", + type: { + name: "Composite", + className: "ManagedInstanceKey", + modelProperties: { + ...ProxyResource.type.modelProperties, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + serverKeyType: { + required: true, + serializedName: "properties.serverKeyType", + type: { + name: "String" + } + }, + uri: { + serializedName: "properties.uri", + type: { + name: "String" + } + }, + thumbprint: { + readOnly: true, + serializedName: "properties.thumbprint", + type: { + name: "String" + } + }, + creationDate: { + readOnly: true, + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ManagedInstanceEncryptionProtector: msRest.CompositeMapper = { + serializedName: "ManagedInstanceEncryptionProtector", + type: { + name: "Composite", + className: "ManagedInstanceEncryptionProtector", + modelProperties: { + ...ProxyResource.type.modelProperties, + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + serverKeyName: { + serializedName: "properties.serverKeyName", + type: { + name: "String" + } + }, + serverKeyType: { + required: true, + serializedName: "properties.serverKeyType", + type: { + name: "String" + } + }, + uri: { + readOnly: true, + serializedName: "properties.uri", + type: { + name: "String" + } + }, + thumbprint: { + readOnly: true, + serializedName: "properties.thumbprint", + type: { + name: "String" + } + } + } + } +}; + +export const RecoverableManagedDatabase: msRest.CompositeMapper = { + serializedName: "RecoverableManagedDatabase", + type: { + name: "Composite", + className: "RecoverableManagedDatabase", + modelProperties: { + ...ProxyResource.type.modelProperties, + lastAvailableBackupDate: { + readOnly: true, + serializedName: "properties.lastAvailableBackupDate", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceVulnerabilityAssessment: msRest.CompositeMapper = { + serializedName: "ManagedInstanceVulnerabilityAssessment", + type: { + name: "Composite", + className: "ManagedInstanceVulnerabilityAssessment", + modelProperties: { + ...ProxyResource.type.modelProperties, + storageContainerPath: { + required: true, + serializedName: "properties.storageContainerPath", + type: { + name: "String" + } + }, + storageContainerSasKey: { + serializedName: "properties.storageContainerSasKey", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + recurringScans: { + serializedName: "properties.recurringScans", + type: { + name: "Composite", + className: "VulnerabilityAssessmentRecurringScansProperties" + } + } + } + } +}; + +export const ServerVulnerabilityAssessment: msRest.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessment", + type: { + name: "Composite", + className: "ServerVulnerabilityAssessment", + modelProperties: { + ...ProxyResource.type.modelProperties, + storageContainerPath: { + required: true, + serializedName: "properties.storageContainerPath", + type: { + name: "String" + } + }, + storageContainerSasKey: { + serializedName: "properties.storageContainerSasKey", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + recurringScans: { + serializedName: "properties.recurringScans", + type: { + name: "Composite", + className: "VulnerabilityAssessmentRecurringScansProperties" + } + } + } + } +}; + +export const RecoverableDatabaseListResult: msRest.CompositeMapper = { + serializedName: "RecoverableDatabaseListResult", + type: { + name: "Composite", + className: "RecoverableDatabaseListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecoverableDatabase" + } + } + } + } + } + } +}; + +export const RestorableDroppedDatabaseListResult: msRest.CompositeMapper = { + serializedName: "RestorableDroppedDatabaseListResult", + type: { + name: "Composite", + className: "RestorableDroppedDatabaseListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableDroppedDatabase" + } + } + } + } + } + } +}; + +export const ServerListResult: msRest.CompositeMapper = { + serializedName: "ServerListResult", + type: { + name: "Composite", + className: "ServerListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Server" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DataMaskingRuleListResult: msRest.CompositeMapper = { + serializedName: "DataMaskingRuleListResult", + type: { + name: "Composite", + className: "DataMaskingRuleListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataMaskingRule" + } + } + } + } + } + } +}; + +export const FirewallRuleListResult: msRest.CompositeMapper = { + serializedName: "FirewallRuleListResult", + type: { + name: "Composite", + className: "FirewallRuleListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirewallRule" + } + } + } + } + } + } +}; + +export const GeoBackupPolicyListResult: msRest.CompositeMapper = { + serializedName: "GeoBackupPolicyListResult", + type: { + name: "Composite", + className: "GeoBackupPolicyListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GeoBackupPolicy" + } + } + } + } + } + } +}; + +export const MetricListResult: msRest.CompositeMapper = { + serializedName: "MetricListResult", + type: { + name: "Composite", + className: "MetricListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Metric" + } + } + } + } + } + } +}; + +export const MetricDefinitionListResult: msRest.CompositeMapper = { + serializedName: "MetricDefinitionListResult", + type: { + name: "Composite", + className: "MetricDefinitionListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDefinition" + } + } + } + } + } + } +}; + +export const DatabaseListResult: msRest.CompositeMapper = { + serializedName: "DatabaseListResult", + type: { + name: "Composite", + className: "DatabaseListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Database" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolListResult: msRest.CompositeMapper = { + serializedName: "ElasticPoolListResult", + type: { + name: "Composite", + className: "ElasticPoolListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPool" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RecommendedElasticPoolListResult: msRest.CompositeMapper = { + serializedName: "RecommendedElasticPoolListResult", + type: { + name: "Composite", + className: "RecommendedElasticPoolListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendedElasticPool" + } + } + } + } + } + } +}; + +export const RecommendedElasticPoolListMetricsResult: msRest.CompositeMapper = { + serializedName: "RecommendedElasticPoolListMetricsResult", + type: { + name: "Composite", + className: "RecommendedElasticPoolListMetricsResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendedElasticPoolMetric" + } + } + } + } + } + } +}; + +export const ReplicationLinkListResult: msRest.CompositeMapper = { + serializedName: "ReplicationLinkListResult", + type: { + name: "Composite", + className: "ReplicationLinkListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReplicationLink" + } + } + } + } + } + } +}; + +export const ServerAdministratorListResult: msRest.CompositeMapper = { + serializedName: "ServerAdministratorListResult", + type: { + name: "Composite", + className: "ServerAdministratorListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerAzureADAdministrator" + } + } + } + } + } + } +}; + +export const ServerCommunicationLinkListResult: msRest.CompositeMapper = { + serializedName: "ServerCommunicationLinkListResult", + type: { + name: "Composite", + className: "ServerCommunicationLinkListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerCommunicationLink" + } + } + } + } + } + } +}; + +export const ServiceObjectiveListResult: msRest.CompositeMapper = { + serializedName: "ServiceObjectiveListResult", + type: { + name: "Composite", + className: "ServiceObjectiveListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceObjective" + } + } + } + } + } + } +}; + +export const ElasticPoolActivityListResult: msRest.CompositeMapper = { + serializedName: "ElasticPoolActivityListResult", + type: { + name: "Composite", + className: "ElasticPoolActivityListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPoolActivity" + } + } + } + } + } + } +}; + +export const ElasticPoolDatabaseActivityListResult: msRest.CompositeMapper = { + serializedName: "ElasticPoolDatabaseActivityListResult", + type: { + name: "Composite", + className: "ElasticPoolDatabaseActivityListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPoolDatabaseActivity" + } + } + } + } + } + } +}; + +export const ServiceTierAdvisorListResult: msRest.CompositeMapper = { + serializedName: "ServiceTierAdvisorListResult", + type: { + name: "Composite", + className: "ServiceTierAdvisorListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceTierAdvisor" + } + } + } + } + } + } +}; + +export const TransparentDataEncryptionActivityListResult: msRest.CompositeMapper = { + serializedName: "TransparentDataEncryptionActivityListResult", + type: { + name: "Composite", + className: "TransparentDataEncryptionActivityListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TransparentDataEncryptionActivity" + } + } + } + } + } + } +}; + +export const ServerUsageListResult: msRest.CompositeMapper = { + serializedName: "ServerUsageListResult", + type: { + name: "Composite", + className: "ServerUsageListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerUsage" + } + } + } + } + } + } +}; + +export const DatabaseUsageListResult: msRest.CompositeMapper = { + serializedName: "DatabaseUsageListResult", + type: { + name: "Composite", + className: "DatabaseUsageListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseUsage" + } + } + } + } + } + } +}; + +export const EncryptionProtectorListResult: msRest.CompositeMapper = { + serializedName: "EncryptionProtectorListResult", + type: { + name: "Composite", + className: "EncryptionProtectorListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EncryptionProtector" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const FailoverGroupListResult: msRest.CompositeMapper = { + serializedName: "FailoverGroupListResult", + type: { + name: "Composite", + className: "FailoverGroupListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FailoverGroup" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceListResult: msRest.CompositeMapper = { + serializedName: "ManagedInstanceListResult", + type: { + name: "Composite", + className: "ManagedInstanceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstance" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ServerKeyListResult: msRest.CompositeMapper = { + serializedName: "ServerKeyListResult", + type: { + name: "Composite", + className: "ServerKeyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerKey" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SyncAgentListResult: msRest.CompositeMapper = { + serializedName: "SyncAgentListResult", + type: { + name: "Composite", + className: "SyncAgentListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncAgent" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SyncAgentLinkedDatabaseListResult: msRest.CompositeMapper = { + serializedName: "SyncAgentLinkedDatabaseListResult", + type: { + name: "Composite", + className: "SyncAgentLinkedDatabaseListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncAgentLinkedDatabase" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SyncDatabaseIdListResult: msRest.CompositeMapper = { + serializedName: "SyncDatabaseIdListResult", + type: { + name: "Composite", + className: "SyncDatabaseIdListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncDatabaseIdProperties" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SyncFullSchemaPropertiesListResult: msRest.CompositeMapper = { + serializedName: "SyncFullSchemaPropertiesListResult", + type: { + name: "Composite", + className: "SyncFullSchemaPropertiesListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncFullSchemaProperties" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SyncGroupLogListResult: msRest.CompositeMapper = { + serializedName: "SyncGroupLogListResult", + type: { + name: "Composite", + className: "SyncGroupLogListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncGroupLogProperties" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SyncGroupListResult: msRest.CompositeMapper = { + serializedName: "SyncGroupListResult", + type: { + name: "Composite", + className: "SyncGroupListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncGroup" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SyncMemberListResult: msRest.CompositeMapper = { + serializedName: "SyncMemberListResult", + type: { + name: "Composite", + className: "SyncMemberListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncMember" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SubscriptionUsageListResult: msRest.CompositeMapper = { + serializedName: "SubscriptionUsageListResult", + type: { + name: "Composite", + className: "SubscriptionUsageListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubscriptionUsage" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualClusterListResult: msRest.CompositeMapper = { + serializedName: "VirtualClusterListResult", + type: { + name: "Composite", + className: "VirtualClusterListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualCluster" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworkRuleListResult: msRest.CompositeMapper = { + serializedName: "VirtualNetworkRuleListResult", + type: { + name: "Composite", + className: "VirtualNetworkRuleListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkRule" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseVulnerabilityAssessmentListResult: msRest.CompositeMapper = { + serializedName: "DatabaseVulnerabilityAssessmentListResult", + type: { + name: "Composite", + className: "DatabaseVulnerabilityAssessmentListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseVulnerabilityAssessment" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const JobAgentListResult: msRest.CompositeMapper = { + serializedName: "JobAgentListResult", + type: { + name: "Composite", + className: "JobAgentListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobAgent" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const JobCredentialListResult: msRest.CompositeMapper = { + serializedName: "JobCredentialListResult", + type: { + name: "Composite", + className: "JobCredentialListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobCredential" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const JobExecutionListResult: msRest.CompositeMapper = { + serializedName: "JobExecutionListResult", + type: { + name: "Composite", + className: "JobExecutionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecution" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const JobListResult: msRest.CompositeMapper = { + serializedName: "JobListResult", + type: { + name: "Composite", + className: "JobListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Job" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const JobStepListResult: msRest.CompositeMapper = { + serializedName: "JobStepListResult", + type: { + name: "Composite", + className: "JobStepListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobStep" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const JobTargetGroupListResult: msRest.CompositeMapper = { + serializedName: "JobTargetGroupListResult", + type: { + name: "Composite", + className: "JobTargetGroupListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobTargetGroup" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const JobVersionListResult: msRest.CompositeMapper = { + serializedName: "JobVersionListResult", + type: { + name: "Composite", + className: "JobVersionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobVersion" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const LongTermRetentionBackupListResult: msRest.CompositeMapper = { + serializedName: "LongTermRetentionBackupListResult", + type: { + name: "Composite", + className: "LongTermRetentionBackupListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LongTermRetentionBackup" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedBackupShortTermRetentionPolicyListResult: msRest.CompositeMapper = { + serializedName: "ManagedBackupShortTermRetentionPolicyListResult", + type: { + name: "Composite", + className: "ManagedBackupShortTermRetentionPolicyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedBackupShortTermRetentionPolicy" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedDatabaseListResult: msRest.CompositeMapper = { + serializedName: "ManagedDatabaseListResult", + type: { + name: "Composite", + className: "ManagedDatabaseListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedDatabase" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ServerDnsAliasListResult: msRest.CompositeMapper = { + serializedName: "ServerDnsAliasListResult", + type: { + name: "Composite", + className: "ServerDnsAliasListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerDnsAlias" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const LogicalServerSecurityAlertPolicyListResult: msRest.CompositeMapper = { + serializedName: "LogicalServerSecurityAlertPolicyListResult", + type: { + name: "Composite", + className: "LogicalServerSecurityAlertPolicyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerSecurityAlertPolicy" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RestorableDroppedManagedDatabaseListResult: msRest.CompositeMapper = { + serializedName: "RestorableDroppedManagedDatabaseListResult", + type: { + name: "Composite", + className: "RestorableDroppedManagedDatabaseListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableDroppedManagedDatabase" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RestorePointListResult: msRest.CompositeMapper = { + serializedName: "RestorePointListResult", + type: { + name: "Composite", + className: "RestorePointListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorePoint" + } + } + } + } + } + } +}; + +export const ManagedDatabaseSecurityAlertPolicyListResult: msRest.CompositeMapper = { + serializedName: "ManagedDatabaseSecurityAlertPolicyListResult", + type: { + name: "Composite", + className: "ManagedDatabaseSecurityAlertPolicyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedDatabaseSecurityAlertPolicy" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedServerSecurityAlertPolicyListResult: msRest.CompositeMapper = { + serializedName: "ManagedServerSecurityAlertPolicyListResult", + type: { + name: "Composite", + className: "ManagedServerSecurityAlertPolicyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedServerSecurityAlertPolicy" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SensitivityLabelListResult: msRest.CompositeMapper = { + serializedName: "SensitivityLabelListResult", + type: { + name: "Composite", + className: "SensitivityLabelListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SensitivityLabel" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseOperationListResult: msRest.CompositeMapper = { + serializedName: "DatabaseOperationListResult", + type: { + name: "Composite", + className: "DatabaseOperationListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseOperation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolOperationListResult: msRest.CompositeMapper = { + serializedName: "ElasticPoolOperationListResult", + type: { + name: "Composite", + className: "ElasticPoolOperationListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPoolOperation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const VulnerabilityAssessmentScanRecordListResult: msRest.CompositeMapper = { + serializedName: "VulnerabilityAssessmentScanRecordListResult", + type: { + name: "Composite", + className: "VulnerabilityAssessmentScanRecordListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VulnerabilityAssessmentScanRecord" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const InstanceFailoverGroupListResult: msRest.CompositeMapper = { + serializedName: "InstanceFailoverGroupListResult", + type: { + name: "Composite", + className: "InstanceFailoverGroupListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceFailoverGroup" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const BackupShortTermRetentionPolicyListResult: msRest.CompositeMapper = { + serializedName: "BackupShortTermRetentionPolicyListResult", + type: { + name: "Composite", + className: "BackupShortTermRetentionPolicyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupShortTermRetentionPolicy" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceKeyListResult: msRest.CompositeMapper = { + serializedName: "ManagedInstanceKeyListResult", + type: { + name: "Composite", + className: "ManagedInstanceKeyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceKey" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceEncryptionProtectorListResult: msRest.CompositeMapper = { + serializedName: "ManagedInstanceEncryptionProtectorListResult", + type: { + name: "Composite", + className: "ManagedInstanceEncryptionProtectorListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceEncryptionProtector" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RecoverableManagedDatabaseListResult: msRest.CompositeMapper = { + serializedName: "RecoverableManagedDatabaseListResult", + type: { + name: "Composite", + className: "RecoverableManagedDatabaseListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecoverableManagedDatabase" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceVulnerabilityAssessmentListResult: msRest.CompositeMapper = { + serializedName: "ManagedInstanceVulnerabilityAssessmentListResult", + type: { + name: "Composite", + className: "ManagedInstanceVulnerabilityAssessmentListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceVulnerabilityAssessment" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ServerVulnerabilityAssessmentListResult: msRest.CompositeMapper = { + serializedName: "ServerVulnerabilityAssessmentListResult", + type: { + name: "Composite", + className: "ServerVulnerabilityAssessmentListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerVulnerabilityAssessment" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/packages/@azure/arm-sql/lib/models/operationsMappers.ts b/packages/@azure/arm-sql/lib/models/operationsMappers.ts new file mode 100644 index 000000000000..2edcc577920e --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/operationsMappers.ts @@ -0,0 +1,17 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + OperationListResult, + Operation, + OperationDisplay, + CloudError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/parameters.ts b/packages/@azure/arm-sql/lib/models/parameters.ts new file mode 100644 index 000000000000..43662cdaa75f --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/parameters.ts @@ -0,0 +1,937 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const administratorName: msRest.OperationURLParameter = { + parameterPath: "administratorName", + mapper: { + required: true, + isConstant: true, + serializedName: "administratorName", + defaultValue: 'activeDirectory', + type: { + name: "String" + } + } +}; +export const apiVersion0: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2014-04-01', + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2015-05-01-preview', + type: { + name: "String" + } + } +}; +export const apiVersion2: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2017-10-01-preview', + type: { + name: "String" + } + } +}; +export const apiVersion3: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2017-03-01-preview', + type: { + name: "String" + } + } +}; +export const apiVersion4: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2018-06-01-preview', + type: { + name: "String" + } + } +}; +export const backupName: msRest.OperationURLParameter = { + parameterPath: "backupName", + mapper: { + required: true, + serializedName: "backupName", + type: { + name: "String" + } + } +}; +export const baselineName: msRest.OperationURLParameter = { + parameterPath: "baselineName", + mapper: { + required: true, + serializedName: "baselineName", + type: { + name: "Enum", + allowedValues: [ + "master", + "default" + ] + } + } +}; +export const blobAuditingPolicyName: msRest.OperationURLParameter = { + parameterPath: "blobAuditingPolicyName", + mapper: { + required: true, + isConstant: true, + serializedName: "blobAuditingPolicyName", + defaultValue: 'default', + type: { + name: "String" + } + } +}; +export const columnName: msRest.OperationURLParameter = { + parameterPath: "columnName", + mapper: { + required: true, + serializedName: "columnName", + type: { + name: "String" + } + } +}; +export const communicationLinkName: msRest.OperationURLParameter = { + parameterPath: "communicationLinkName", + mapper: { + required: true, + serializedName: "communicationLinkName", + type: { + name: "String" + } + } +}; +export const connectionPolicyName: msRest.OperationURLParameter = { + parameterPath: "connectionPolicyName", + mapper: { + required: true, + isConstant: true, + serializedName: "connectionPolicyName", + defaultValue: 'default', + type: { + name: "String" + } + } +}; +export const continuationToken: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "continuationToken" + ], + mapper: { + serializedName: "continuationToken", + type: { + name: "String" + } + } +}; +export const createTimeMax: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "createTimeMax" + ], + mapper: { + serializedName: "createTimeMax", + type: { + name: "DateTime" + } + } +}; +export const createTimeMin: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "createTimeMin" + ], + mapper: { + serializedName: "createTimeMin", + type: { + name: "DateTime" + } + } +}; +export const credentialName: msRest.OperationURLParameter = { + parameterPath: "credentialName", + mapper: { + required: true, + serializedName: "credentialName", + type: { + name: "String" + } + } +}; +export const databaseName: msRest.OperationURLParameter = { + parameterPath: "databaseName", + mapper: { + required: true, + serializedName: "databaseName", + type: { + name: "String" + } + } +}; +export const databaseState: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "databaseState" + ], + mapper: { + serializedName: "databaseState", + type: { + name: "String" + } + } +}; +export const dataMaskingPolicyName: msRest.OperationURLParameter = { + parameterPath: "dataMaskingPolicyName", + mapper: { + required: true, + isConstant: true, + serializedName: "dataMaskingPolicyName", + defaultValue: 'Default', + type: { + name: "String" + } + } +}; +export const dataMaskingRuleName: msRest.OperationURLParameter = { + parameterPath: "dataMaskingRuleName", + mapper: { + required: true, + serializedName: "dataMaskingRuleName", + type: { + name: "String" + } + } +}; +export const dnsAliasName: msRest.OperationURLParameter = { + parameterPath: "dnsAliasName", + mapper: { + required: true, + serializedName: "dnsAliasName", + type: { + name: "String" + } + } +}; +export const elasticPoolName: msRest.OperationURLParameter = { + parameterPath: "elasticPoolName", + mapper: { + required: true, + serializedName: "elasticPoolName", + type: { + name: "String" + } + } +}; +export const encryptionProtectorName: msRest.OperationURLParameter = { + parameterPath: "encryptionProtectorName", + mapper: { + required: true, + isConstant: true, + serializedName: "encryptionProtectorName", + defaultValue: 'current', + type: { + name: "String" + } + } +}; +export const endTime: msRest.OperationQueryParameter = { + parameterPath: "endTime", + mapper: { + required: true, + serializedName: "endTime", + type: { + name: "String" + } + } +}; +export const endTimeMax: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "endTimeMax" + ], + mapper: { + serializedName: "endTimeMax", + type: { + name: "DateTime" + } + } +}; +export const endTimeMin: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "endTimeMin" + ], + mapper: { + serializedName: "endTimeMin", + type: { + name: "DateTime" + } + } +}; +export const extensionName: msRest.OperationURLParameter = { + parameterPath: "extensionName", + mapper: { + required: true, + isConstant: true, + serializedName: "extensionName", + defaultValue: 'import', + type: { + name: "String" + } + } +}; +export const failoverGroupName: msRest.OperationURLParameter = { + parameterPath: "failoverGroupName", + mapper: { + required: true, + serializedName: "failoverGroupName", + type: { + name: "String" + } + } +}; +export const filter0: msRest.OperationQueryParameter = { + parameterPath: "filter", + mapper: { + required: true, + serializedName: "$filter", + type: { + name: "String" + } + } +}; +export const filter1: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "filter" + ], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; +export const firewallRuleName: msRest.OperationURLParameter = { + parameterPath: "firewallRuleName", + mapper: { + required: true, + serializedName: "firewallRuleName", + type: { + name: "String" + } + } +}; +export const geoBackupPolicyName: msRest.OperationURLParameter = { + parameterPath: "geoBackupPolicyName", + mapper: { + required: true, + isConstant: true, + serializedName: "geoBackupPolicyName", + defaultValue: 'Default', + type: { + name: "String" + } + } +}; +export const include: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "include" + ], + mapper: { + serializedName: "include", + type: { + name: "String" + } + } +}; +export const includeDisabledRecommendations: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "includeDisabledRecommendations" + ], + mapper: { + serializedName: "includeDisabledRecommendations", + type: { + name: "Boolean" + } + } +}; +export const isActive: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "isActive" + ], + mapper: { + serializedName: "isActive", + type: { + name: "Boolean" + } + } +}; +export const jobAgentName: msRest.OperationURLParameter = { + parameterPath: "jobAgentName", + mapper: { + required: true, + serializedName: "jobAgentName", + type: { + name: "String" + } + } +}; +export const jobExecutionId: msRest.OperationURLParameter = { + parameterPath: "jobExecutionId", + mapper: { + required: true, + serializedName: "jobExecutionId", + type: { + name: "Uuid" + } + } +}; +export const jobName: msRest.OperationURLParameter = { + parameterPath: "jobName", + mapper: { + required: true, + serializedName: "jobName", + type: { + name: "String" + } + } +}; +export const jobVersion: msRest.OperationURLParameter = { + parameterPath: "jobVersion", + mapper: { + required: true, + serializedName: "jobVersion", + type: { + name: "Number" + } + } +}; +export const keyName: msRest.OperationURLParameter = { + parameterPath: "keyName", + mapper: { + required: true, + serializedName: "keyName", + type: { + name: "String" + } + } +}; +export const linkId: msRest.OperationURLParameter = { + parameterPath: "linkId", + mapper: { + required: true, + serializedName: "linkId", + type: { + name: "String" + } + } +}; +export const locationName: msRest.OperationURLParameter = { + parameterPath: "locationName", + mapper: { + required: true, + serializedName: "locationName", + type: { + name: "String" + } + } +}; +export const longTermRetentionDatabaseName: msRest.OperationURLParameter = { + parameterPath: "longTermRetentionDatabaseName", + mapper: { + required: true, + serializedName: "longTermRetentionDatabaseName", + type: { + name: "String" + } + } +}; +export const longTermRetentionServerName: msRest.OperationURLParameter = { + parameterPath: "longTermRetentionServerName", + mapper: { + required: true, + serializedName: "longTermRetentionServerName", + type: { + name: "String" + } + } +}; +export const managedInstanceName: msRest.OperationURLParameter = { + parameterPath: "managedInstanceName", + mapper: { + required: true, + serializedName: "managedInstanceName", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const onlyLatestPerDatabase: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "onlyLatestPerDatabase" + ], + mapper: { + serializedName: "onlyLatestPerDatabase", + type: { + name: "Boolean" + } + } +}; +export const operationId: msRest.OperationURLParameter = { + parameterPath: "operationId", + mapper: { + required: true, + serializedName: "operationId", + type: { + name: "Uuid" + } + } +}; +export const policyName: msRest.OperationURLParameter = { + parameterPath: "policyName", + mapper: { + required: true, + isConstant: true, + serializedName: "policyName", + defaultValue: 'default', + type: { + name: "String" + } + } +}; +export const recommendedElasticPoolName: msRest.OperationURLParameter = { + parameterPath: "recommendedElasticPoolName", + mapper: { + required: true, + serializedName: "recommendedElasticPoolName", + type: { + name: "String" + } + } +}; +export const recoverableDatabaseName: msRest.OperationURLParameter = { + parameterPath: "recoverableDatabaseName", + mapper: { + required: true, + serializedName: "recoverableDatabaseName", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const restorableDroppedDatabaseId: msRest.OperationURLParameter = { + parameterPath: "restorableDroppedDatabaseId", + mapper: { + required: true, + serializedName: "restorableDroppedDatabaseId", + type: { + name: "String" + } + } +}; +export const restorableDroppededDatabaseId: msRest.OperationURLParameter = { + parameterPath: "restorableDroppededDatabaseId", + mapper: { + required: true, + serializedName: "restorableDroppededDatabaseId", + type: { + name: "String" + } + } +}; +export const restorePointName: msRest.OperationURLParameter = { + parameterPath: "restorePointName", + mapper: { + required: true, + serializedName: "restorePointName", + type: { + name: "String" + } + } +}; +export const ruleId: msRest.OperationURLParameter = { + parameterPath: "ruleId", + mapper: { + required: true, + serializedName: "ruleId", + type: { + name: "String" + } + } +}; +export const scanId: msRest.OperationURLParameter = { + parameterPath: "scanId", + mapper: { + required: true, + serializedName: "scanId", + type: { + name: "String" + } + } +}; +export const schemaName: msRest.OperationURLParameter = { + parameterPath: "schemaName", + mapper: { + required: true, + serializedName: "schemaName", + type: { + name: "String" + } + } +}; +export const securityAlertPolicyName0: msRest.OperationURLParameter = { + parameterPath: "securityAlertPolicyName", + mapper: { + required: true, + isConstant: true, + serializedName: "securityAlertPolicyName", + defaultValue: 'default', + type: { + name: "String" + } + } +}; +export const securityAlertPolicyName1: msRest.OperationURLParameter = { + parameterPath: "securityAlertPolicyName", + mapper: { + required: true, + isConstant: true, + serializedName: "securityAlertPolicyName", + defaultValue: 'Default', + type: { + name: "String" + } + } +}; +export const sensitivityLabelSource0: msRest.OperationURLParameter = { + parameterPath: "sensitivityLabelSource", + mapper: { + required: true, + isConstant: true, + serializedName: "sensitivityLabelSource", + defaultValue: 'recommended', + type: { + name: "String" + } + } +}; +export const sensitivityLabelSource1: msRest.OperationURLParameter = { + parameterPath: "sensitivityLabelSource", + mapper: { + required: true, + serializedName: "sensitivityLabelSource", + type: { + name: "Enum", + allowedValues: [ + "current", + "recommended" + ] + } + } +}; +export const sensitivityLabelSource2: msRest.OperationURLParameter = { + parameterPath: "sensitivityLabelSource", + mapper: { + required: true, + isConstant: true, + serializedName: "sensitivityLabelSource", + defaultValue: 'current', + type: { + name: "String" + } + } +}; +export const serverName: msRest.OperationURLParameter = { + parameterPath: "serverName", + mapper: { + required: true, + serializedName: "serverName", + type: { + name: "String" + } + } +}; +export const serviceObjectiveName: msRest.OperationURLParameter = { + parameterPath: "serviceObjectiveName", + mapper: { + required: true, + serializedName: "serviceObjectiveName", + type: { + name: "String" + } + } +}; +export const serviceTierAdvisorName: msRest.OperationURLParameter = { + parameterPath: "serviceTierAdvisorName", + mapper: { + required: true, + serializedName: "serviceTierAdvisorName", + type: { + name: "String" + } + } +}; +export const skip: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "skip" + ], + mapper: { + serializedName: "$skip", + type: { + name: "Number" + } + } +}; +export const skipToken: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "skipToken" + ], + mapper: { + serializedName: "$skipToken", + type: { + name: "String" + } + } +}; +export const startTime: msRest.OperationQueryParameter = { + parameterPath: "startTime", + mapper: { + required: true, + serializedName: "startTime", + type: { + name: "String" + } + } +}; +export const stepName: msRest.OperationURLParameter = { + parameterPath: "stepName", + mapper: { + required: true, + serializedName: "stepName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; +export const syncAgentName: msRest.OperationURLParameter = { + parameterPath: "syncAgentName", + mapper: { + required: true, + serializedName: "syncAgentName", + type: { + name: "String" + } + } +}; +export const syncGroupName: msRest.OperationURLParameter = { + parameterPath: "syncGroupName", + mapper: { + required: true, + serializedName: "syncGroupName", + type: { + name: "String" + } + } +}; +export const syncMemberName: msRest.OperationURLParameter = { + parameterPath: "syncMemberName", + mapper: { + required: true, + serializedName: "syncMemberName", + type: { + name: "String" + } + } +}; +export const tableName: msRest.OperationURLParameter = { + parameterPath: "tableName", + mapper: { + required: true, + serializedName: "tableName", + type: { + name: "String" + } + } +}; +export const targetGroupName: msRest.OperationURLParameter = { + parameterPath: "targetGroupName", + mapper: { + required: true, + serializedName: "targetGroupName", + type: { + name: "String" + } + } +}; +export const targetId: msRest.OperationURLParameter = { + parameterPath: "targetId", + mapper: { + required: true, + serializedName: "targetId", + type: { + name: "Uuid" + } + } +}; +export const top: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "top" + ], + mapper: { + serializedName: "$top", + type: { + name: "Number" + } + } +}; +export const transparentDataEncryptionName: msRest.OperationURLParameter = { + parameterPath: "transparentDataEncryptionName", + mapper: { + required: true, + isConstant: true, + serializedName: "transparentDataEncryptionName", + defaultValue: 'current', + type: { + name: "String" + } + } +}; +export const type: msRest.OperationQueryParameter = { + parameterPath: "type", + mapper: { + required: true, + serializedName: "type", + type: { + name: "String" + } + } +}; +export const usageName: msRest.OperationURLParameter = { + parameterPath: "usageName", + mapper: { + required: true, + serializedName: "usageName", + type: { + name: "String" + } + } +}; +export const virtualClusterName: msRest.OperationURLParameter = { + parameterPath: "virtualClusterName", + mapper: { + required: true, + serializedName: "virtualClusterName", + type: { + name: "String" + } + } +}; +export const virtualNetworkRuleName: msRest.OperationURLParameter = { + parameterPath: "virtualNetworkRuleName", + mapper: { + required: true, + serializedName: "virtualNetworkRuleName", + type: { + name: "String" + } + } +}; +export const vulnerabilityAssessmentName: msRest.OperationURLParameter = { + parameterPath: "vulnerabilityAssessmentName", + mapper: { + required: true, + isConstant: true, + serializedName: "vulnerabilityAssessmentName", + defaultValue: 'default', + type: { + name: "String" + } + } +}; diff --git a/packages/@azure/arm-sql/lib/models/recommendedElasticPoolsMappers.ts b/packages/@azure/arm-sql/lib/models/recommendedElasticPoolsMappers.ts new file mode 100644 index 000000000000..6422d1531249 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/recommendedElasticPoolsMappers.ts @@ -0,0 +1,119 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + RecommendedElasticPool, + ProxyResource, + Resource, + BaseResource, + TrackedResource, + RecommendedElasticPoolMetric, + CloudError, + RecommendedElasticPoolListResult, + RecommendedElasticPoolListMetricsResult, + RecoverableDatabase, + RestorableDroppedDatabase, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/recoverableDatabasesMappers.ts b/packages/@azure/arm-sql/lib/models/recoverableDatabasesMappers.ts new file mode 100644 index 000000000000..3f00706e86ad --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/recoverableDatabasesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + RecoverableDatabase, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabaseListResult, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/recoverableManagedDatabasesMappers.ts b/packages/@azure/arm-sql/lib/models/recoverableManagedDatabasesMappers.ts new file mode 100644 index 000000000000..d0c7578aa4bb --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/recoverableManagedDatabasesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + RecoverableManagedDatabaseListResult, + RecoverableManagedDatabase, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/replicationLinksMappers.ts b/packages/@azure/arm-sql/lib/models/replicationLinksMappers.ts new file mode 100644 index 000000000000..33e2f508d26b --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/replicationLinksMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + CloudError, + ReplicationLink, + ProxyResource, + Resource, + BaseResource, + ReplicationLinkListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/restorableDroppedDatabasesMappers.ts b/packages/@azure/arm-sql/lib/models/restorableDroppedDatabasesMappers.ts new file mode 100644 index 000000000000..805679102baf --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/restorableDroppedDatabasesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + RestorableDroppedDatabase, + ProxyResource, + Resource, + BaseResource, + CloudError, + RestorableDroppedDatabaseListResult, + RecoverableDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/restorableDroppedManagedDatabasesMappers.ts b/packages/@azure/arm-sql/lib/models/restorableDroppedManagedDatabasesMappers.ts new file mode 100644 index 000000000000..dbb15603ee13 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/restorableDroppedManagedDatabasesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + RestorableDroppedManagedDatabaseListResult, + RestorableDroppedManagedDatabase, + TrackedResource, + Resource, + BaseResource, + CloudError, + ProxyResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment, + RecoverableDatabase, + RestorableDroppedDatabase +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/restorePointsMappers.ts b/packages/@azure/arm-sql/lib/models/restorePointsMappers.ts new file mode 100644 index 000000000000..0f12ea997ce1 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/restorePointsMappers.ts @@ -0,0 +1,119 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + RestorePointListResult, + RestorePoint, + ProxyResource, + Resource, + BaseResource, + CloudError, + CreateDatabaseRestorePointDefinition, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/sensitivityLabelsMappers.ts b/packages/@azure/arm-sql/lib/models/sensitivityLabelsMappers.ts new file mode 100644 index 000000000000..ad30c4703e89 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/sensitivityLabelsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + SensitivityLabelListResult, + SensitivityLabel, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serverAutomaticTuningOperationsMappers.ts b/packages/@azure/arm-sql/lib/models/serverAutomaticTuningOperationsMappers.ts new file mode 100644 index 000000000000..66c1a7a8c616 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serverAutomaticTuningOperationsMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServerAutomaticTuning, + ProxyResource, + Resource, + BaseResource, + AutomaticTuningServerOptions, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serverAzureADAdministratorsMappers.ts b/packages/@azure/arm-sql/lib/models/serverAzureADAdministratorsMappers.ts new file mode 100644 index 000000000000..b3a533405329 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serverAzureADAdministratorsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServerAzureADAdministrator, + ProxyResource, + Resource, + BaseResource, + CloudError, + ServerAdministratorListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serverBlobAuditingPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/serverBlobAuditingPoliciesMappers.ts new file mode 100644 index 000000000000..21c98052e147 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serverBlobAuditingPoliciesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServerBlobAuditingPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serverCommunicationLinksMappers.ts b/packages/@azure/arm-sql/lib/models/serverCommunicationLinksMappers.ts new file mode 100644 index 000000000000..e7b5ccc64086 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serverCommunicationLinksMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + CloudError, + ServerCommunicationLink, + ProxyResource, + Resource, + BaseResource, + ServerCommunicationLinkListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serverConnectionPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/serverConnectionPoliciesMappers.ts new file mode 100644 index 000000000000..cf12fa3e56c2 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serverConnectionPoliciesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServerConnectionPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serverDnsAliasesMappers.ts b/packages/@azure/arm-sql/lib/models/serverDnsAliasesMappers.ts new file mode 100644 index 000000000000..6477d07dbcd7 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serverDnsAliasesMappers.ts @@ -0,0 +1,119 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServerDnsAlias, + ProxyResource, + Resource, + BaseResource, + CloudError, + ServerDnsAliasListResult, + ServerDnsAliasAcquisition, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serverKeysMappers.ts b/packages/@azure/arm-sql/lib/models/serverKeysMappers.ts new file mode 100644 index 000000000000..4077cfee4956 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serverKeysMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServerKeyListResult, + ServerKey, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serverSecurityAlertPoliciesMappers.ts b/packages/@azure/arm-sql/lib/models/serverSecurityAlertPoliciesMappers.ts new file mode 100644 index 000000000000..a7c47403523d --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serverSecurityAlertPoliciesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServerSecurityAlertPolicy, + ProxyResource, + Resource, + BaseResource, + CloudError, + LogicalServerSecurityAlertPolicyListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serverUsagesMappers.ts b/packages/@azure/arm-sql/lib/models/serverUsagesMappers.ts new file mode 100644 index 000000000000..97984cde6105 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serverUsagesMappers.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServerUsageListResult, + ServerUsage, + CloudError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serverVulnerabilityAssessmentsMappers.ts b/packages/@azure/arm-sql/lib/models/serverVulnerabilityAssessmentsMappers.ts new file mode 100644 index 000000000000..ed502ed3689f --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serverVulnerabilityAssessmentsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServerVulnerabilityAssessment, + ProxyResource, + Resource, + BaseResource, + VulnerabilityAssessmentRecurringScansProperties, + CloudError, + ServerVulnerabilityAssessmentListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serversMappers.ts b/packages/@azure/arm-sql/lib/models/serversMappers.ts new file mode 100644 index 000000000000..a28333b955d1 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serversMappers.ts @@ -0,0 +1,121 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + CheckNameAvailabilityRequest, + CheckNameAvailabilityResponse, + CloudError, + ServerListResult, + Server, + TrackedResource, + Resource, + BaseResource, + ResourceIdentity, + ServerUpdate, + ProxyResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + Sku, + ServerKey, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment, + RecoverableDatabase, + RestorableDroppedDatabase +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serviceObjectivesMappers.ts b/packages/@azure/arm-sql/lib/models/serviceObjectivesMappers.ts new file mode 100644 index 000000000000..27e84282df6d --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serviceObjectivesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServiceObjective, + ProxyResource, + Resource, + BaseResource, + CloudError, + ServiceObjectiveListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/serviceTierAdvisorsMappers.ts b/packages/@azure/arm-sql/lib/models/serviceTierAdvisorsMappers.ts new file mode 100644 index 000000000000..860be0b0f04a --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/serviceTierAdvisorsMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + ServiceTierAdvisor, + ProxyResource, + Resource, + BaseResource, + SloUsageMetric, + CloudError, + ServiceTierAdvisorListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/subscriptionUsagesMappers.ts b/packages/@azure/arm-sql/lib/models/subscriptionUsagesMappers.ts new file mode 100644 index 000000000000..982e8558c361 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/subscriptionUsagesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + SubscriptionUsageListResult, + SubscriptionUsage, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/syncAgentsMappers.ts b/packages/@azure/arm-sql/lib/models/syncAgentsMappers.ts new file mode 100644 index 000000000000..8b0b99596f4c --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/syncAgentsMappers.ts @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + SyncAgent, + ProxyResource, + Resource, + BaseResource, + CloudError, + SyncAgentListResult, + SyncAgentKeyProperties, + SyncAgentLinkedDatabaseListResult, + SyncAgentLinkedDatabase, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/syncGroupsMappers.ts b/packages/@azure/arm-sql/lib/models/syncGroupsMappers.ts new file mode 100644 index 000000000000..f4567f54cb95 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/syncGroupsMappers.ts @@ -0,0 +1,126 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + SyncDatabaseIdListResult, + SyncDatabaseIdProperties, + CloudError, + SyncFullSchemaPropertiesListResult, + SyncFullSchemaProperties, + SyncFullSchemaTable, + SyncFullSchemaTableColumn, + SyncGroupLogListResult, + SyncGroupLogProperties, + SyncGroup, + ProxyResource, + Resource, + BaseResource, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncGroupListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/syncMembersMappers.ts b/packages/@azure/arm-sql/lib/models/syncMembersMappers.ts new file mode 100644 index 000000000000..bd9da01e4126 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/syncMembersMappers.ts @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + SyncMember, + ProxyResource, + Resource, + BaseResource, + CloudError, + SyncMemberListResult, + SyncFullSchemaPropertiesListResult, + SyncFullSchemaProperties, + SyncFullSchemaTable, + SyncFullSchemaTableColumn, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/tdeCertificatesMappers.ts b/packages/@azure/arm-sql/lib/models/tdeCertificatesMappers.ts new file mode 100644 index 000000000000..c944f88f0250 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/tdeCertificatesMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + TdeCertificate, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/transparentDataEncryptionActivitiesMappers.ts b/packages/@azure/arm-sql/lib/models/transparentDataEncryptionActivitiesMappers.ts new file mode 100644 index 000000000000..674b47eaa3b1 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/transparentDataEncryptionActivitiesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + TransparentDataEncryptionActivityListResult, + TransparentDataEncryptionActivity, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/transparentDataEncryptionsMappers.ts b/packages/@azure/arm-sql/lib/models/transparentDataEncryptionsMappers.ts new file mode 100644 index 000000000000..810594dc353d --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/transparentDataEncryptionsMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + TransparentDataEncryption, + ProxyResource, + Resource, + BaseResource, + CloudError, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/virtualClustersMappers.ts b/packages/@azure/arm-sql/lib/models/virtualClustersMappers.ts new file mode 100644 index 000000000000..bb45bb6cd630 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/virtualClustersMappers.ts @@ -0,0 +1,119 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + VirtualClusterListResult, + VirtualCluster, + TrackedResource, + Resource, + BaseResource, + CloudError, + VirtualClusterUpdate, + ProxyResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualNetworkRule, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment, + RecoverableDatabase, + RestorableDroppedDatabase +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/models/virtualNetworkRulesMappers.ts b/packages/@azure/arm-sql/lib/models/virtualNetworkRulesMappers.ts new file mode 100644 index 000000000000..d7aa5f8c74f2 --- /dev/null +++ b/packages/@azure/arm-sql/lib/models/virtualNetworkRulesMappers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + VirtualNetworkRule, + ProxyResource, + Resource, + BaseResource, + CloudError, + VirtualNetworkRuleListResult, + RecoverableDatabase, + RestorableDroppedDatabase, + TrackedResource, + ServerConnectionPolicy, + DatabaseSecurityAlertPolicy, + DataMaskingPolicy, + DataMaskingRule, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + ReplicationLink, + ServerAzureADAdministrator, + ServerCommunicationLink, + ServiceObjective, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + RecommendedIndex, + OperationImpact, + TransparentDataEncryption, + ServiceTierAdvisor, + SloUsageMetric, + TransparentDataEncryptionActivity, + DatabaseAutomaticTuning, + AutomaticTuningOptions, + EncryptionProtector, + FailoverGroup, + FailoverGroupReadWriteEndpoint, + FailoverGroupReadOnlyEndpoint, + PartnerInfo, + ManagedInstance, + ResourceIdentity, + Sku, + ServerKey, + Server, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + SubscriptionUsage, + VirtualCluster, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + ServerBlobAuditingPolicy, + DatabaseBlobAuditingPolicy, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessment, + VulnerabilityAssessmentRecurringScansProperties, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + Job, + JobSchedule, + JobStep, + JobStepAction, + JobStepOutput, + JobStepExecutionOptions, + JobTargetGroup, + JobTarget, + JobVersion, + LongTermRetentionBackup, + BackupLongTermRetentionPolicy, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ServerAutomaticTuning, + AutomaticTuningServerOptions, + ServerDnsAlias, + ServerSecurityAlertPolicy, + RestorableDroppedManagedDatabase, + RestorePoint, + ManagedDatabaseSecurityAlertPolicy, + ManagedServerSecurityAlertPolicy, + SensitivityLabel, + DatabaseOperation, + ElasticPoolOperation, + Database, + ElasticPool, + ElasticPoolPerDatabaseSettings, + VulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentScanError, + DatabaseVulnerabilityAssessmentScansExport, + InstanceFailoverGroup, + InstanceFailoverGroupReadWriteEndpoint, + InstanceFailoverGroupReadOnlyEndpoint, + PartnerRegionInfo, + ManagedInstancePairInfo, + BackupShortTermRetentionPolicy, + TdeCertificate, + ManagedInstanceKey, + ManagedInstanceEncryptionProtector, + RecoverableManagedDatabase, + ManagedInstanceVulnerabilityAssessment, + ServerVulnerabilityAssessment +} from "../models/mappers"; + diff --git a/packages/@azure/arm-sql/lib/operations/backupLongTermRetentionPolicies.ts b/packages/@azure/arm-sql/lib/operations/backupLongTermRetentionPolicies.ts new file mode 100644 index 000000000000..687cf8ee48d2 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/backupLongTermRetentionPolicies.ts @@ -0,0 +1,235 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/backupLongTermRetentionPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a BackupLongTermRetentionPolicies. */ +export class BackupLongTermRetentionPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a BackupLongTermRetentionPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a database's long term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Sets a database's long term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The long term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.BackupLongTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a database's long term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Sets a database's long term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The long term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.BackupLongTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupLongTermRetentionPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupLongTermRetentionPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BackupLongTermRetentionPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BackupLongTermRetentionPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/backupShortTermRetentionPolicies.ts b/packages/@azure/arm-sql/lib/operations/backupShortTermRetentionPolicies.ts new file mode 100644 index 000000000000..a91d73b39445 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/backupShortTermRetentionPolicies.ts @@ -0,0 +1,357 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/backupShortTermRetentionPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a BackupShortTermRetentionPolicies. */ +export class BackupShortTermRetentionPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a BackupShortTermRetentionPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates a database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The short term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.BackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates a database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The short term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.BackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serverName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Updates a database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The short term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.BackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Updates a database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The short term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.BackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets a database's short term retention policy. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupShortTermRetentionPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupShortTermRetentionPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BackupShortTermRetentionPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BackupShortTermRetentionPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BackupShortTermRetentionPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BackupShortTermRetentionPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupShortTermRetentionPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/capabilities.ts b/packages/@azure/arm-sql/lib/operations/capabilities.ts new file mode 100644 index 000000000000..56cbe7ea343b --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/capabilities.ts @@ -0,0 +1,83 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/capabilitiesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a Capabilities. */ +export class Capabilities { + private readonly client: SqlManagementClientContext; + + /** + * Create a Capabilities. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets the subscription capabilities available for the specified location. + * @param locationName The location name whose capabilities are retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + listByLocation(locationName: string, options?: Models.CapabilitiesListByLocationOptionalParams): Promise; + /** + * @param locationName The location name whose capabilities are retrieved. + * @param callback The callback + */ + listByLocation(locationName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The location name whose capabilities are retrieved. + * @param options The optional parameters + * @param callback The callback + */ + listByLocation(locationName: string, options: Models.CapabilitiesListByLocationOptionalParams, callback: msRest.ServiceCallback): void; + listByLocation(locationName: string, options?: Models.CapabilitiesListByLocationOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + options + }, + listByLocationOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByLocationOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/capabilities", + urlParameters: [ + Parameters.locationName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.include, + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LocationCapabilities + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/dataMaskingPolicies.ts b/packages/@azure/arm-sql/lib/operations/dataMaskingPolicies.ts new file mode 100644 index 000000000000..66ddab401ec4 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/dataMaskingPolicies.ts @@ -0,0 +1,173 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/dataMaskingPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a DataMaskingPolicies. */ +export class DataMaskingPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a DataMaskingPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Creates or updates a database data masking policy + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters Parameters for creating or updating a data masking policy. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DataMaskingPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters Parameters for creating or updating a data masking policy. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DataMaskingPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters Parameters for creating or updating a data masking policy. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DataMaskingPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DataMaskingPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets a database data masking policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.dataMaskingPolicyName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DataMaskingPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataMaskingPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.dataMaskingPolicyName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataMaskingPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/dataMaskingRules.ts b/packages/@azure/arm-sql/lib/operations/dataMaskingRules.ts new file mode 100644 index 000000000000..730fb4fa3c41 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/dataMaskingRules.ts @@ -0,0 +1,181 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/dataMaskingRulesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a DataMaskingRules. */ +export class DataMaskingRules { + private readonly client: SqlManagementClientContext; + + /** + * Create a DataMaskingRules. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Creates or updates a database data masking rule. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param dataMaskingRuleName The name of the data masking rule. + * @param parameters The required parameters for creating or updating a data masking rule. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, dataMaskingRuleName: string, parameters: Models.DataMaskingRule, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param dataMaskingRuleName The name of the data masking rule. + * @param parameters The required parameters for creating or updating a data masking rule. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, dataMaskingRuleName: string, parameters: Models.DataMaskingRule, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param dataMaskingRuleName The name of the data masking rule. + * @param parameters The required parameters for creating or updating a data masking rule. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, dataMaskingRuleName: string, parameters: Models.DataMaskingRule, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, dataMaskingRuleName: string, parameters: Models.DataMaskingRule, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + dataMaskingRuleName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of database data masking rules. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.dataMaskingPolicyName, + Parameters.dataMaskingRuleName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DataMaskingRule, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataMaskingRule + }, + 201: { + bodyMapper: Mappers.DataMaskingRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.dataMaskingPolicyName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataMaskingRuleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/databaseAutomaticTuningOperations.ts b/packages/@azure/arm-sql/lib/operations/databaseAutomaticTuningOperations.ts new file mode 100644 index 000000000000..c8538356092a --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/databaseAutomaticTuningOperations.ts @@ -0,0 +1,171 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/databaseAutomaticTuningOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a DatabaseAutomaticTuningOperations. */ +export class DatabaseAutomaticTuningOperations { + private readonly client: SqlManagementClientContext; + + /** + * Create a DatabaseAutomaticTuningOperations. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a database's automatic tuning. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update automatic tuning properties for target database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested automatic tuning resource state. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseAutomaticTuning, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested automatic tuning resource state. + * @param callback The callback + */ + update(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseAutomaticTuning, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested automatic tuning resource state. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseAutomaticTuning, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseAutomaticTuning, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseAutomaticTuning + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DatabaseAutomaticTuning, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DatabaseAutomaticTuning + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/databaseBlobAuditingPolicies.ts b/packages/@azure/arm-sql/lib/operations/databaseBlobAuditingPolicies.ts new file mode 100644 index 000000000000..180f70963210 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/databaseBlobAuditingPolicies.ts @@ -0,0 +1,176 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/databaseBlobAuditingPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a DatabaseBlobAuditingPolicies. */ +export class DatabaseBlobAuditingPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a DatabaseBlobAuditingPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a database's blob auditing policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a database's blob auditing policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The database blob auditing policy. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseBlobAuditingPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The database blob auditing policy. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseBlobAuditingPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The database blob auditing policy. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseBlobAuditingPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseBlobAuditingPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.blobAuditingPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseBlobAuditingPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.blobAuditingPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DatabaseBlobAuditingPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DatabaseBlobAuditingPolicy + }, + 201: { + bodyMapper: Mappers.DatabaseBlobAuditingPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/databaseOperations.ts b/packages/@azure/arm-sql/lib/operations/databaseOperations.ts new file mode 100644 index 000000000000..73da08119974 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/databaseOperations.ts @@ -0,0 +1,212 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/databaseOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a DatabaseOperations. */ +export class DatabaseOperations { + private readonly client: SqlManagementClientContext; + + /** + * Create a DatabaseOperations. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Cancels the asynchronous operation on the database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param operationId The operation identifier. + * @param [options] The optional parameters + * @returns Promise + */ + cancel(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param operationId The operation identifier. + * @param callback The callback + */ + cancel(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param operationId The operation identifier. + * @param options The optional parameters + * @param callback The callback + */ + cancel(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancel(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + operationId, + options + }, + cancelOperationSpec, + callback); + } + + /** + * Gets a list of operations performed on the database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of operations performed on the database. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const cancelOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.operationId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseOperationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseOperationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/databaseThreatDetectionPolicies.ts b/packages/@azure/arm-sql/lib/operations/databaseThreatDetectionPolicies.ts new file mode 100644 index 000000000000..13565e880d9b --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/databaseThreatDetectionPolicies.ts @@ -0,0 +1,182 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/databaseThreatDetectionPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a DatabaseThreatDetectionPolicies. */ +export class DatabaseThreatDetectionPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a DatabaseThreatDetectionPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a database's threat detection policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which database Threat Detection policy is + * defined. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which database Threat Detection policy is + * defined. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which database Threat Detection policy is + * defined. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a database's threat detection policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which database Threat Detection policy is + * defined. + * @param parameters The database Threat Detection policy. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseSecurityAlertPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which database Threat Detection policy is + * defined. + * @param parameters The database Threat Detection policy. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseSecurityAlertPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which database Threat Detection policy is + * defined. + * @param parameters The database Threat Detection policy. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseSecurityAlertPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseSecurityAlertPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.securityAlertPolicyName0 + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseSecurityAlertPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.securityAlertPolicyName0 + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DatabaseSecurityAlertPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DatabaseSecurityAlertPolicy + }, + 201: { + bodyMapper: Mappers.DatabaseSecurityAlertPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/databaseUsages.ts b/packages/@azure/arm-sql/lib/operations/databaseUsages.ts new file mode 100644 index 000000000000..a7146aee6cb0 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/databaseUsages.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/databaseUsagesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a DatabaseUsages. */ +export class DatabaseUsages { + private readonly client: SqlManagementClientContext; + + /** + * Create a DatabaseUsages. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Returns database usages. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseUsageListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessmentRuleBaselines.ts b/packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessmentRuleBaselines.ts new file mode 100644 index 000000000000..f51ea0cf4bd7 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessmentRuleBaselines.ts @@ -0,0 +1,294 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/databaseVulnerabilityAssessmentRuleBaselinesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a DatabaseVulnerabilityAssessmentRuleBaselines. */ +export class DatabaseVulnerabilityAssessmentRuleBaselines { + private readonly client: SqlManagementClientContext; + + /** + * Create a DatabaseVulnerabilityAssessmentRuleBaselines. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a database's vulnerability assessment rule baseline. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + ruleId, + baselineName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a database's vulnerability assessment rule baseline. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param parameters The requested rule baseline resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, parameters: Models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param parameters The requested rule baseline resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, parameters: Models.DatabaseVulnerabilityAssessmentRuleBaseline, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param parameters The requested rule baseline resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, parameters: Models.DatabaseVulnerabilityAssessmentRuleBaseline, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, parameters: Models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + ruleId, + baselineName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Removes the database's vulnerability assessment rule baseline. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + ruleId, + baselineName, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.ruleId, + Parameters.baselineName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentRuleBaseline + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.ruleId, + Parameters.baselineName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DatabaseVulnerabilityAssessmentRuleBaseline, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentRuleBaseline + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.ruleId, + Parameters.baselineName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessmentScans.ts b/packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessmentScans.ts new file mode 100644 index 000000000000..20c44d8e1471 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessmentScans.ts @@ -0,0 +1,356 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/databaseVulnerabilityAssessmentScansMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a DatabaseVulnerabilityAssessmentScans. */ +export class DatabaseVulnerabilityAssessmentScans { + private readonly client: SqlManagementClientContext; + + /** + * Create a DatabaseVulnerabilityAssessmentScans. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Lists the vulnerability assessment scans of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Gets a vulnerability assessment scan record of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + scanId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Executes a Vulnerability Assessment database scan. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param [options] The optional parameters + * @returns Promise + */ + initiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginInitiateScan(resourceGroupName,serverName,databaseName,scanId,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Convert an existing scan result to a human readable format. If already exists nothing happens + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the scanned database. + * @param scanId The vulnerability assessment scan Id. + * @param [options] The optional parameters + * @returns Promise + */ + exportMethod(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the scanned database. + * @param scanId The vulnerability assessment scan Id. + * @param callback The callback + */ + exportMethod(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the scanned database. + * @param scanId The vulnerability assessment scan Id. + * @param options The optional parameters + * @param callback The callback + */ + exportMethod(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + exportMethod(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + scanId, + options + }, + exportMethodOperationSpec, + callback) as Promise; + } + + /** + * Executes a Vulnerability Assessment database scan. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param [options] The optional parameters + * @returns Promise + */ + beginInitiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + scanId, + options + }, + beginInitiateScanOperationSpec, + options); + } + + /** + * Lists the vulnerability assessment scans of a database. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VulnerabilityAssessmentScanRecordListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.scanId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VulnerabilityAssessmentScanRecord + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const exportMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.scanId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentScansExport + }, + 201: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentScansExport + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginInitiateScanOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.scanId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VulnerabilityAssessmentScanRecordListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessments.ts b/packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessments.ts new file mode 100644 index 000000000000..621d018f2bc6 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/databaseVulnerabilityAssessments.ts @@ -0,0 +1,357 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/databaseVulnerabilityAssessmentsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a DatabaseVulnerabilityAssessments. */ +export class DatabaseVulnerabilityAssessments { + private readonly client: SqlManagementClientContext; + + /** + * Create a DatabaseVulnerabilityAssessments. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets the database's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the database's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param parameters The requested resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseVulnerabilityAssessment, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param parameters The requested resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseVulnerabilityAssessment, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param parameters The requested resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseVulnerabilityAssessment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseVulnerabilityAssessment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Removes the database's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists the vulnerability assessment policies associated with a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are + * defined. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are + * defined. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are + * defined. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Lists the vulnerability assessment policies associated with a database. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DatabaseVulnerabilityAssessment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessment + }, + 201: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/databases.ts b/packages/@azure/arm-sql/lib/operations/databases.ts new file mode 100644 index 000000000000..677d089b03c2 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/databases.ts @@ -0,0 +1,1135 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/databasesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a Databases. */ +export class Databases { + private readonly client: SqlManagementClientContext; + + /** + * Create a Databases. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Imports a bacpac into a new database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The required parameters for importing a Bacpac into a database. + * @param [options] The optional parameters + * @returns Promise + */ + importMethod(resourceGroupName: string, serverName: string, parameters: Models.ImportRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginImportMethod(resourceGroupName,serverName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates an import operation that imports a bacpac into an existing database. The existing + * database must be empty. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to import into + * @param parameters The required parameters for importing a Bacpac into a database. + * @param [options] The optional parameters + * @returns Promise + */ + createImportOperation(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ImportExtensionRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateImportOperation(resourceGroupName,serverName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Exports a database to a bacpac. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to be exported. + * @param parameters The required parameters for exporting a database. + * @param [options] The optional parameters + * @returns Promise + */ + exportMethod(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ExportRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginExportMethod(resourceGroupName,serverName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Returns database metrics. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that describes a subset of metrics to return. + * @param [options] The optional parameters + * @returns Promise + */ + listMetrics(resourceGroupName: string, serverName: string, databaseName: string, filter: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that describes a subset of metrics to return. + * @param callback The callback + */ + listMetrics(resourceGroupName: string, serverName: string, databaseName: string, filter: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that describes a subset of metrics to return. + * @param options The optional parameters + * @param callback The callback + */ + listMetrics(resourceGroupName: string, serverName: string, databaseName: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listMetrics(resourceGroupName: string, serverName: string, databaseName: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + filter, + options + }, + listMetricsOperationSpec, + callback) as Promise; + } + + /** + * Returns database metric definitions. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listMetricDefinitions(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listMetricDefinitions(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listMetricDefinitions(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listMetricDefinitions(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listMetricDefinitionsOperationSpec, + callback) as Promise; + } + + /** + * Upgrades a data warehouse. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to be upgraded. + * @param [options] The optional parameters + * @returns Promise + */ + upgradeDataWarehouse(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpgradeDataWarehouse(resourceGroupName,serverName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a list of databases. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Gets a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new database or updates an existing database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested database resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.Database, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates an existing database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested database resource state. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serverName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a list of databases in an elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param [options] The optional parameters + * @returns Promise + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param callback The callback + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param options The optional parameters + * @param callback The callback + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + elasticPoolName, + options + }, + listByElasticPoolOperationSpec, + callback) as Promise; + } + + /** + * Pauses a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to be paused. + * @param [options] The optional parameters + * @returns Promise + */ + pause(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginPause(resourceGroupName,serverName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Resumes a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to be resumed. + * @param [options] The optional parameters + * @returns Promise + */ + resume(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginResume(resourceGroupName,serverName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Renames a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to rename. + * @param parameters The resource move definition for renaming this database. + * @param [options] The optional parameters + * @returns Promise + */ + rename(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ResourceMoveDefinition, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to rename. + * @param parameters The resource move definition for renaming this database. + * @param callback The callback + */ + rename(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ResourceMoveDefinition, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to rename. + * @param parameters The resource move definition for renaming this database. + * @param options The optional parameters + * @param callback The callback + */ + rename(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ResourceMoveDefinition, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + rename(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ResourceMoveDefinition, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + renameOperationSpec, + callback); + } + + /** + * Imports a bacpac into a new database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The required parameters for importing a Bacpac into a database. + * @param [options] The optional parameters + * @returns Promise + */ + beginImportMethod(resourceGroupName: string, serverName: string, parameters: Models.ImportRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + beginImportMethodOperationSpec, + options); + } + + /** + * Creates an import operation that imports a bacpac into an existing database. The existing + * database must be empty. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to import into + * @param parameters The required parameters for importing a Bacpac into a database. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateImportOperation(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ImportExtensionRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + beginCreateImportOperationOperationSpec, + options); + } + + /** + * Exports a database to a bacpac. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to be exported. + * @param parameters The required parameters for exporting a database. + * @param [options] The optional parameters + * @returns Promise + */ + beginExportMethod(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ExportRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + beginExportMethodOperationSpec, + options); + } + + /** + * Upgrades a data warehouse. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to be upgraded. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpgradeDataWarehouse(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + beginUpgradeDataWarehouseOperationSpec, + options); + } + + /** + * Creates a new database or updates an existing database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested database resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.Database, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates an existing database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested database resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.DatabaseUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Pauses a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to be paused. + * @param [options] The optional parameters + * @returns Promise + */ + beginPause(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + beginPauseOperationSpec, + options); + } + + /** + * Resumes a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to be resumed. + * @param [options] The optional parameters + * @returns Promise + */ + beginResume(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + beginResumeOperationSpec, + options); + } + + /** + * Gets a list of databases. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of databases in an elastic pool. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByElasticPoolNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByElasticPoolNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByElasticPoolNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByElasticPoolNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByElasticPoolNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listMetricsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetricListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listMetricDefinitionsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetricDefinitionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Database + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByElasticPoolOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const renameOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ResourceMoveDefinition, + required: true + } + }, + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginImportMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ImportRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ImportExportResponse + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateImportOperationOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.extensionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ImportExtensionRequest, + required: true + } + }, + responses: { + 201: { + bodyMapper: Mappers.ImportExportResponse + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginExportMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ExportRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ImportExportResponse + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpgradeDataWarehouseOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/upgradeDataWarehouse", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Database, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Database + }, + 201: { + bodyMapper: Mappers.Database + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DatabaseUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Database + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginPauseOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Database + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginResumeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Database + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByElasticPoolNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/elasticPoolActivities.ts b/packages/@azure/arm-sql/lib/operations/elasticPoolActivities.ts new file mode 100644 index 000000000000..41b02ce1dc7a --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/elasticPoolActivities.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/elasticPoolActivitiesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ElasticPoolActivities. */ +export class ElasticPoolActivities { + private readonly client: SqlManagementClientContext; + + /** + * Create a ElasticPoolActivities. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Returns elastic pool activities. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool for which to get the current activity. + * @param [options] The optional parameters + * @returns Promise + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool for which to get the current activity. + * @param callback The callback + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool for which to get the current activity. + * @param options The optional parameters + * @param callback The callback + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + elasticPoolName, + options + }, + listByElasticPoolOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByElasticPoolOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ElasticPoolActivityListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/elasticPoolDatabaseActivities.ts b/packages/@azure/arm-sql/lib/operations/elasticPoolDatabaseActivities.ts new file mode 100644 index 000000000000..12a137296830 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/elasticPoolDatabaseActivities.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/elasticPoolDatabaseActivitiesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ElasticPoolDatabaseActivities. */ +export class ElasticPoolDatabaseActivities { + private readonly client: SqlManagementClientContext; + + /** + * Create a ElasticPoolDatabaseActivities. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Returns activity on databases inside of an elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param [options] The optional parameters + * @returns Promise + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param callback The callback + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param options The optional parameters + * @param callback The callback + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + elasticPoolName, + options + }, + listByElasticPoolOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByElasticPoolOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ElasticPoolDatabaseActivityListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/elasticPoolOperations.ts b/packages/@azure/arm-sql/lib/operations/elasticPoolOperations.ts new file mode 100644 index 000000000000..049f74e667db --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/elasticPoolOperations.ts @@ -0,0 +1,212 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/elasticPoolOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ElasticPoolOperations. */ +export class ElasticPoolOperations { + private readonly client: SqlManagementClientContext; + + /** + * Create a ElasticPoolOperations. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Cancels the asynchronous operation on the elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName + * @param operationId The operation identifier. + * @param [options] The optional parameters + * @returns Promise + */ + cancel(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName + * @param operationId The operation identifier. + * @param callback The callback + */ + cancel(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName + * @param operationId The operation identifier. + * @param options The optional parameters + * @param callback The callback + */ + cancel(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancel(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + elasticPoolName, + operationId, + options + }, + cancelOperationSpec, + callback); + } + + /** + * Gets a list of operations performed on the elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName + * @param [options] The optional parameters + * @returns Promise + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName + * @param callback The callback + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName + * @param options The optional parameters + * @param callback The callback + */ + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + elasticPoolName, + options + }, + listByElasticPoolOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of operations performed on the elastic pool. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByElasticPoolNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByElasticPoolNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByElasticPoolNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByElasticPoolNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByElasticPoolNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const cancelOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName, + Parameters.operationId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByElasticPoolOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ElasticPoolOperationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByElasticPoolNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ElasticPoolOperationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/elasticPools.ts b/packages/@azure/arm-sql/lib/operations/elasticPools.ts new file mode 100644 index 000000000000..a76c54524e24 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/elasticPools.ts @@ -0,0 +1,549 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/elasticPoolsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ElasticPools. */ +export class ElasticPools { + private readonly client: SqlManagementClientContext; + + /** + * Create a ElasticPools. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Returns elastic pool metrics. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param filter An OData filter expression that describes a subset of metrics to return. + * @param [options] The optional parameters + * @returns Promise + */ + listMetrics(resourceGroupName: string, serverName: string, elasticPoolName: string, filter: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param filter An OData filter expression that describes a subset of metrics to return. + * @param callback The callback + */ + listMetrics(resourceGroupName: string, serverName: string, elasticPoolName: string, filter: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param filter An OData filter expression that describes a subset of metrics to return. + * @param options The optional parameters + * @param callback The callback + */ + listMetrics(resourceGroupName: string, serverName: string, elasticPoolName: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listMetrics(resourceGroupName: string, serverName: string, elasticPoolName: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + elasticPoolName, + filter, + options + }, + listMetricsOperationSpec, + callback) as Promise; + } + + /** + * Returns elastic pool metric definitions. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param [options] The optional parameters + * @returns Promise + */ + listMetricDefinitions(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param callback The callback + */ + listMetricDefinitions(resourceGroupName: string, serverName: string, elasticPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param options The optional parameters + * @param callback The callback + */ + listMetricDefinitions(resourceGroupName: string, serverName: string, elasticPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listMetricDefinitions(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + elasticPoolName, + options + }, + listMetricDefinitionsOperationSpec, + callback) as Promise; + } + + /** + * Gets all elastic pools in a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: Models.ElasticPoolsListByServerOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: Models.ElasticPoolsListByServerOptionalParams, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: Models.ElasticPoolsListByServerOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Gets an elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, elasticPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, elasticPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + elasticPoolName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool parameters. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, elasticPoolName: string, parameters: Models.ElasticPool, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,elasticPoolName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,elasticPoolName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates an elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, serverName: string, elasticPoolName: string, parameters: Models.ElasticPoolUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serverName,elasticPoolName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates an elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool parameters. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, elasticPoolName: string, parameters: Models.ElasticPool, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + elasticPoolName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes an elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + elasticPoolName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates an elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, serverName: string, elasticPoolName: string, parameters: Models.ElasticPoolUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + elasticPoolName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets all elastic pools in a server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listMetricsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetricListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listMetricDefinitionsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetricDefinitionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.skip, + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ElasticPoolListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ElasticPool + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ElasticPool, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ElasticPool + }, + 201: { + bodyMapper: Mappers.ElasticPool + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.elasticPoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ElasticPoolUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ElasticPool + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ElasticPoolListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/encryptionProtectors.ts b/packages/@azure/arm-sql/lib/operations/encryptionProtectors.ts new file mode 100644 index 000000000000..cf551537ce79 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/encryptionProtectors.ts @@ -0,0 +1,270 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/encryptionProtectorsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a EncryptionProtectors. */ +export class EncryptionProtectors { + private readonly client: SqlManagementClientContext; + + /** + * Create a EncryptionProtectors. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of server encryption protectors + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Gets a server encryption protector. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates an existing encryption protector. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested encryption protector resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.EncryptionProtector, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing encryption protector. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested encryption protector resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.EncryptionProtector, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Gets a list of server encryption protectors + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.EncryptionProtectorListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.encryptionProtectorName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.EncryptionProtector + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.encryptionProtectorName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.EncryptionProtector, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.EncryptionProtector + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.EncryptionProtectorListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/extendedDatabaseBlobAuditingPolicies.ts b/packages/@azure/arm-sql/lib/operations/extendedDatabaseBlobAuditingPolicies.ts new file mode 100644 index 000000000000..9ef57481318c --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/extendedDatabaseBlobAuditingPolicies.ts @@ -0,0 +1,176 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/extendedDatabaseBlobAuditingPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ExtendedDatabaseBlobAuditingPolicies. */ +export class ExtendedDatabaseBlobAuditingPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a ExtendedDatabaseBlobAuditingPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets an extended database's blob auditing policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an extended database's blob auditing policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The extended database blob auditing policy. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ExtendedDatabaseBlobAuditingPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The extended database blob auditing policy. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ExtendedDatabaseBlobAuditingPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The extended database blob auditing policy. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ExtendedDatabaseBlobAuditingPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.ExtendedDatabaseBlobAuditingPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.blobAuditingPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.blobAuditingPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ExtendedDatabaseBlobAuditingPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy + }, + 201: { + bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/extendedServerBlobAuditingPolicies.ts b/packages/@azure/arm-sql/lib/operations/extendedServerBlobAuditingPolicies.ts new file mode 100644 index 000000000000..b870dc3035db --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/extendedServerBlobAuditingPolicies.ts @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/extendedServerBlobAuditingPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ExtendedServerBlobAuditingPolicies. */ +export class ExtendedServerBlobAuditingPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a ExtendedServerBlobAuditingPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets an extended server's blob auditing policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an extended server's blob auditing policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters Properties of extended blob auditing policy + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ExtendedServerBlobAuditingPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates an extended server's blob auditing policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters Properties of extended blob auditing policy + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ExtendedServerBlobAuditingPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.blobAuditingPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExtendedServerBlobAuditingPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.blobAuditingPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ExtendedServerBlobAuditingPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ExtendedServerBlobAuditingPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/failoverGroups.ts b/packages/@azure/arm-sql/lib/operations/failoverGroups.ts new file mode 100644 index 000000000000..6d848d2f2018 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/failoverGroups.ts @@ -0,0 +1,539 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/failoverGroupsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a FailoverGroups. */ +export class FailoverGroups { + private readonly client: SqlManagementClientContext; + + /** + * Create a FailoverGroups. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, failoverGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, failoverGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + failoverGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, failoverGroupName: string, parameters: Models.FailoverGroup, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,failoverGroupName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,failoverGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, serverName: string, failoverGroupName: string, parameters: Models.FailoverGroupUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serverName,failoverGroupName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists the failover groups in a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Fails over from the current primary server to this server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + failover(resourceGroupName: string, serverName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginFailover(resourceGroupName,serverName,failoverGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Fails over from the current primary server to this server. This operation might result in data + * loss. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + forceFailoverAllowDataLoss(resourceGroupName: string, serverName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginForceFailoverAllowDataLoss(resourceGroupName,serverName,failoverGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, failoverGroupName: string, parameters: Models.FailoverGroup, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + failoverGroupName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + failoverGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, serverName: string, failoverGroupName: string, parameters: Models.FailoverGroupUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + failoverGroupName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Fails over from the current primary server to this server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + beginFailover(resourceGroupName: string, serverName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + failoverGroupName, + options + }, + beginFailoverOperationSpec, + options); + } + + /** + * Fails over from the current primary server to this server. This operation might result in data + * loss. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + beginForceFailoverAllowDataLoss(resourceGroupName: string, serverName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + failoverGroupName, + options + }, + beginForceFailoverAllowDataLossOperationSpec, + options); + } + + /** + * Lists the failover groups in a server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FailoverGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FailoverGroupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.FailoverGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.FailoverGroup + }, + 201: { + bodyMapper: Mappers.FailoverGroup + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.FailoverGroupUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.FailoverGroup + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginFailoverOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FailoverGroup + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginForceFailoverAllowDataLossOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FailoverGroup + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FailoverGroupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/firewallRules.ts b/packages/@azure/arm-sql/lib/operations/firewallRules.ts new file mode 100644 index 000000000000..af4cf9ddac0c --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/firewallRules.ts @@ -0,0 +1,298 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/firewallRulesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a FirewallRules. */ +export class FirewallRules { + private readonly client: SqlManagementClientContext; + + /** + * Create a FirewallRules. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Creates or updates a firewall rule. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters for creating or updating a firewall rule. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, firewallRuleName: string, parameters: Models.FirewallRule, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters for creating or updating a firewall rule. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, firewallRuleName: string, parameters: Models.FirewallRule, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters for creating or updating a firewall rule. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, firewallRuleName: string, parameters: Models.FirewallRule, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, firewallRuleName: string, parameters: Models.FirewallRule, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + firewallRuleName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a firewall rule. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, firewallRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, firewallRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, firewallRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, firewallRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + firewallRuleName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets a firewall rule. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, firewallRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, firewallRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, firewallRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, firewallRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + firewallRuleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns a list of firewall rules. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.firewallRuleName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.FirewallRule, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.FirewallRule + }, + 201: { + bodyMapper: Mappers.FirewallRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.firewallRuleName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.firewallRuleName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FirewallRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FirewallRuleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/geoBackupPolicies.ts b/packages/@azure/arm-sql/lib/operations/geoBackupPolicies.ts new file mode 100644 index 000000000000..661201b459fb --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/geoBackupPolicies.ts @@ -0,0 +1,241 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/geoBackupPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a GeoBackupPolicies. */ +export class GeoBackupPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a GeoBackupPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Updates a database geo backup policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The required parameters for creating or updating the geo backup policy. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.GeoBackupPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The required parameters for creating or updating the geo backup policy. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.GeoBackupPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The required parameters for creating or updating the geo backup policy. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.GeoBackupPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.GeoBackupPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets a geo backup policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns a list of geo backup policies. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.geoBackupPolicyName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.GeoBackupPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.GeoBackupPolicy + }, + 201: { + bodyMapper: Mappers.GeoBackupPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.geoBackupPolicyName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GeoBackupPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GeoBackupPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/index.ts b/packages/@azure/arm-sql/lib/operations/index.ts new file mode 100644 index 000000000000..4b4f1aa68d75 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/index.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./recoverableDatabases"; +export * from "./restorableDroppedDatabases"; +export * from "./servers"; +export * from "./serverConnectionPolicies"; +export * from "./databaseThreatDetectionPolicies"; +export * from "./dataMaskingPolicies"; +export * from "./dataMaskingRules"; +export * from "./firewallRules"; +export * from "./geoBackupPolicies"; +export * from "./databases"; +export * from "./elasticPools"; +export * from "./recommendedElasticPools"; +export * from "./replicationLinks"; +export * from "./serverAzureADAdministrators"; +export * from "./serverCommunicationLinks"; +export * from "./serviceObjectives"; +export * from "./elasticPoolActivities"; +export * from "./elasticPoolDatabaseActivities"; +export * from "./serviceTierAdvisors"; +export * from "./transparentDataEncryptions"; +export * from "./transparentDataEncryptionActivities"; +export * from "./serverUsages"; +export * from "./databaseUsages"; +export * from "./databaseAutomaticTuningOperations"; +export * from "./encryptionProtectors"; +export * from "./failoverGroups"; +export * from "./managedInstances"; +export * from "./operations"; +export * from "./serverKeys"; +export * from "./syncAgents"; +export * from "./syncGroups"; +export * from "./syncMembers"; +export * from "./subscriptionUsages"; +export * from "./virtualClusters"; +export * from "./virtualNetworkRules"; +export * from "./extendedDatabaseBlobAuditingPolicies"; +export * from "./extendedServerBlobAuditingPolicies"; +export * from "./serverBlobAuditingPolicies"; +export * from "./databaseBlobAuditingPolicies"; +export * from "./databaseVulnerabilityAssessmentRuleBaselines"; +export * from "./databaseVulnerabilityAssessments"; +export * from "./jobAgents"; +export * from "./jobCredentials"; +export * from "./jobExecutions"; +export * from "./jobs"; +export * from "./jobStepExecutions"; +export * from "./jobSteps"; +export * from "./jobTargetExecutions"; +export * from "./jobTargetGroups"; +export * from "./jobVersions"; +export * from "./longTermRetentionBackups"; +export * from "./backupLongTermRetentionPolicies"; +export * from "./managedBackupShortTermRetentionPolicies"; +export * from "./managedDatabases"; +export * from "./managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies"; +export * from "./serverAutomaticTuningOperations"; +export * from "./serverDnsAliases"; +export * from "./serverSecurityAlertPolicies"; +export * from "./restorableDroppedManagedDatabases"; +export * from "./restorePoints"; +export * from "./managedDatabaseSecurityAlertPolicies"; +export * from "./managedServerSecurityAlertPolicies"; +export * from "./sensitivityLabels"; +export * from "./databaseOperations"; +export * from "./elasticPoolOperations"; +export * from "./capabilities"; +export * from "./databaseVulnerabilityAssessmentScans"; +export * from "./managedDatabaseVulnerabilityAssessmentRuleBaselines"; +export * from "./managedDatabaseVulnerabilityAssessmentScans"; +export * from "./managedDatabaseVulnerabilityAssessments"; +export * from "./instanceFailoverGroups"; +export * from "./backupShortTermRetentionPolicies"; +export * from "./tdeCertificates"; +export * from "./managedInstanceTdeCertificates"; +export * from "./managedInstanceKeys"; +export * from "./managedInstanceEncryptionProtectors"; +export * from "./recoverableManagedDatabases"; +export * from "./managedInstanceVulnerabilityAssessments"; +export * from "./serverVulnerabilityAssessments"; +export * from "./managedDatabaseSensitivityLabels"; diff --git a/packages/@azure/arm-sql/lib/operations/instanceFailoverGroups.ts b/packages/@azure/arm-sql/lib/operations/instanceFailoverGroups.ts new file mode 100644 index 000000000000..be0ae243f7f4 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/instanceFailoverGroups.ts @@ -0,0 +1,467 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/instanceFailoverGroupsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a InstanceFailoverGroups. */ +export class InstanceFailoverGroups { + private readonly client: SqlManagementClientContext; + + /** + * Create a InstanceFailoverGroups. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param callback The callback + */ + get(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, locationName: string, failoverGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + locationName, + failoverGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: Models.InstanceFailoverGroup, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,locationName,failoverGroupName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,locationName,failoverGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists the failover groups in a location. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param [options] The optional parameters + * @returns Promise + */ + listByLocation(resourceGroupName: string, locationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param callback The callback + */ + listByLocation(resourceGroupName: string, locationName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param options The optional parameters + * @param callback The callback + */ + listByLocation(resourceGroupName: string, locationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByLocation(resourceGroupName: string, locationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + locationName, + options + }, + listByLocationOperationSpec, + callback) as Promise; + } + + /** + * Fails over from the current primary managed instance to this managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + failover(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginFailover(resourceGroupName,locationName,failoverGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Fails over from the current primary managed instance to this managed instance. This operation + * might result in data loss. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + forceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginForceFailoverAllowDataLoss(resourceGroupName,locationName,failoverGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: Models.InstanceFailoverGroup, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + locationName, + failoverGroupName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a failover group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + locationName, + failoverGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Fails over from the current primary managed instance to this managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + beginFailover(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + locationName, + failoverGroupName, + options + }, + beginFailoverOperationSpec, + options); + } + + /** + * Fails over from the current primary managed instance to this managed instance. This operation + * might result in data loss. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @param failoverGroupName The name of the failover group. + * @param [options] The optional parameters + * @returns Promise + */ + beginForceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + locationName, + failoverGroupName, + options + }, + beginForceFailoverAllowDataLossOperationSpec, + options); + } + + /** + * Lists the failover groups in a location. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByLocationNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByLocationNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByLocationNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByLocationNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByLocationNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.locationName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstanceFailoverGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByLocationOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.locationName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstanceFailoverGroupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.locationName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.InstanceFailoverGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.InstanceFailoverGroup + }, + 201: { + bodyMapper: Mappers.InstanceFailoverGroup + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.locationName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginFailoverOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.locationName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstanceFailoverGroup + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginForceFailoverAllowDataLossOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.locationName, + Parameters.failoverGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstanceFailoverGroup + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByLocationNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstanceFailoverGroupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/jobAgents.ts b/packages/@azure/arm-sql/lib/operations/jobAgents.ts new file mode 100644 index 000000000000..6867ba6018b4 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/jobAgents.ts @@ -0,0 +1,413 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jobAgentsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a JobAgents. */ +export class JobAgents { + private readonly client: SqlManagementClientContext; + + /** + * Create a JobAgents. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of job agents in a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Gets a job agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be retrieved. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a job agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be created or updated. + * @param parameters The requested job agent resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: Models.JobAgent, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,jobAgentName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a job agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be deleted. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,jobAgentName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates a job agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: Models.JobAgentUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serverName,jobAgentName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates a job agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be created or updated. + * @param parameters The requested job agent resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: Models.JobAgent, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + jobAgentName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a job agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be deleted. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + jobAgentName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates a job agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: Models.JobAgentUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + jobAgentName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets a list of job agents in a server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobAgentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobAgent + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.JobAgent, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.JobAgent + }, + 201: { + bodyMapper: Mappers.JobAgent + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.JobAgentUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.JobAgent + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobAgentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/jobCredentials.ts b/packages/@azure/arm-sql/lib/operations/jobCredentials.ts new file mode 100644 index 000000000000..da33732cbf94 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/jobCredentials.ts @@ -0,0 +1,367 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jobCredentialsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a JobCredentials. */ +export class JobCredentials { + private readonly client: SqlManagementClientContext; + + /** + * Create a JobCredentials. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of jobs credentials. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param [options] The optional parameters + * @returns Promise + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param callback The callback + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param options The optional parameters + * @param callback The callback + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + options + }, + listByAgentOperationSpec, + callback) as Promise; + } + + /** + * Gets a jobs credential. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param credentialName The name of the credential. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param credentialName The name of the credential. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param credentialName The name of the credential. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + credentialName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a job credential. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param credentialName The name of the credential. + * @param parameters The requested job credential state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, parameters: Models.JobCredential, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param credentialName The name of the credential. + * @param parameters The requested job credential state. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, parameters: Models.JobCredential, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param credentialName The name of the credential. + * @param parameters The requested job credential state. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, parameters: Models.JobCredential, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, parameters: Models.JobCredential, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + credentialName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a job credential. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param credentialName The name of the credential. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param credentialName The name of the credential. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param credentialName The name of the credential. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + credentialName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets a list of jobs credentials. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByAgentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByAgentNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByAgentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAgentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByAgentNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByAgentOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobCredentialListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.credentialName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobCredential + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.credentialName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.JobCredential, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.JobCredential + }, + 201: { + bodyMapper: Mappers.JobCredential + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.credentialName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByAgentNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobCredentialListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/jobExecutions.ts b/packages/@azure/arm-sql/lib/operations/jobExecutions.ts new file mode 100644 index 000000000000..5bb3c069e122 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/jobExecutions.ts @@ -0,0 +1,565 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jobExecutionsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a JobExecutions. */ +export class JobExecutions { + private readonly client: SqlManagementClientContext; + + /** + * Create a JobExecutions. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Lists all executions in a job agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param [options] The optional parameters + * @returns Promise + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: Models.JobExecutionsListByAgentOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param callback The callback + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param options The optional parameters + * @param callback The callback + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: Models.JobExecutionsListByAgentOptionalParams, callback: msRest.ServiceCallback): void; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: Models.JobExecutionsListByAgentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + options + }, + listByAgentOperationSpec, + callback) as Promise; + } + + /** + * Requests cancellation of a job execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution to cancel. + * @param [options] The optional parameters + * @returns Promise + */ + cancel(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution to cancel. + * @param callback The callback + */ + cancel(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution to cancel. + * @param options The optional parameters + * @param callback The callback + */ + cancel(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancel(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobExecutionId, + options + }, + cancelOperationSpec, + callback); + } + + /** + * Starts an elastic job execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,serverName,jobAgentName,jobName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists a job's executions. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param [options] The optional parameters + * @returns Promise + */ + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: Models.JobExecutionsListByJobOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param callback The callback + */ + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param options The optional parameters + * @param callback The callback + */ + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: Models.JobExecutionsListByJobOptionalParams, callback: msRest.ServiceCallback): void; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: Models.JobExecutionsListByJobOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + options + }, + listByJobOperationSpec, + callback) as Promise; + } + + /** + * Gets a job execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobExecutionId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a job execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,jobAgentName,jobName,jobExecutionId,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Starts an elastic job execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Creates or updates a job execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobExecutionId, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Lists all executions in a job agent. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByAgentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByAgentNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByAgentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAgentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByAgentNextOperationSpec, + callback) as Promise; + } + + /** + * Lists a job's executions. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByJobNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByJobNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByJobNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByJobNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByJobNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByAgentOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.createTimeMin, + Parameters.createTimeMax, + Parameters.endTimeMin, + Parameters.endTimeMax, + Parameters.isActive, + Parameters.skip, + Parameters.top, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecutionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const cancelOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobExecutionId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByJobOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.createTimeMin, + Parameters.createTimeMax, + Parameters.endTimeMin, + Parameters.endTimeMax, + Parameters.isActive, + Parameters.skip, + Parameters.top, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecutionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobExecutionId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecution + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecution + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobExecutionId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecution + }, + 201: { + bodyMapper: Mappers.JobExecution + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByAgentNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecutionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByJobNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecutionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/jobStepExecutions.ts b/packages/@azure/arm-sql/lib/operations/jobStepExecutions.ts new file mode 100644 index 000000000000..225f9da48067 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/jobStepExecutions.ts @@ -0,0 +1,241 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jobStepExecutionsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a JobStepExecutions. */ +export class JobStepExecutions { + private readonly client: SqlManagementClientContext; + + /** + * Create a JobStepExecutions. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Lists the step executions of a job execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The id of the job execution + * @param [options] The optional parameters + * @returns Promise + */ + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: Models.JobStepExecutionsListByJobExecutionOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The id of the job execution + * @param callback The callback + */ + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The id of the job execution + * @param options The optional parameters + * @param callback The callback + */ + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: Models.JobStepExecutionsListByJobExecutionOptionalParams, callback: msRest.ServiceCallback): void; + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: Models.JobStepExecutionsListByJobExecutionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobExecutionId, + options + }, + listByJobExecutionOperationSpec, + callback) as Promise; + } + + /** + * Gets a step execution of a job execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution + * @param stepName The name of the step. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution + * @param stepName The name of the step. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution + * @param stepName The name of the step. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobExecutionId, + stepName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists the step executions of a job execution. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByJobExecutionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByJobExecutionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByJobExecutionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByJobExecutionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByJobExecutionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByJobExecutionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobExecutionId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.createTimeMin, + Parameters.createTimeMax, + Parameters.endTimeMin, + Parameters.endTimeMax, + Parameters.isActive, + Parameters.skip, + Parameters.top, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecutionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobExecutionId, + Parameters.stepName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecution + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByJobExecutionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecutionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/jobSteps.ts b/packages/@azure/arm-sql/lib/operations/jobSteps.ts new file mode 100644 index 000000000000..5510e9a639ff --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/jobSteps.ts @@ -0,0 +1,591 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jobStepsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a JobSteps. */ +export class JobSteps { + private readonly client: SqlManagementClientContext; + + /** + * Create a JobSteps. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets all job steps in the specified job version. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. + * @param [options] The optional parameters + * @returns Promise + */ + listByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. + * @param callback The callback + */ + listByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. + * @param options The optional parameters + * @param callback The callback + */ + listByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobVersion, + options + }, + listByVersionOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified version of a job step. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. + * @param stepName The name of the job step. + * @param [options] The optional parameters + * @returns Promise + */ + getByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. + * @param stepName The name of the job step. + * @param callback The callback + */ + getByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. + * @param stepName The name of the job step. + * @param options The optional parameters + * @param callback The callback + */ + getByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobVersion, + stepName, + options + }, + getByVersionOperationSpec, + callback) as Promise; + } + + /** + * Gets all job steps for a job's current version. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param [options] The optional parameters + * @returns Promise + */ + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param callback The callback + */ + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param options The optional parameters + * @param callback The callback + */ + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + options + }, + listByJobOperationSpec, + callback) as Promise; + } + + /** + * Gets a job step in a job's current version. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param stepName The name of the job step. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param stepName The name of the job step. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param stepName The name of the job step. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + stepName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a job step. This will implicitly create a new job version. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param stepName The name of the job step. + * @param parameters The requested state of the job step. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, parameters: Models.JobStep, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param stepName The name of the job step. + * @param parameters The requested state of the job step. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, parameters: Models.JobStep, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param stepName The name of the job step. + * @param parameters The requested state of the job step. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, parameters: Models.JobStep, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, parameters: Models.JobStep, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + stepName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a job step. This will implicitly create a new job version. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param stepName The name of the job step to delete. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param stepName The name of the job step to delete. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param stepName The name of the job step to delete. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + stepName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets all job steps in the specified job version. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByVersionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByVersionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByVersionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByVersionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByVersionNextOperationSpec, + callback) as Promise; + } + + /** + * Gets all job steps for a job's current version. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByJobNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByJobNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByJobNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByJobNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByJobNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByVersionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobVersion, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobStepListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getByVersionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobVersion, + Parameters.stepName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobStep + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByJobOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobStepListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.stepName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobStep + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.stepName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.JobStep, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.JobStep + }, + 201: { + bodyMapper: Mappers.JobStep + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.stepName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByVersionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobStepListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByJobNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobStepListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/jobTargetExecutions.ts b/packages/@azure/arm-sql/lib/operations/jobTargetExecutions.ts new file mode 100644 index 000000000000..b026251e445c --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/jobTargetExecutions.ts @@ -0,0 +1,382 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jobTargetExecutionsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a JobTargetExecutions. */ +export class JobTargetExecutions { + private readonly client: SqlManagementClientContext; + + /** + * Create a JobTargetExecutions. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Lists target executions for all steps of a job execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The id of the job execution + * @param [options] The optional parameters + * @returns Promise + */ + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: Models.JobTargetExecutionsListByJobExecutionOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The id of the job execution + * @param callback The callback + */ + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The id of the job execution + * @param options The optional parameters + * @param callback The callback + */ + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: Models.JobTargetExecutionsListByJobExecutionOptionalParams, callback: msRest.ServiceCallback): void; + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: Models.JobTargetExecutionsListByJobExecutionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobExecutionId, + options + }, + listByJobExecutionOperationSpec, + callback) as Promise; + } + + /** + * Lists the target executions of a job step execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The id of the job execution + * @param stepName The name of the step. + * @param [options] The optional parameters + * @returns Promise + */ + listByStep(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: Models.JobTargetExecutionsListByStepOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The id of the job execution + * @param stepName The name of the step. + * @param callback The callback + */ + listByStep(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The id of the job execution + * @param stepName The name of the step. + * @param options The optional parameters + * @param callback The callback + */ + listByStep(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options: Models.JobTargetExecutionsListByStepOptionalParams, callback: msRest.ServiceCallback): void; + listByStep(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: Models.JobTargetExecutionsListByStepOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobExecutionId, + stepName, + options + }, + listByStepOperationSpec, + callback) as Promise; + } + + /** + * Gets a target execution. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution + * @param stepName The name of the step. + * @param targetId The target id. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution + * @param stepName The name of the step. + * @param targetId The target id. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution + * @param stepName The name of the step. + * @param targetId The target id. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobExecutionId, + stepName, + targetId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists target executions for all steps of a job execution. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByJobExecutionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByJobExecutionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByJobExecutionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByJobExecutionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByJobExecutionNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the target executions of a job step execution. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByStepNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByStepNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByStepNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByStepNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByStepNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByJobExecutionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobExecutionId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.createTimeMin, + Parameters.createTimeMax, + Parameters.endTimeMin, + Parameters.endTimeMax, + Parameters.isActive, + Parameters.skip, + Parameters.top, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecutionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByStepOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobExecutionId, + Parameters.stepName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.createTimeMin, + Parameters.createTimeMax, + Parameters.endTimeMin, + Parameters.endTimeMax, + Parameters.isActive, + Parameters.skip, + Parameters.top, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecutionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobExecutionId, + Parameters.stepName, + Parameters.targetId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecution + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByJobExecutionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecutionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByStepNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobExecutionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/jobTargetGroups.ts b/packages/@azure/arm-sql/lib/operations/jobTargetGroups.ts new file mode 100644 index 000000000000..8ffff9a406fa --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/jobTargetGroups.ts @@ -0,0 +1,367 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jobTargetGroupsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a JobTargetGroups. */ +export class JobTargetGroups { + private readonly client: SqlManagementClientContext; + + /** + * Create a JobTargetGroups. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets all target groups in an agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param [options] The optional parameters + * @returns Promise + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param callback The callback + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param options The optional parameters + * @param callback The callback + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + options + }, + listByAgentOperationSpec, + callback) as Promise; + } + + /** + * Gets a target group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param targetGroupName The name of the target group. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param targetGroupName The name of the target group. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param targetGroupName The name of the target group. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + targetGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a target group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param targetGroupName The name of the target group. + * @param parameters The requested state of the target group. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, parameters: Models.JobTargetGroup, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param targetGroupName The name of the target group. + * @param parameters The requested state of the target group. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, parameters: Models.JobTargetGroup, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param targetGroupName The name of the target group. + * @param parameters The requested state of the target group. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, parameters: Models.JobTargetGroup, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, parameters: Models.JobTargetGroup, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + targetGroupName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a target group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param targetGroupName The name of the target group. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param targetGroupName The name of the target group. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param targetGroupName The name of the target group. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + targetGroupName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets all target groups in an agent. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByAgentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByAgentNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByAgentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAgentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByAgentNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByAgentOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobTargetGroupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.targetGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobTargetGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.targetGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.JobTargetGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.JobTargetGroup + }, + 201: { + bodyMapper: Mappers.JobTargetGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.targetGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByAgentNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobTargetGroupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/jobVersions.ts b/packages/@azure/arm-sql/lib/operations/jobVersions.ts new file mode 100644 index 000000000000..b8d28f5ac641 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/jobVersions.ts @@ -0,0 +1,224 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jobVersionsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a JobVersions. */ +export class JobVersions { + private readonly client: SqlManagementClientContext; + + /** + * Create a JobVersions. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets all versions of a job. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param [options] The optional parameters + * @returns Promise + */ + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param callback The callback + */ + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param options The optional parameters + * @param callback The callback + */ + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + options + }, + listByJobOperationSpec, + callback) as Promise; + } + + /** + * Gets a job version. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobVersion, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets all versions of a job. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByJobNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByJobNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByJobNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByJobNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByJobNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByJobOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobVersionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobVersion, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobVersion + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByJobNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobVersionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/jobs.ts b/packages/@azure/arm-sql/lib/operations/jobs.ts new file mode 100644 index 000000000000..ba62a7a9c6c3 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/jobs.ts @@ -0,0 +1,367 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jobsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a Jobs. */ +export class Jobs { + private readonly client: SqlManagementClientContext; + + /** + * Create a Jobs. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of jobs. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param [options] The optional parameters + * @returns Promise + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param callback The callback + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param options The optional parameters + * @param callback The callback + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + options + }, + listByAgentOperationSpec, + callback) as Promise; + } + + /** + * Gets a job. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a job. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param parameters The requested job state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, parameters: Models.Job, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param parameters The requested job state. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, parameters: Models.Job, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param parameters The requested job state. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, parameters: Models.Job, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, parameters: Models.Job, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a job. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets a list of jobs. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByAgentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByAgentNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByAgentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAgentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByAgentNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByAgentOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Job, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Job + }, + 201: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByAgentNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/longTermRetentionBackups.ts b/packages/@azure/arm-sql/lib/operations/longTermRetentionBackups.ts new file mode 100644 index 000000000000..ba117c85fb3c --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/longTermRetentionBackups.ts @@ -0,0 +1,484 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/longTermRetentionBackupsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a LongTermRetentionBackups. */ +export class LongTermRetentionBackups { + private readonly client: SqlManagementClientContext; + + /** + * Create a LongTermRetentionBackups. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a long term retention backup. + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param backupName The backup name. + * @param [options] The optional parameters + * @returns Promise + */ + get(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param backupName The backup name. + * @param callback The callback + */ + get(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param backupName The backup name. + * @param options The optional parameters + * @param callback The callback + */ + get(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + backupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes a long term retention backup. + * @param locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param backupName The backup name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(locationName,longTermRetentionServerName,longTermRetentionDatabaseName,backupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists all long term retention backups for a database. + * @param locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, options?: Models.LongTermRetentionBackupsListByDatabaseOptionalParams): Promise; + /** + * @param locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param callback The callback + */ + listByDatabase(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, options: Models.LongTermRetentionBackupsListByDatabaseOptionalParams, callback: msRest.ServiceCallback): void; + listByDatabase(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, options?: Models.LongTermRetentionBackupsListByDatabaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Lists the long term retention backups for a given location. + * @param locationName The location of the database + * @param [options] The optional parameters + * @returns Promise + */ + listByLocation(locationName: string, options?: Models.LongTermRetentionBackupsListByLocationOptionalParams): Promise; + /** + * @param locationName The location of the database + * @param callback The callback + */ + listByLocation(locationName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The location of the database + * @param options The optional parameters + * @param callback The callback + */ + listByLocation(locationName: string, options: Models.LongTermRetentionBackupsListByLocationOptionalParams, callback: msRest.ServiceCallback): void; + listByLocation(locationName: string, options?: Models.LongTermRetentionBackupsListByLocationOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + options + }, + listByLocationOperationSpec, + callback) as Promise; + } + + /** + * Lists the long term retention backups for a given server. + * @param locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(locationName: string, longTermRetentionServerName: string, options?: Models.LongTermRetentionBackupsListByServerOptionalParams): Promise; + /** + * @param locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param callback The callback + */ + listByServer(locationName: string, longTermRetentionServerName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param options The optional parameters + * @param callback The callback + */ + listByServer(locationName: string, longTermRetentionServerName: string, options: Models.LongTermRetentionBackupsListByServerOptionalParams, callback: msRest.ServiceCallback): void; + listByServer(locationName: string, longTermRetentionServerName: string, options?: Models.LongTermRetentionBackupsListByServerOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + longTermRetentionServerName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Deletes a long term retention backup. + * @param locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param backupName The backup name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + backupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists all long term retention backups for a database. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDatabaseNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the long term retention backups for a given location. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByLocationNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByLocationNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByLocationNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByLocationNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByLocationNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the long term retention backups for a given server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}", + urlParameters: [ + Parameters.locationName, + Parameters.longTermRetentionServerName, + Parameters.longTermRetentionDatabaseName, + Parameters.backupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionBackup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups", + urlParameters: [ + Parameters.locationName, + Parameters.longTermRetentionServerName, + Parameters.longTermRetentionDatabaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.onlyLatestPerDatabase, + Parameters.databaseState, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionBackupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByLocationOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups", + urlParameters: [ + Parameters.locationName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.onlyLatestPerDatabase, + Parameters.databaseState, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionBackupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups", + urlParameters: [ + Parameters.locationName, + Parameters.longTermRetentionServerName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.onlyLatestPerDatabase, + Parameters.databaseState, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionBackupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}", + urlParameters: [ + Parameters.locationName, + Parameters.longTermRetentionServerName, + Parameters.longTermRetentionDatabaseName, + Parameters.backupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionBackupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByLocationNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionBackupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionBackupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedBackupShortTermRetentionPolicies.ts b/packages/@azure/arm-sql/lib/operations/managedBackupShortTermRetentionPolicies.ts new file mode 100644 index 000000000000..7b8abd6c5c25 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedBackupShortTermRetentionPolicies.ts @@ -0,0 +1,357 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedBackupShortTermRetentionPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedBackupShortTermRetentionPolicies. */ +export class ManagedBackupShortTermRetentionPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedBackupShortTermRetentionPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a managed database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates a managed database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param parameters The short term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedBackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,managedInstanceName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates a managed database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param parameters The short term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedBackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,managedInstanceName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a managed database's short term retention policy list. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Updates a managed database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param parameters The short term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedBackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Updates a managed database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param parameters The short term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedBackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets a managed database's short term retention policy list. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedBackupShortTermRetentionPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedBackupShortTermRetentionPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedDatabaseSecurityAlertPolicies.ts b/packages/@azure/arm-sql/lib/operations/managedDatabaseSecurityAlertPolicies.ts new file mode 100644 index 000000000000..fb1e7c6a0aef --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedDatabaseSecurityAlertPolicies.ts @@ -0,0 +1,299 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedDatabaseSecurityAlertPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedDatabaseSecurityAlertPolicies. */ +export class ManagedDatabaseSecurityAlertPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedDatabaseSecurityAlertPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a managed database's security alert policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policy is + * defined. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policy is + * defined. + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policy is + * defined. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a database's security alert policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policy is + * defined. + * @param parameters The database security alert policy. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedDatabaseSecurityAlertPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policy is + * defined. + * @param parameters The database security alert policy. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedDatabaseSecurityAlertPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policy is + * defined. + * @param parameters The database security alert policy. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedDatabaseSecurityAlertPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedDatabaseSecurityAlertPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of managed database's security alert policies. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are + * defined. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are + * defined. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are + * defined. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of managed database's security alert policies. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.securityAlertPolicyName0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.securityAlertPolicyName0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedDatabaseSecurityAlertPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicy + }, + 201: { + bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedDatabaseSensitivityLabels.ts b/packages/@azure/arm-sql/lib/operations/managedDatabaseSensitivityLabels.ts new file mode 100644 index 000000000000..4f442f878567 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedDatabaseSensitivityLabels.ts @@ -0,0 +1,683 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedDatabaseSensitivityLabelsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedDatabaseSensitivityLabels. */ +export class ManagedDatabaseSensitivityLabels { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedDatabaseSensitivityLabels. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets the sensitivity label of a given column + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: + * 'current', 'recommended' + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: Models.SensitivityLabelSource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: + * 'current', 'recommended' + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: Models.SensitivityLabelSource, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: + * 'current', 'recommended' + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: Models.SensitivityLabelSource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: Models.SensitivityLabelSource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + schemaName, + tableName, + columnName, + sensitivityLabelSource, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the sensitivity label of a given column + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param parameters The column sensitivity label resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: Models.SensitivityLabel, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param parameters The column sensitivity label resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: Models.SensitivityLabel, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param parameters The column sensitivity label resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: Models.SensitivityLabel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: Models.SensitivityLabel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + schemaName, + tableName, + columnName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes the sensitivity label of a given column + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + schemaName, + tableName, + columnName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Disables sensitivity recommendations on a given column + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param [options] The optional parameters + * @returns Promise + */ + disableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param callback The callback + */ + disableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param options The optional parameters + * @param callback The callback + */ + disableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + disableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + schemaName, + tableName, + columnName, + options + }, + disableRecommendationOperationSpec, + callback); + } + + /** + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on + * all columns) + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param [options] The optional parameters + * @returns Promise + */ + enableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param callback The callback + */ + enableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param options The optional parameters + * @param callback The callback + */ + enableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + enableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + schemaName, + tableName, + columnName, + options + }, + enableRecommendationOperationSpec, + callback); + } + + /** + * Gets the sensitivity labels of a given database + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listCurrentByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: Models.ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param callback The callback + */ + listCurrentByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listCurrentByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: Models.ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams, callback: msRest.ServiceCallback): void; + listCurrentByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: Models.ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + listCurrentByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Gets the sensitivity labels of a given database + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listRecommendedByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: Models.ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param callback The callback + */ + listRecommendedByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listRecommendedByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: Models.ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams, callback: msRest.ServiceCallback): void; + listRecommendedByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: Models.ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + listRecommendedByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Gets the sensitivity labels of a given database + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listCurrentByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listCurrentByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listCurrentByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listCurrentByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listCurrentByDatabaseNextOperationSpec, + callback) as Promise; + } + + /** + * Gets the sensitivity labels of a given database + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listRecommendedByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listRecommendedByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listRecommendedByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listRecommendedByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listRecommendedByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource2, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SensitivityLabel, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabel + }, + 201: { + bodyMapper: Mappers.SensitivityLabel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource2, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const disableRecommendationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const enableRecommendationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listCurrentByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.filter1, + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listRecommendedByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.includeDisabledRecommendations, + Parameters.skipToken, + Parameters.filter1, + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listCurrentByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listRecommendedByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessmentRuleBaselines.ts b/packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessmentRuleBaselines.ts new file mode 100644 index 000000000000..2cff3b673b3f --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessmentRuleBaselines.ts @@ -0,0 +1,295 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedDatabaseVulnerabilityAssessmentRuleBaselinesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedDatabaseVulnerabilityAssessmentRuleBaselines. */ +export class ManagedDatabaseVulnerabilityAssessmentRuleBaselines { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedDatabaseVulnerabilityAssessmentRuleBaselines. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a database's vulnerability assessment rule baseline. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + ruleId, + baselineName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a database's vulnerability assessment rule baseline. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param parameters The requested rule baseline resource. + * @param [options] The optional parameters + * @returns + * Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, parameters: Models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param parameters The requested rule baseline resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, parameters: Models.DatabaseVulnerabilityAssessmentRuleBaseline, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param parameters The requested rule baseline resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, parameters: Models.DatabaseVulnerabilityAssessmentRuleBaseline, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, parameters: Models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + ruleId, + baselineName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Removes the database's vulnerability assessment rule baseline. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment rule + * baseline is defined. + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a + * baseline on a database level rule and master for server level rule). Possible values include: + * 'master', 'default' + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: Models.VulnerabilityAssessmentPolicyBaselineName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + ruleId, + baselineName, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.ruleId, + Parameters.baselineName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentRuleBaseline + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.ruleId, + Parameters.baselineName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DatabaseVulnerabilityAssessmentRuleBaseline, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentRuleBaseline + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.ruleId, + Parameters.baselineName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessmentScans.ts b/packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessmentScans.ts new file mode 100644 index 000000000000..9cdc67c4f9f3 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessmentScans.ts @@ -0,0 +1,356 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedDatabaseVulnerabilityAssessmentScansMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedDatabaseVulnerabilityAssessmentScans. */ +export class ManagedDatabaseVulnerabilityAssessmentScans { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedDatabaseVulnerabilityAssessmentScans. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Lists the vulnerability assessment scans of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Gets a vulnerability assessment scan record of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + scanId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Executes a Vulnerability Assessment database scan. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param [options] The optional parameters + * @returns Promise + */ + initiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginInitiateScan(resourceGroupName,managedInstanceName,databaseName,scanId,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Convert an existing scan result to a human readable format. If already exists nothing happens + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the scanned database. + * @param scanId The vulnerability assessment scan Id. + * @param [options] The optional parameters + * @returns Promise + */ + exportMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the scanned database. + * @param scanId The vulnerability assessment scan Id. + * @param callback The callback + */ + exportMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the scanned database. + * @param scanId The vulnerability assessment scan Id. + * @param options The optional parameters + * @param callback The callback + */ + exportMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + exportMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + scanId, + options + }, + exportMethodOperationSpec, + callback) as Promise; + } + + /** + * Executes a Vulnerability Assessment database scan. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param [options] The optional parameters + * @returns Promise + */ + beginInitiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + scanId, + options + }, + beginInitiateScanOperationSpec, + options); + } + + /** + * Lists the vulnerability assessment scans of a database. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VulnerabilityAssessmentScanRecordListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.scanId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VulnerabilityAssessmentScanRecord + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const exportMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.scanId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentScansExport + }, + 201: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentScansExport + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginInitiateScanOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.scanId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VulnerabilityAssessmentScanRecordListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessments.ts b/packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessments.ts new file mode 100644 index 000000000000..7880f42b6616 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedDatabaseVulnerabilityAssessments.ts @@ -0,0 +1,354 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedDatabaseVulnerabilityAssessmentsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedDatabaseVulnerabilityAssessments. */ +export class ManagedDatabaseVulnerabilityAssessments { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedDatabaseVulnerabilityAssessments. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets the database's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the database's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param parameters The requested resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.DatabaseVulnerabilityAssessment, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param parameters The requested resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.DatabaseVulnerabilityAssessment, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param parameters The requested resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.DatabaseVulnerabilityAssessment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.DatabaseVulnerabilityAssessment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Removes the database's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists the vulnerability assessments of a managed database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Lists the vulnerability assessments of a managed database. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DatabaseVulnerabilityAssessment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessment + }, + 201: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedDatabases.ts b/packages/@azure/arm-sql/lib/operations/managedDatabases.ts new file mode 100644 index 000000000000..ec858fe858ae --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedDatabases.ts @@ -0,0 +1,477 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedDatabasesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedDatabases. */ +export class ManagedDatabases { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedDatabases. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Completes the restore operation on a managed database. + * @param locationName The name of the region where the resource is located. + * @param operationId Management operation id that this request tries to complete. + * @param parameters The definition for completing the restore of this managed database. + * @param [options] The optional parameters + * @returns Promise + */ + completeRestore(locationName: string, operationId: string, parameters: Models.CompleteDatabaseRestoreDefinition, options?: msRest.RequestOptionsBase): Promise { + return this.beginCompleteRestore(locationName,operationId,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a list of managed databases. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param options The optional parameters + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + listByInstanceOperationSpec, + callback) as Promise; + } + + /** + * Gets a managed database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new database or updates an existing database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param parameters The requested database resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedDatabase, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,managedInstanceName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a managed database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,managedInstanceName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates an existing database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param parameters The requested database resource state. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedDatabaseUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,managedInstanceName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Completes the restore operation on a managed database. + * @param locationName The name of the region where the resource is located. + * @param operationId Management operation id that this request tries to complete. + * @param parameters The definition for completing the restore of this managed database. + * @param [options] The optional parameters + * @returns Promise + */ + beginCompleteRestore(locationName: string, operationId: string, parameters: Models.CompleteDatabaseRestoreDefinition, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + locationName, + operationId, + parameters, + options + }, + beginCompleteRestoreOperationSpec, + options); + } + + /** + * Creates a new database or updates an existing database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param parameters The requested database resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedDatabase, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a managed database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates an existing database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param parameters The requested database resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: Models.ManagedDatabaseUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets a list of managed databases. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInstanceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByInstanceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabase + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCompleteRestoreOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseRestoreAzureAsyncOperation/{operationId}/completeRestore", + urlParameters: [ + Parameters.locationName, + Parameters.operationId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CompleteDatabaseRestoreDefinition, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedDatabase, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabase + }, + 201: { + bodyMapper: Mappers.ManagedDatabase + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedDatabaseUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabase + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByInstanceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedInstanceEncryptionProtectors.ts b/packages/@azure/arm-sql/lib/operations/managedInstanceEncryptionProtectors.ts new file mode 100644 index 000000000000..fd56a36eea4b --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedInstanceEncryptionProtectors.ts @@ -0,0 +1,270 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedInstanceEncryptionProtectorsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedInstanceEncryptionProtectors. */ +export class ManagedInstanceEncryptionProtectors { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedInstanceEncryptionProtectors. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of managed instance encryption protectors + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param options The optional parameters + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + listByInstanceOperationSpec, + callback) as Promise; + } + + /** + * Gets a managed instance encryption protector. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates an existing encryption protector. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param parameters The requested encryption protector resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedInstanceEncryptionProtector, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,managedInstanceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing encryption protector. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param parameters The requested encryption protector resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedInstanceEncryptionProtector, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Gets a list of managed instance encryption protectors + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInstanceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByInstanceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceEncryptionProtectorListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.encryptionProtectorName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceEncryptionProtector + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.encryptionProtectorName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedInstanceEncryptionProtector, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceEncryptionProtector + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByInstanceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceEncryptionProtectorListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedInstanceKeys.ts b/packages/@azure/arm-sql/lib/operations/managedInstanceKeys.ts new file mode 100644 index 000000000000..36bd7ef28283 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedInstanceKeys.ts @@ -0,0 +1,342 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedInstanceKeysMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedInstanceKeys. */ +export class ManagedInstanceKeys { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedInstanceKeys. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of managed instance keys. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: Models.ManagedInstanceKeysListByInstanceOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param options The optional parameters + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options: Models.ManagedInstanceKeysListByInstanceOptionalParams, callback: msRest.ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: Models.ManagedInstanceKeysListByInstanceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + listByInstanceOperationSpec, + callback) as Promise; + } + + /** + * Gets a managed instance key. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param keyName The name of the managed instance key to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param keyName The name of the managed instance key to be retrieved. + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, keyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param keyName The name of the managed instance key to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + keyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a managed instance key. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param keyName The name of the managed instance key to be operated on (updated or created). + * @param parameters The requested managed instance key resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: Models.ManagedInstanceKey, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,managedInstanceName,keyName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the managed instance key with the given name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param keyName The name of the managed instance key to be deleted. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,managedInstanceName,keyName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates or updates a managed instance key. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param keyName The name of the managed instance key to be operated on (updated or created). + * @param parameters The requested managed instance key resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: Models.ManagedInstanceKey, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + keyName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the managed instance key with the given name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param keyName The name of the managed instance key to be deleted. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + keyName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of managed instance keys. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInstanceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByInstanceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.filter1, + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceKeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.keyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceKey + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.keyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedInstanceKey, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceKey + }, + 201: { + bodyMapper: Mappers.ManagedInstanceKey + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.keyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByInstanceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceKeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedInstanceTdeCertificates.ts b/packages/@azure/arm-sql/lib/operations/managedInstanceTdeCertificates.ts new file mode 100644 index 000000000000..3f394c1ad151 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedInstanceTdeCertificates.ts @@ -0,0 +1,97 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedInstanceTdeCertificatesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedInstanceTdeCertificates. */ +export class ManagedInstanceTdeCertificates { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedInstanceTdeCertificates. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Creates a TDE certificate for a given server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param parameters The requested TDE certificate to be created or updated. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, managedInstanceName: string, parameters: Models.TdeCertificate, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,managedInstanceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a TDE certificate for a given server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param parameters The requested TDE certificate to be created or updated. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, managedInstanceName: string, parameters: Models.TdeCertificate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + parameters, + options + }, + beginCreateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TdeCertificate, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedInstanceVulnerabilityAssessments.ts b/packages/@azure/arm-sql/lib/operations/managedInstanceVulnerabilityAssessments.ts new file mode 100644 index 000000000000..ceed6a0b8c10 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedInstanceVulnerabilityAssessments.ts @@ -0,0 +1,346 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedInstanceVulnerabilityAssessmentsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedInstanceVulnerabilityAssessments. */ +export class ManagedInstanceVulnerabilityAssessments { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedInstanceVulnerabilityAssessments. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets the managed instance's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessment is defined. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessment is defined. + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessment is defined. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the managed instance's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessment is defined. + * @param parameters The requested resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedInstanceVulnerabilityAssessment, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessment is defined. + * @param parameters The requested resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedInstanceVulnerabilityAssessment, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessment is defined. + * @param parameters The requested resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedInstanceVulnerabilityAssessment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedInstanceVulnerabilityAssessment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Removes the managed instance's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessment is defined. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessment is defined. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessment is defined. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets the managed instance's vulnerability assessment policies. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessments is defined. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessments is defined. + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability + * assessments is defined. + * @param options The optional parameters + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + listByInstanceOperationSpec, + callback) as Promise; + } + + /** + * Gets the managed instance's vulnerability assessment policies. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInstanceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceVulnerabilityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedInstanceVulnerabilityAssessment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceVulnerabilityAssessment + }, + 201: { + bodyMapper: Mappers.ManagedInstanceVulnerabilityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByInstanceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceVulnerabilityAssessmentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByInstanceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceVulnerabilityAssessmentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedInstances.ts b/packages/@azure/arm-sql/lib/operations/managedInstances.ts new file mode 100644 index 000000000000..55a0e5ed91fc --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedInstances.ts @@ -0,0 +1,487 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedInstancesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedInstances. */ +export class ManagedInstances { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedInstances. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of all managed instances in the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of managed instances in a resource group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets a managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedInstance, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,managedInstanceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,managedInstanceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates a managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource state. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedInstanceUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,managedInstanceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates a managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedInstance, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates a managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedInstanceUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets a list of all managed instances in the subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of managed instances in a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstance + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedInstance, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedInstance + }, + 201: { + bodyMapper: Mappers.ManagedInstance + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedInstanceUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedInstance + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.ts b/packages/@azure/arm-sql/lib/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.ts new file mode 100644 index 000000000000..d0c271b01099 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.ts @@ -0,0 +1,362 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies. */ +export class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a dropped database's short term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param [options] The optional parameters + * @returns + * Promise + */ + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + restorableDroppedDatabaseId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Sets a database's long term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param parameters The long term retention policy info. + * @param [options] The optional parameters + * @returns + * Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: Models.ManagedBackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,managedInstanceName,restorableDroppedDatabaseId,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Sets a database's long term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param parameters The long term retention policy info. + * @param [options] The optional parameters + * @returns + * Promise + */ + update(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: Models.ManagedBackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,managedInstanceName,restorableDroppedDatabaseId,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a dropped database's short term retention policy list. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param [options] The optional parameters + * @returns + * Promise + */ + listByRestorableDroppedDatabase(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param callback The callback + */ + listByRestorableDroppedDatabase(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param options The optional parameters + * @param callback The callback + */ + listByRestorableDroppedDatabase(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByRestorableDroppedDatabase(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + restorableDroppedDatabaseId, + options + }, + listByRestorableDroppedDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Sets a database's long term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param parameters The long term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: Models.ManagedBackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + restorableDroppedDatabaseId, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Sets a database's long term retention policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param parameters The long term retention policy info. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: Models.ManagedBackupShortTermRetentionPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + restorableDroppedDatabaseId, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets a dropped database's short term retention policy list. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns + * Promise + */ + listByRestorableDroppedDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByRestorableDroppedDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByRestorableDroppedDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByRestorableDroppedDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByRestorableDroppedDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.restorableDroppedDatabaseId, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByRestorableDroppedDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.restorableDroppedDatabaseId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.restorableDroppedDatabaseId, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedBackupShortTermRetentionPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.restorableDroppedDatabaseId, + Parameters.policyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedBackupShortTermRetentionPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByRestorableDroppedDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/managedServerSecurityAlertPolicies.ts b/packages/@azure/arm-sql/lib/operations/managedServerSecurityAlertPolicies.ts new file mode 100644 index 000000000000..6b01a5cd0e71 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/managedServerSecurityAlertPolicies.ts @@ -0,0 +1,270 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedServerSecurityAlertPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ManagedServerSecurityAlertPolicies. */ +export class ManagedServerSecurityAlertPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a ManagedServerSecurityAlertPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Get a managed server's threat detection policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a threat detection policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param parameters The managed server security alert policy. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedServerSecurityAlertPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,managedInstanceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Get the managed server's threat detection policies. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param options The optional parameters + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + listByInstanceOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a threat detection policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param parameters The managed server security alert policy. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: Models.ManagedServerSecurityAlertPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + managedInstanceName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Get the managed server's threat detection policies. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInstanceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.securityAlertPolicyName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedServerSecurityAlertPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByInstanceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedServerSecurityAlertPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.securityAlertPolicyName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedServerSecurityAlertPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedServerSecurityAlertPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByInstanceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedServerSecurityAlertPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/operations.ts b/packages/@azure/arm-sql/lib/operations/operations.ts new file mode 100644 index 000000000000..21acf86ad037 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/operations.ts @@ -0,0 +1,123 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: SqlManagementClientContext; + + /** + * Create a Operations. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available SQL Rest API operations. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the available SQL Rest API operations. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Sql/operations", + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/recommendedElasticPools.ts b/packages/@azure/arm-sql/lib/operations/recommendedElasticPools.ts new file mode 100644 index 000000000000..a2eb82653e0e --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/recommendedElasticPools.ts @@ -0,0 +1,220 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/recommendedElasticPoolsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a RecommendedElasticPools. */ +export class RecommendedElasticPools { + private readonly client: SqlManagementClientContext; + + /** + * Create a RecommendedElasticPools. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a recommended elastic pool. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param recommendedElasticPoolName The name of the recommended elastic pool to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, recommendedElasticPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param recommendedElasticPoolName The name of the recommended elastic pool to be retrieved. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, recommendedElasticPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param recommendedElasticPoolName The name of the recommended elastic pool to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, recommendedElasticPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, recommendedElasticPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + recommendedElasticPoolName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns recommended elastic pools. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Returns recommended elastic pool metrics. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param recommendedElasticPoolName The name of the recommended elastic pool to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + listMetrics(resourceGroupName: string, serverName: string, recommendedElasticPoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param recommendedElasticPoolName The name of the recommended elastic pool to be retrieved. + * @param callback The callback + */ + listMetrics(resourceGroupName: string, serverName: string, recommendedElasticPoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param recommendedElasticPoolName The name of the recommended elastic pool to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + listMetrics(resourceGroupName: string, serverName: string, recommendedElasticPoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listMetrics(resourceGroupName: string, serverName: string, recommendedElasticPoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + recommendedElasticPoolName, + options + }, + listMetricsOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.recommendedElasticPoolName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendedElasticPool + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendedElasticPoolListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listMetricsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/metrics", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.recommendedElasticPoolName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendedElasticPoolListMetricsResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/recoverableDatabases.ts b/packages/@azure/arm-sql/lib/operations/recoverableDatabases.ts new file mode 100644 index 000000000000..698f705aec79 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/recoverableDatabases.ts @@ -0,0 +1,155 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/recoverableDatabasesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a RecoverableDatabases. */ +export class RecoverableDatabases { + private readonly client: SqlManagementClientContext; + + /** + * Create a RecoverableDatabases. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a recoverable database, which is a resource representing a database's geo backup + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of recoverable databases + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecoverableDatabase + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecoverableDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/recoverableManagedDatabases.ts b/packages/@azure/arm-sql/lib/operations/recoverableManagedDatabases.ts new file mode 100644 index 000000000000..a36cefea4644 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/recoverableManagedDatabases.ts @@ -0,0 +1,204 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/recoverableManagedDatabasesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a RecoverableManagedDatabases. */ +export class RecoverableManagedDatabases { + private readonly client: SqlManagementClientContext; + + /** + * Create a RecoverableManagedDatabases. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of recoverable managed databases. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param options The optional parameters + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + listByInstanceOperationSpec, + callback) as Promise; + } + + /** + * Gets a recoverable managed database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param recoverableDatabaseName + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param recoverableDatabaseName + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param recoverableDatabaseName + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + recoverableDatabaseName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of recoverable managed databases. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInstanceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByInstanceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecoverableManagedDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases/{recoverableDatabaseName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.recoverableDatabaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecoverableManagedDatabase + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByInstanceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecoverableManagedDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/replicationLinks.ts b/packages/@azure/arm-sql/lib/operations/replicationLinks.ts new file mode 100644 index 000000000000..2e3b76a6773e --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/replicationLinks.ts @@ -0,0 +1,367 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/replicationLinksMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ReplicationLinks. */ +export class ReplicationLinks { + private readonly client: SqlManagementClientContext; + + /** + * Create a ReplicationLinks. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Deletes a database replication link. Cannot be done during failover. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database that has the replication link to be dropped. + * @param linkId The ID of the replication link to be deleted. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database that has the replication link to be dropped. + * @param linkId The ID of the replication link to be deleted. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database that has the replication link to be dropped. + * @param linkId The ID of the replication link to be deleted. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + linkId, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets a database replication link. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to get the link for. + * @param linkId The replication link ID to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to get the link for. + * @param linkId The replication link ID to be retrieved. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to get the link for. + * @param linkId The replication link ID to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + linkId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Sets which replica database is primary by failing over from the current primary replica + * database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param [options] The optional parameters + * @returns Promise + */ + failover(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginFailover(resourceGroupName,serverName,databaseName,linkId,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Sets which replica database is primary by failing over from the current primary replica + * database. This operation might result in data loss. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param [options] The optional parameters + * @returns Promise + */ + failoverAllowDataLoss(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginFailoverAllowDataLoss(resourceGroupName,serverName,databaseName,linkId,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists a database's replication links. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to retrieve links for. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to retrieve links for. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database to retrieve links for. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Sets which replica database is primary by failing over from the current primary replica + * database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param [options] The optional parameters + * @returns Promise + */ + beginFailover(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + linkId, + options + }, + beginFailoverOperationSpec, + options); + } + + /** + * Sets which replica database is primary by failing over from the current primary replica + * database. This operation might result in data loss. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param [options] The optional parameters + * @returns Promise + */ + beginFailoverAllowDataLoss(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + linkId, + options + }, + beginFailoverAllowDataLossOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.linkId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.linkId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReplicationLink + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReplicationLinkListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginFailoverOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.linkId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginFailoverAllowDataLossOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.linkId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/restorableDroppedDatabases.ts b/packages/@azure/arm-sql/lib/operations/restorableDroppedDatabases.ts new file mode 100644 index 000000000000..8cead12893dd --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/restorableDroppedDatabases.ts @@ -0,0 +1,158 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/restorableDroppedDatabasesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a RestorableDroppedDatabases. */ +export class RestorableDroppedDatabases { + private readonly client: SqlManagementClientContext; + + /** + * Create a RestorableDroppedDatabases. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a deleted database that can be restored + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param restorableDroppededDatabaseId The id of the deleted database in the form of + * databaseName,deletionTimeInFileTimeFormat + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, restorableDroppededDatabaseId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param restorableDroppededDatabaseId The id of the deleted database in the form of + * databaseName,deletionTimeInFileTimeFormat + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, restorableDroppededDatabaseId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param restorableDroppededDatabaseId The id of the deleted database in the form of + * databaseName,deletionTimeInFileTimeFormat + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, restorableDroppededDatabaseId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, restorableDroppededDatabaseId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + restorableDroppededDatabaseId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of deleted databases that can be restored + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppededDatabaseId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.restorableDroppededDatabaseId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RestorableDroppedDatabase + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RestorableDroppedDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/restorableDroppedManagedDatabases.ts b/packages/@azure/arm-sql/lib/operations/restorableDroppedManagedDatabases.ts new file mode 100644 index 000000000000..81efe8772251 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/restorableDroppedManagedDatabases.ts @@ -0,0 +1,204 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/restorableDroppedManagedDatabasesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a RestorableDroppedManagedDatabases. */ +export class RestorableDroppedManagedDatabases { + private readonly client: SqlManagementClientContext; + + /** + * Create a RestorableDroppedManagedDatabases. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of restorable dropped managed databases. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param options The optional parameters + * @param callback The callback + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + options + }, + listByInstanceOperationSpec, + callback) as Promise; + } + + /** + * Gets a restorable dropped managed database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + restorableDroppedDatabaseId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of restorable dropped managed databases. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInstanceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInstanceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByInstanceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RestorableDroppedManagedDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.restorableDroppedDatabaseId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RestorableDroppedManagedDatabase + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByInstanceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RestorableDroppedManagedDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/restorePoints.ts b/packages/@azure/arm-sql/lib/operations/restorePoints.ts new file mode 100644 index 000000000000..bedade5c5328 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/restorePoints.ts @@ -0,0 +1,309 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/restorePointsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a RestorePoints. */ +export class RestorePoints { + private readonly client: SqlManagementClientContext; + + /** + * Create a RestorePoints. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of database restore points. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Creates a restore point for a data warehouse. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this database. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.CreateDatabaseRestorePointDefinition, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,serverName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a restore point. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param restorePointName The name of the restore point. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param restorePointName The name of the restore point. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param restorePointName The name of the restore point. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + restorePointName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes a restore point. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param restorePointName The name of the restore point. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param restorePointName The name of the restore point. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param restorePointName The name of the restore point. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + restorePointName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Creates a restore point for a data warehouse. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this database. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.CreateDatabaseRestorePointDefinition, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + beginCreateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RestorePointListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.restorePointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RestorePoint + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.restorePointName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CreateDatabaseRestorePointDefinition, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.RestorePoint + }, + 201: { + bodyMapper: Mappers.RestorePoint + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/sensitivityLabels.ts b/packages/@azure/arm-sql/lib/operations/sensitivityLabels.ts new file mode 100644 index 000000000000..83720fb882dd --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/sensitivityLabels.ts @@ -0,0 +1,683 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/sensitivityLabelsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a SensitivityLabels. */ +export class SensitivityLabels { + private readonly client: SqlManagementClientContext; + + /** + * Create a SensitivityLabels. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets the sensitivity labels of a given database + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listCurrentByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: Models.SensitivityLabelsListCurrentByDatabaseOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listCurrentByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listCurrentByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: Models.SensitivityLabelsListCurrentByDatabaseOptionalParams, callback: msRest.ServiceCallback): void; + listCurrentByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: Models.SensitivityLabelsListCurrentByDatabaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listCurrentByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Gets the sensitivity labels of a given database + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + listRecommendedByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: Models.SensitivityLabelsListRecommendedByDatabaseOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param callback The callback + */ + listRecommendedByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The optional parameters + * @param callback The callback + */ + listRecommendedByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: Models.SensitivityLabelsListRecommendedByDatabaseOptionalParams, callback: msRest.ServiceCallback): void; + listRecommendedByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: Models.SensitivityLabelsListRecommendedByDatabaseOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listRecommendedByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on + * all columns) + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param [options] The optional parameters + * @returns Promise + */ + enableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param callback The callback + */ + enableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param options The optional parameters + * @param callback The callback + */ + enableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + enableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + schemaName, + tableName, + columnName, + options + }, + enableRecommendationOperationSpec, + callback); + } + + /** + * Disables sensitivity recommendations on a given column + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param [options] The optional parameters + * @returns Promise + */ + disableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param callback The callback + */ + disableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param options The optional parameters + * @param callback The callback + */ + disableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + disableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + schemaName, + tableName, + columnName, + options + }, + disableRecommendationOperationSpec, + callback); + } + + /** + * Gets the sensitivity label of a given column + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: + * 'current', 'recommended' + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: Models.SensitivityLabelSource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: + * 'current', 'recommended' + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: Models.SensitivityLabelSource, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: + * 'current', 'recommended' + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: Models.SensitivityLabelSource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: Models.SensitivityLabelSource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + schemaName, + tableName, + columnName, + sensitivityLabelSource, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the sensitivity label of a given column + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param parameters The column sensitivity label resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: Models.SensitivityLabel, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param parameters The column sensitivity label resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: Models.SensitivityLabel, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param parameters The column sensitivity label resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: Models.SensitivityLabel, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: Models.SensitivityLabel, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + schemaName, + tableName, + columnName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes the sensitivity label of a given column + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + schemaName, + tableName, + columnName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets the sensitivity labels of a given database + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listCurrentByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listCurrentByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listCurrentByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listCurrentByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listCurrentByDatabaseNextOperationSpec, + callback) as Promise; + } + + /** + * Gets the sensitivity labels of a given database + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listRecommendedByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listRecommendedByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listRecommendedByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listRecommendedByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listRecommendedByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listCurrentByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.filter1, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listRecommendedByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.includeDisabledRecommendations, + Parameters.skipToken, + Parameters.filter1, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const enableRecommendationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const disableRecommendationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource2, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SensitivityLabel, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabel + }, + 201: { + bodyMapper: Mappers.SensitivityLabel + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource2, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listCurrentByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listRecommendedByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serverAutomaticTuningOperations.ts b/packages/@azure/arm-sql/lib/operations/serverAutomaticTuningOperations.ts new file mode 100644 index 000000000000..c347854122df --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serverAutomaticTuningOperations.ts @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverAutomaticTuningOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServerAutomaticTuningOperations. */ +export class ServerAutomaticTuningOperations { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServerAutomaticTuningOperations. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Retrieves server automatic tuning options. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update automatic tuning options on server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested automatic tuning resource state. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, serverName: string, parameters: Models.ServerAutomaticTuning, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested automatic tuning resource state. + * @param callback The callback + */ + update(resourceGroupName: string, serverName: string, parameters: Models.ServerAutomaticTuning, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested automatic tuning resource state. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, serverName: string, parameters: Models.ServerAutomaticTuning, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, serverName: string, parameters: Models.ServerAutomaticTuning, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerAutomaticTuning + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerAutomaticTuning, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerAutomaticTuning + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serverAzureADAdministrators.ts b/packages/@azure/arm-sql/lib/operations/serverAzureADAdministrators.ts new file mode 100644 index 000000000000..2e768b74c370 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serverAzureADAdministrators.ts @@ -0,0 +1,294 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverAzureADAdministratorsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServerAzureADAdministrators. */ +export class ServerAzureADAdministrators { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServerAzureADAdministrators. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Creates a new Server Active Directory Administrator or updates an existing server Active + * Directory Administrator. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param properties The required parameters for creating or updating an Active Directory + * Administrator. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, properties: Models.ServerAzureADAdministrator, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,properties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing server Active Directory Administrator. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Returns an server Administrator. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns a list of server Administrators. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Creates a new Server Active Directory Administrator or updates an existing server Active + * Directory Administrator. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param properties The required parameters for creating or updating an Active Directory + * Administrator. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, properties: Models.ServerAzureADAdministrator, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + properties, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes an existing server Active Directory Administrator. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginDeleteMethodOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.administratorName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerAzureADAdministrator + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerAdministratorListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.administratorName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.ServerAzureADAdministrator, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerAzureADAdministrator + }, + 201: { + bodyMapper: Mappers.ServerAzureADAdministrator + }, + 202: { + bodyMapper: Mappers.ServerAzureADAdministrator + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.administratorName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerAzureADAdministrator + }, + 202: { + bodyMapper: Mappers.ServerAzureADAdministrator + }, + 204: { + bodyMapper: Mappers.ServerAzureADAdministrator + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serverBlobAuditingPolicies.ts b/packages/@azure/arm-sql/lib/operations/serverBlobAuditingPolicies.ts new file mode 100644 index 000000000000..edb5fd10756d --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serverBlobAuditingPolicies.ts @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverBlobAuditingPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServerBlobAuditingPolicies. */ +export class ServerBlobAuditingPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServerBlobAuditingPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a server's blob auditing policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a server's blob auditing policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters Properties of blob auditing policy + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerBlobAuditingPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates a server's blob auditing policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters Properties of blob auditing policy + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerBlobAuditingPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.blobAuditingPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerBlobAuditingPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.blobAuditingPolicyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerBlobAuditingPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerBlobAuditingPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serverCommunicationLinks.ts b/packages/@azure/arm-sql/lib/operations/serverCommunicationLinks.ts new file mode 100644 index 000000000000..e334e3dba6e2 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serverCommunicationLinks.ts @@ -0,0 +1,291 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverCommunicationLinksMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServerCommunicationLinks. */ +export class ServerCommunicationLinks { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServerCommunicationLinks. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Deletes a server communication link. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param communicationLinkName The name of the server communication link. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, communicationLinkName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param communicationLinkName The name of the server communication link. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, communicationLinkName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param communicationLinkName The name of the server communication link. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, communicationLinkName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, communicationLinkName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + communicationLinkName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Returns a server communication link. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param communicationLinkName The name of the server communication link. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, communicationLinkName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param communicationLinkName The name of the server communication link. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, communicationLinkName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param communicationLinkName The name of the server communication link. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, communicationLinkName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, communicationLinkName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + communicationLinkName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a server communication link. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param communicationLinkName The name of the server communication link. + * @param parameters The required parameters for creating a server communication link. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, communicationLinkName: string, parameters: Models.ServerCommunicationLink, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,communicationLinkName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a list of server communication links. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Creates a server communication link. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param communicationLinkName The name of the server communication link. + * @param parameters The required parameters for creating a server communication link. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, communicationLinkName: string, parameters: Models.ServerCommunicationLink, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + communicationLinkName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.communicationLinkName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.communicationLinkName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerCommunicationLink + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerCommunicationLinkListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.communicationLinkName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerCommunicationLink, + required: true + } + }, + responses: { + 201: { + bodyMapper: Mappers.ServerCommunicationLink + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serverConnectionPolicies.ts b/packages/@azure/arm-sql/lib/operations/serverConnectionPolicies.ts new file mode 100644 index 000000000000..8cd96ee36a74 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serverConnectionPolicies.ts @@ -0,0 +1,166 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverConnectionPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServerConnectionPolicies. */ +export class ServerConnectionPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServerConnectionPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Creates or updates the server's connection policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The required parameters for updating a secure connection policy. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerConnectionPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The required parameters for updating a secure connection policy. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerConnectionPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The required parameters for updating a secure connection policy. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerConnectionPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerConnectionPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets the server's secure connection policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.connectionPolicyName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerConnectionPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerConnectionPolicy + }, + 201: { + bodyMapper: Mappers.ServerConnectionPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.connectionPolicyName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerConnectionPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serverDnsAliases.ts b/packages/@azure/arm-sql/lib/operations/serverDnsAliases.ts new file mode 100644 index 000000000000..86a7063d4306 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serverDnsAliases.ts @@ -0,0 +1,401 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverDnsAliasesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServerDnsAliases. */ +export class ServerDnsAliases { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServerDnsAliases. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a server DNS alias. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param dnsAliasName The name of the server DNS alias. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param dnsAliasName The name of the server DNS alias. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param dnsAliasName The name of the server DNS alias. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, dnsAliasName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + dnsAliasName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a server dns alias. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param dnsAliasName The name of the server DNS alias. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,dnsAliasName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the server DNS alias with the given name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param dnsAliasName The name of the server DNS alias. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,dnsAliasName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a list of server DNS aliases for a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Acquires server DNS alias from another server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param dnsAliasName The name of the server dns alias. + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + acquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: Models.ServerDnsAliasAcquisition, options?: msRest.RequestOptionsBase): Promise { + return this.beginAcquire(resourceGroupName,serverName,dnsAliasName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a server dns alias. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param dnsAliasName The name of the server DNS alias. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + dnsAliasName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the server DNS alias with the given name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param dnsAliasName The name of the server DNS alias. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + dnsAliasName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Acquires server DNS alias from another server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @param dnsAliasName The name of the server dns alias. + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + beginAcquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: Models.ServerDnsAliasAcquisition, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + dnsAliasName, + parameters, + options + }, + beginAcquireOperationSpec, + options); + } + + /** + * Gets a list of server DNS aliases for a server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.dnsAliasName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerDnsAlias + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerDnsAliasListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.dnsAliasName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerDnsAlias + }, + 201: { + bodyMapper: Mappers.ServerDnsAlias + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.dnsAliasName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginAcquireOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}/acquire", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.dnsAliasName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerDnsAliasAcquisition, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerDnsAliasListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serverKeys.ts b/packages/@azure/arm-sql/lib/operations/serverKeys.ts new file mode 100644 index 000000000000..b53497dcea66 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serverKeys.ts @@ -0,0 +1,349 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverKeysMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServerKeys. */ +export class ServerKeys { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServerKeys. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of server keys. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Gets a server key. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param keyName The name of the server key to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param keyName The name of the server key to be retrieved. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, keyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param keyName The name of the server key to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + keyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a server key. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param keyName 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/01234567890123456789012345678901, then + * the server key name should be formatted as: + * YourVaultName_YourKeyName_01234567890123456789012345678901 + * @param parameters The requested server key resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, keyName: string, parameters: Models.ServerKey, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,keyName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the server key with the given name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param keyName The name of the server key to be deleted. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,keyName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates or updates a server key. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param keyName 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/01234567890123456789012345678901, then + * the server key name should be formatted as: + * YourVaultName_YourKeyName_01234567890123456789012345678901 + * @param parameters The requested server key resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, keyName: string, parameters: Models.ServerKey, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + keyName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the server key with the given name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param keyName The name of the server key to be deleted. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + keyName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of server keys. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerKeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.keyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerKey + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.keyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerKey, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerKey + }, + 201: { + bodyMapper: Mappers.ServerKey + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.keyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerKeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serverSecurityAlertPolicies.ts b/packages/@azure/arm-sql/lib/operations/serverSecurityAlertPolicies.ts new file mode 100644 index 000000000000..142dd4f333e6 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serverSecurityAlertPolicies.ts @@ -0,0 +1,270 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverSecurityAlertPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServerSecurityAlertPolicies. */ +export class ServerSecurityAlertPolicies { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServerSecurityAlertPolicies. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Get a server's security alert policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a threat detection policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The server security alert policy. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerSecurityAlertPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Get the server's threat detection policies. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a threat detection policy. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The server security alert policy. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerSecurityAlertPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Get the server's threat detection policies. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.securityAlertPolicyName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerSecurityAlertPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LogicalServerSecurityAlertPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.securityAlertPolicyName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerSecurityAlertPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerSecurityAlertPolicy + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LogicalServerSecurityAlertPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serverUsages.ts b/packages/@azure/arm-sql/lib/operations/serverUsages.ts new file mode 100644 index 000000000000..ca3991457707 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serverUsages.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverUsagesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServerUsages. */ +export class ServerUsages { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServerUsages. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Returns server usages. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerUsageListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serverVulnerabilityAssessments.ts b/packages/@azure/arm-sql/lib/operations/serverVulnerabilityAssessments.ts new file mode 100644 index 000000000000..4a025168ad2d --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serverVulnerabilityAssessments.ts @@ -0,0 +1,334 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverVulnerabilityAssessmentsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServerVulnerabilityAssessments. */ +export class ServerVulnerabilityAssessments { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServerVulnerabilityAssessments. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets the server's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the server's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. + * @param parameters The requested resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerVulnerabilityAssessment, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. + * @param parameters The requested resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerVulnerabilityAssessment, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. + * @param parameters The requested resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerVulnerabilityAssessment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerVulnerabilityAssessment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Removes the server's vulnerability assessment. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists the vulnerability assessment policies associated with a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Lists the vulnerability assessment policies associated with a server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerVulnerabilityAssessment, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessment + }, + 201: { + bodyMapper: Mappers.ServerVulnerabilityAssessment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.vulnerabilityAssessmentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessmentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessmentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/servers.ts b/packages/@azure/arm-sql/lib/operations/servers.ts new file mode 100644 index 000000000000..734cb28282b2 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/servers.ts @@ -0,0 +1,545 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serversMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a Servers. */ +export class Servers { + private readonly client: SqlManagementClientContext; + + /** + * Create a Servers. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Determines whether a resource can be created with the specified name. + * @param parameters The parameters to request for name availability. + * @param [options] The optional parameters + * @returns Promise + */ + checkNameAvailability(parameters: Models.CheckNameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param parameters The parameters to request for name availability. + * @param callback The callback + */ + checkNameAvailability(parameters: Models.CheckNameAvailabilityRequest, callback: msRest.ServiceCallback): void; + /** + * @param parameters The parameters to request for name availability. + * @param options The optional parameters + * @param callback The callback + */ + checkNameAvailability(parameters: Models.CheckNameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(parameters: Models.CheckNameAvailabilityRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + parameters, + options + }, + checkNameAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of all servers in the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of servers in a resource groups. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.Server, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource state. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, serverName: string, parameters: Models.ServerUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serverName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.Server, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets a list of all servers in the subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of servers in a resource groups. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CheckNameAvailabilityRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Server + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Server, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Server + }, + 201: { + bodyMapper: Mappers.Server + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Server + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serviceObjectives.ts b/packages/@azure/arm-sql/lib/operations/serviceObjectives.ts new file mode 100644 index 000000000000..d10a6be2ddd5 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serviceObjectives.ts @@ -0,0 +1,155 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serviceObjectivesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServiceObjectives. */ +export class ServiceObjectives { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServiceObjectives. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a database service objective. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param serviceObjectiveName The name of the service objective to retrieve. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, serviceObjectiveName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param serviceObjectiveName The name of the service objective to retrieve. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, serviceObjectiveName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param serviceObjectiveName The name of the service objective to retrieve. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, serviceObjectiveName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, serviceObjectiveName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + serviceObjectiveName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns database service objectives. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives/{serviceObjectiveName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.serviceObjectiveName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServiceObjective + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServiceObjectiveListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/serviceTierAdvisors.ts b/packages/@azure/arm-sql/lib/operations/serviceTierAdvisors.ts new file mode 100644 index 000000000000..ab2ce84c5fa4 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/serviceTierAdvisors.ts @@ -0,0 +1,165 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serviceTierAdvisorsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a ServiceTierAdvisors. */ +export class ServiceTierAdvisors { + private readonly client: SqlManagementClientContext; + + /** + * Create a ServiceTierAdvisors. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a service tier advisor. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of database. + * @param serviceTierAdvisorName The name of service tier advisor. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, serviceTierAdvisorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of database. + * @param serviceTierAdvisorName The name of service tier advisor. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, serviceTierAdvisorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of database. + * @param serviceTierAdvisorName The name of service tier advisor. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, serviceTierAdvisorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, serviceTierAdvisorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + serviceTierAdvisorName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns service tier advisors for specified database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of database. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of database. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of database. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors/{serviceTierAdvisorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.serviceTierAdvisorName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServiceTierAdvisor + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServiceTierAdvisorListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/subscriptionUsages.ts b/packages/@azure/arm-sql/lib/operations/subscriptionUsages.ts new file mode 100644 index 000000000000..34dc34fce3ad --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/subscriptionUsages.ts @@ -0,0 +1,188 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/subscriptionUsagesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a SubscriptionUsages. */ +export class SubscriptionUsages { + private readonly client: SqlManagementClientContext; + + /** + * Create a SubscriptionUsages. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets all subscription usage metrics in a given location. + * @param locationName The name of the region where the resource is located. + * @param [options] The optional parameters + * @returns Promise + */ + listByLocation(locationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The name of the region where the resource is located. + * @param callback The callback + */ + listByLocation(locationName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The name of the region where the resource is located. + * @param options The optional parameters + * @param callback The callback + */ + listByLocation(locationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByLocation(locationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + options + }, + listByLocationOperationSpec, + callback) as Promise; + } + + /** + * Gets a subscription usage metric. + * @param locationName The name of the region where the resource is located. + * @param usageName Name of usage metric to return. + * @param [options] The optional parameters + * @returns Promise + */ + get(locationName: string, usageName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The name of the region where the resource is located. + * @param usageName Name of usage metric to return. + * @param callback The callback + */ + get(locationName: string, usageName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The name of the region where the resource is located. + * @param usageName Name of usage metric to return. + * @param options The optional parameters + * @param callback The callback + */ + get(locationName: string, usageName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(locationName: string, usageName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + usageName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets all subscription usage metrics in a given location. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByLocationNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByLocationNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByLocationNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByLocationNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByLocationNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByLocationOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages", + urlParameters: [ + Parameters.locationName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SubscriptionUsageListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}", + urlParameters: [ + Parameters.locationName, + Parameters.usageName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SubscriptionUsage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByLocationNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SubscriptionUsageListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/syncAgents.ts b/packages/@azure/arm-sql/lib/operations/syncAgents.ts new file mode 100644 index 000000000000..5cbc4360dda4 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/syncAgents.ts @@ -0,0 +1,520 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/syncAgentsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a SyncAgents. */ +export class SyncAgents { + private readonly client: SqlManagementClientContext; + + /** + * Create a SyncAgents. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a sync agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, syncAgentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, syncAgentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, syncAgentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, syncAgentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + syncAgentName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a sync agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param parameters The requested sync agent resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, syncAgentName: string, parameters: Models.SyncAgent, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,syncAgentName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a sync agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, syncAgentName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,syncAgentName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Lists sync agents in a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Generates a sync agent key. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param [options] The optional parameters + * @returns Promise + */ + generateKey(resourceGroupName: string, serverName: string, syncAgentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param callback The callback + */ + generateKey(resourceGroupName: string, serverName: string, syncAgentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param options The optional parameters + * @param callback The callback + */ + generateKey(resourceGroupName: string, serverName: string, syncAgentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + generateKey(resourceGroupName: string, serverName: string, syncAgentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + syncAgentName, + options + }, + generateKeyOperationSpec, + callback) as Promise; + } + + /** + * Lists databases linked to a sync agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param [options] The optional parameters + * @returns Promise + */ + listLinkedDatabases(resourceGroupName: string, serverName: string, syncAgentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param callback The callback + */ + listLinkedDatabases(resourceGroupName: string, serverName: string, syncAgentName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param options The optional parameters + * @param callback The callback + */ + listLinkedDatabases(resourceGroupName: string, serverName: string, syncAgentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listLinkedDatabases(resourceGroupName: string, serverName: string, syncAgentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + syncAgentName, + options + }, + listLinkedDatabasesOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a sync agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param parameters The requested sync agent resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, syncAgentName: string, parameters: Models.SyncAgent, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + syncAgentName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a sync agent. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @param syncAgentName The name of the sync agent. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, syncAgentName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + syncAgentName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists sync agents in a server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } + + /** + * Lists databases linked to a sync agent. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listLinkedDatabasesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listLinkedDatabasesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listLinkedDatabasesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listLinkedDatabasesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listLinkedDatabasesNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.syncAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncAgent + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncAgentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const generateKeyOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/generateKey", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.syncAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncAgentKeyProperties + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listLinkedDatabasesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.syncAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncAgentLinkedDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.syncAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SyncAgent, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SyncAgent + }, + 201: { + bodyMapper: Mappers.SyncAgent + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.syncAgentName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncAgentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listLinkedDatabasesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncAgentLinkedDatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/syncGroups.ts b/packages/@azure/arm-sql/lib/operations/syncGroups.ts new file mode 100644 index 000000000000..5824e0f64925 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/syncGroups.ts @@ -0,0 +1,993 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/syncGroupsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a SyncGroups. */ +export class SyncGroups { + private readonly client: SqlManagementClientContext; + + /** + * Create a SyncGroups. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a collection of sync database ids. + * @param locationName The name of the region where the resource is located. + * @param [options] The optional parameters + * @returns Promise + */ + listSyncDatabaseIds(locationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The name of the region where the resource is located. + * @param callback The callback + */ + listSyncDatabaseIds(locationName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The name of the region where the resource is located. + * @param options The optional parameters + * @param callback The callback + */ + listSyncDatabaseIds(locationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSyncDatabaseIds(locationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + options + }, + listSyncDatabaseIdsOperationSpec, + callback) as Promise; + } + + /** + * Refreshes a hub database schema. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param [options] The optional parameters + * @returns Promise + */ + refreshHubSchema(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRefreshHubSchema(resourceGroupName,serverName,databaseName,syncGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a collection of hub database schemas. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param [options] The optional parameters + * @returns Promise + */ + listHubSchemas(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param callback The callback + */ + listHubSchemas(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param options The optional parameters + * @param callback The callback + */ + listHubSchemas(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listHubSchemas(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + options + }, + listHubSchemasOperationSpec, + callback) as Promise; + } + + /** + * Gets a collection of sync group logs. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param startTime Get logs generated after this time. + * @param endTime Get logs generated before this time. + * @param type The types of logs to retrieve. Possible values include: 'All', 'Error', 'Warning', + * 'Success' + * @param [options] The optional parameters + * @returns Promise + */ + listLogs(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, startTime: string, endTime: string, type: Models.Type, options?: Models.SyncGroupsListLogsOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param startTime Get logs generated after this time. + * @param endTime Get logs generated before this time. + * @param type The types of logs to retrieve. Possible values include: 'All', 'Error', 'Warning', + * 'Success' + * @param callback The callback + */ + listLogs(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, startTime: string, endTime: string, type: Models.Type, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param startTime Get logs generated after this time. + * @param endTime Get logs generated before this time. + * @param type The types of logs to retrieve. Possible values include: 'All', 'Error', 'Warning', + * 'Success' + * @param options The optional parameters + * @param callback The callback + */ + listLogs(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, startTime: string, endTime: string, type: Models.Type, options: Models.SyncGroupsListLogsOptionalParams, callback: msRest.ServiceCallback): void; + listLogs(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, startTime: string, endTime: string, type: Models.Type, options?: Models.SyncGroupsListLogsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + startTime, + endTime, + type, + options + }, + listLogsOperationSpec, + callback) as Promise; + } + + /** + * Cancels a sync group synchronization. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param [options] The optional parameters + * @returns Promise + */ + cancelSync(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param callback The callback + */ + cancelSync(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param options The optional parameters + * @param callback The callback + */ + cancelSync(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancelSync(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + options + }, + cancelSyncOperationSpec, + callback); + } + + /** + * Triggers a sync group synchronization. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param [options] The optional parameters + * @returns Promise + */ + triggerSync(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param callback The callback + */ + triggerSync(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param options The optional parameters + * @param callback The callback + */ + triggerSync(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + triggerSync(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + options + }, + triggerSyncOperationSpec, + callback); + } + + /** + * Gets a sync group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a sync group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, parameters: Models.SyncGroup, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,databaseName,syncGroupName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a sync group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,databaseName,syncGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates a sync group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource state. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, parameters: Models.SyncGroup, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serverName,databaseName,syncGroupName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists sync groups under a hub database. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByDatabaseOperationSpec, + callback) as Promise; + } + + /** + * Refreshes a hub database schema. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param [options] The optional parameters + * @returns Promise + */ + beginRefreshHubSchema(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + options + }, + beginRefreshHubSchemaOperationSpec, + options); + } + + /** + * Creates or updates a sync group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, parameters: Models.SyncGroup, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a sync group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates a sync group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, parameters: Models.SyncGroup, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets a collection of sync database ids. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listSyncDatabaseIdsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listSyncDatabaseIdsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listSyncDatabaseIdsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSyncDatabaseIdsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listSyncDatabaseIdsNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a collection of hub database schemas. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listHubSchemasNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listHubSchemasNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listHubSchemasNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listHubSchemasNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listHubSchemasNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a collection of sync group logs. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listLogsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listLogsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listLogsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listLogsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listLogsNextOperationSpec, + callback) as Promise; + } + + /** + * Lists sync groups under a hub database. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDatabaseNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDatabaseNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listSyncDatabaseIdsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds", + urlParameters: [ + Parameters.locationName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncDatabaseIdListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listHubSchemasOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncFullSchemaPropertiesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listLogsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.startTime, + Parameters.endTime, + Parameters.type, + Parameters.continuationToken, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncGroupLogListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const cancelSyncOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const triggerSyncOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncGroup + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncGroupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginRefreshHubSchemaOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SyncGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SyncGroup + }, + 201: { + bodyMapper: Mappers.SyncGroup + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SyncGroup, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SyncGroup + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listSyncDatabaseIdsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncDatabaseIdListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listHubSchemasNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncFullSchemaPropertiesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listLogsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncGroupLogListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDatabaseNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncGroupListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/syncMembers.ts b/packages/@azure/arm-sql/lib/operations/syncMembers.ts new file mode 100644 index 000000000000..76a574df56e0 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/syncMembers.ts @@ -0,0 +1,649 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/syncMembersMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a SyncMembers. */ +export class SyncMembers { + private readonly client: SqlManagementClientContext; + + /** + * Create a SyncMembers. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a sync member. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + syncMemberName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a sync member. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, parameters: Models.SyncMember, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,databaseName,syncGroupName,syncMemberName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a sync member. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,databaseName,syncGroupName,syncMemberName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates an existing sync member. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource state. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, parameters: Models.SyncMember, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serverName,databaseName,syncGroupName,syncMemberName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists sync members in the given sync group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param [options] The optional parameters + * @returns Promise + */ + listBySyncGroup(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param callback The callback + */ + listBySyncGroup(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param options The optional parameters + * @param callback The callback + */ + listBySyncGroup(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySyncGroup(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + options + }, + listBySyncGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets a sync member database schema. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param [options] The optional parameters + * @returns Promise + */ + listMemberSchemas(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param callback The callback + */ + listMemberSchemas(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param options The optional parameters + * @param callback The callback + */ + listMemberSchemas(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listMemberSchemas(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + syncMemberName, + options + }, + listMemberSchemasOperationSpec, + callback) as Promise; + } + + /** + * Refreshes a sync member database schema. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param [options] The optional parameters + * @returns Promise + */ + refreshMemberSchema(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRefreshMemberSchema(resourceGroupName,serverName,databaseName,syncGroupName,syncMemberName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates or updates a sync member. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, parameters: Models.SyncMember, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + syncMemberName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a sync member. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + syncMemberName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates an existing sync member. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, parameters: Models.SyncMember, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + syncMemberName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Refreshes a sync member database schema. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param [options] The optional parameters + * @returns Promise + */ + beginRefreshMemberSchema(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, syncMemberName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + syncMemberName, + options + }, + beginRefreshMemberSchemaOperationSpec, + options); + } + + /** + * Lists sync members in the given sync group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySyncGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySyncGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySyncGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySyncGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySyncGroupNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a sync member database schema. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listMemberSchemasNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listMemberSchemasNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listMemberSchemasNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listMemberSchemasNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listMemberSchemasNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.syncMemberName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncMember + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySyncGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncMemberListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listMemberSchemasOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.syncMemberName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncFullSchemaPropertiesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.syncMemberName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SyncMember, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SyncMember + }, + 201: { + bodyMapper: Mappers.SyncMember + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.syncMemberName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.syncMemberName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SyncMember, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SyncMember + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginRefreshMemberSchemaOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.syncGroupName, + Parameters.syncMemberName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySyncGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncMemberListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listMemberSchemasNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SyncFullSchemaPropertiesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/tdeCertificates.ts b/packages/@azure/arm-sql/lib/operations/tdeCertificates.ts new file mode 100644 index 000000000000..0fef38e26455 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/tdeCertificates.ts @@ -0,0 +1,97 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/tdeCertificatesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a TdeCertificates. */ +export class TdeCertificates { + private readonly client: SqlManagementClientContext; + + /** + * Create a TdeCertificates. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Creates a TDE certificate for a given server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested TDE certificate to be created or updated. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, serverName: string, parameters: Models.TdeCertificate, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,serverName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a TDE certificate for a given server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested TDE certificate to be created or updated. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, serverName: string, parameters: Models.TdeCertificate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + beginCreateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/tdeCertificates", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TdeCertificate, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/transparentDataEncryptionActivities.ts b/packages/@azure/arm-sql/lib/operations/transparentDataEncryptionActivities.ts new file mode 100644 index 000000000000..35545b94cc76 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/transparentDataEncryptionActivities.ts @@ -0,0 +1,96 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/transparentDataEncryptionActivitiesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a TransparentDataEncryptionActivities. */ +export class TransparentDataEncryptionActivities { + private readonly client: SqlManagementClientContext; + + /** + * Create a TransparentDataEncryptionActivities. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Returns a database's transparent data encryption operation result. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the transparent data encryption applies. + * @param [options] The optional parameters + * @returns Promise + */ + listByConfiguration(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the transparent data encryption applies. + * @param callback The callback + */ + listByConfiguration(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the transparent data encryption applies. + * @param options The optional parameters + * @param callback The callback + */ + listByConfiguration(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByConfiguration(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + listByConfigurationOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByConfigurationOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.transparentDataEncryptionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransparentDataEncryptionActivityListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/transparentDataEncryptions.ts b/packages/@azure/arm-sql/lib/operations/transparentDataEncryptions.ts new file mode 100644 index 000000000000..29f3d63bbf1b --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/transparentDataEncryptions.ts @@ -0,0 +1,179 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/transparentDataEncryptionsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a TransparentDataEncryptions. */ +export class TransparentDataEncryptions { + private readonly client: SqlManagementClientContext; + + /** + * Create a TransparentDataEncryptions. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Creates or updates a database's transparent data encryption configuration. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which setting the transparent data encryption + * applies. + * @param parameters The required parameters for creating or updating transparent data encryption. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.TransparentDataEncryption, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which setting the transparent data encryption + * applies. + * @param parameters The required parameters for creating or updating transparent data encryption. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.TransparentDataEncryption, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which setting the transparent data encryption + * applies. + * @param parameters The required parameters for creating or updating transparent data encryption. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.TransparentDataEncryption, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.TransparentDataEncryption, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets a database's transparent data encryption configuration. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the transparent data encryption applies. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the transparent data encryption applies. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the transparent data encryption applies. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.transparentDataEncryptionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TransparentDataEncryption, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TransparentDataEncryption + }, + 201: { + bodyMapper: Mappers.TransparentDataEncryption + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.transparentDataEncryptionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransparentDataEncryption + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/virtualClusters.ts b/packages/@azure/arm-sql/lib/operations/virtualClusters.ts new file mode 100644 index 000000000000..8099f722f86f --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/virtualClusters.ts @@ -0,0 +1,416 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/virtualClustersMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a VirtualClusters. */ +export class VirtualClusters { + private readonly client: SqlManagementClientContext; + + /** + * Create a VirtualClusters. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of all virtualClusters in the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of virtual clusters in a resource group. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets a virtual cluster. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, virtualClusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param callback The callback + */ + get(resourceGroupName: string, virtualClusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, virtualClusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, virtualClusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + virtualClusterName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes a virtual cluster. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, virtualClusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,virtualClusterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates a virtual cluster. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested managed instance resource state. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, virtualClusterName: string, parameters: Models.VirtualClusterUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,virtualClusterName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a virtual cluster. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, virtualClusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + virtualClusterName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates a virtual cluster. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested managed instance resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, virtualClusterName: string, parameters: Models.VirtualClusterUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + virtualClusterName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets a list of all virtualClusters in the subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of virtual clusters in a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualClusterListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualClusterListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.virtualClusterName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualCluster + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.virtualClusterName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.virtualClusterName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.VirtualClusterUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualCluster + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualClusterListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualClusterListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/operations/virtualNetworkRules.ts b/packages/@azure/arm-sql/lib/operations/virtualNetworkRules.ts new file mode 100644 index 000000000000..bc25e2b3fb62 --- /dev/null +++ b/packages/@azure/arm-sql/lib/operations/virtualNetworkRules.ts @@ -0,0 +1,341 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/virtualNetworkRulesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a VirtualNetworkRules. */ +export class VirtualNetworkRules { + private readonly client: SqlManagementClientContext; + + /** + * Create a VirtualNetworkRules. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets a virtual network rule. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param virtualNetworkRuleName The name of the virtual network rule. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param virtualNetworkRuleName The name of the virtual network rule. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param virtualNetworkRuleName The name of the virtual network rule. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + virtualNetworkRuleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an existing virtual network rule. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param virtualNetworkRuleName The name of the virtual network rule. + * @param parameters The requested virtual Network Rule Resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: Models.VirtualNetworkRule, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,virtualNetworkRuleName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the virtual network rule with the given name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param virtualNetworkRuleName The name of the virtual network rule. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,virtualNetworkRuleName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a list of virtual network rules in a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an existing virtual network rule. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param virtualNetworkRuleName The name of the virtual network rule. + * @param parameters The requested virtual Network Rule Resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: Models.VirtualNetworkRule, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + virtualNetworkRuleName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the virtual network rule with the given name. + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param virtualNetworkRuleName The name of the virtual network rule. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + virtualNetworkRuleName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of virtual network rules in a server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.virtualNetworkRuleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRuleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.virtualNetworkRuleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.VirtualNetworkRule, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRule + }, + 201: { + bodyMapper: Mappers.VirtualNetworkRule + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.virtualNetworkRuleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRuleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-sql/lib/sqlManagementClient.ts b/packages/@azure/arm-sql/lib/sqlManagementClient.ts new file mode 100644 index 000000000000..e29270907ca0 --- /dev/null +++ b/packages/@azure/arm-sql/lib/sqlManagementClient.ts @@ -0,0 +1,200 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { SqlManagementClientContext } from "./sqlManagementClientContext"; + + +class SqlManagementClient extends SqlManagementClientContext { + // Operation groups + recoverableDatabases: operations.RecoverableDatabases; + restorableDroppedDatabases: operations.RestorableDroppedDatabases; + servers: operations.Servers; + serverConnectionPolicies: operations.ServerConnectionPolicies; + databaseThreatDetectionPolicies: operations.DatabaseThreatDetectionPolicies; + dataMaskingPolicies: operations.DataMaskingPolicies; + dataMaskingRules: operations.DataMaskingRules; + firewallRules: operations.FirewallRules; + geoBackupPolicies: operations.GeoBackupPolicies; + databases: operations.Databases; + elasticPools: operations.ElasticPools; + recommendedElasticPools: operations.RecommendedElasticPools; + replicationLinks: operations.ReplicationLinks; + serverAzureADAdministrators: operations.ServerAzureADAdministrators; + serverCommunicationLinks: operations.ServerCommunicationLinks; + serviceObjectives: operations.ServiceObjectives; + elasticPoolActivities: operations.ElasticPoolActivities; + elasticPoolDatabaseActivities: operations.ElasticPoolDatabaseActivities; + serviceTierAdvisors: operations.ServiceTierAdvisors; + transparentDataEncryptions: operations.TransparentDataEncryptions; + transparentDataEncryptionActivities: operations.TransparentDataEncryptionActivities; + serverUsages: operations.ServerUsages; + databaseUsages: operations.DatabaseUsages; + databaseAutomaticTuning: operations.DatabaseAutomaticTuningOperations; + encryptionProtectors: operations.EncryptionProtectors; + failoverGroups: operations.FailoverGroups; + managedInstances: operations.ManagedInstances; + operations: operations.Operations; + serverKeys: operations.ServerKeys; + syncAgents: operations.SyncAgents; + syncGroups: operations.SyncGroups; + syncMembers: operations.SyncMembers; + subscriptionUsages: operations.SubscriptionUsages; + virtualClusters: operations.VirtualClusters; + virtualNetworkRules: operations.VirtualNetworkRules; + extendedDatabaseBlobAuditingPolicies: operations.ExtendedDatabaseBlobAuditingPolicies; + extendedServerBlobAuditingPolicies: operations.ExtendedServerBlobAuditingPolicies; + serverBlobAuditingPolicies: operations.ServerBlobAuditingPolicies; + databaseBlobAuditingPolicies: operations.DatabaseBlobAuditingPolicies; + databaseVulnerabilityAssessmentRuleBaselines: operations.DatabaseVulnerabilityAssessmentRuleBaselines; + databaseVulnerabilityAssessments: operations.DatabaseVulnerabilityAssessments; + jobAgents: operations.JobAgents; + jobCredentials: operations.JobCredentials; + jobExecutions: operations.JobExecutions; + jobs: operations.Jobs; + jobStepExecutions: operations.JobStepExecutions; + jobSteps: operations.JobSteps; + jobTargetExecutions: operations.JobTargetExecutions; + jobTargetGroups: operations.JobTargetGroups; + jobVersions: operations.JobVersions; + longTermRetentionBackups: operations.LongTermRetentionBackups; + backupLongTermRetentionPolicies: operations.BackupLongTermRetentionPolicies; + managedBackupShortTermRetentionPolicies: operations.ManagedBackupShortTermRetentionPolicies; + managedDatabases: operations.ManagedDatabases; + managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies: operations.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; + serverAutomaticTuning: operations.ServerAutomaticTuningOperations; + serverDnsAliases: operations.ServerDnsAliases; + serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies; + restorableDroppedManagedDatabases: operations.RestorableDroppedManagedDatabases; + restorePoints: operations.RestorePoints; + managedDatabaseSecurityAlertPolicies: operations.ManagedDatabaseSecurityAlertPolicies; + managedServerSecurityAlertPolicies: operations.ManagedServerSecurityAlertPolicies; + sensitivityLabels: operations.SensitivityLabels; + databaseOperations: operations.DatabaseOperations; + elasticPoolOperations: operations.ElasticPoolOperations; + capabilities: operations.Capabilities; + databaseVulnerabilityAssessmentScans: operations.DatabaseVulnerabilityAssessmentScans; + managedDatabaseVulnerabilityAssessmentRuleBaselines: operations.ManagedDatabaseVulnerabilityAssessmentRuleBaselines; + managedDatabaseVulnerabilityAssessmentScans: operations.ManagedDatabaseVulnerabilityAssessmentScans; + managedDatabaseVulnerabilityAssessments: operations.ManagedDatabaseVulnerabilityAssessments; + instanceFailoverGroups: operations.InstanceFailoverGroups; + backupShortTermRetentionPolicies: operations.BackupShortTermRetentionPolicies; + tdeCertificates: operations.TdeCertificates; + managedInstanceTdeCertificates: operations.ManagedInstanceTdeCertificates; + managedInstanceKeys: operations.ManagedInstanceKeys; + managedInstanceEncryptionProtectors: operations.ManagedInstanceEncryptionProtectors; + recoverableManagedDatabases: operations.RecoverableManagedDatabases; + managedInstanceVulnerabilityAssessments: operations.ManagedInstanceVulnerabilityAssessments; + serverVulnerabilityAssessments: operations.ServerVulnerabilityAssessments; + managedDatabaseSensitivityLabels: operations.ManagedDatabaseSensitivityLabels; + + /** + * Initializes a new instance of the SqlManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The subscription ID that identifies an Azure subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.SqlManagementClientOptions) { + super(credentials, subscriptionId, options); + this.recoverableDatabases = new operations.RecoverableDatabases(this); + this.restorableDroppedDatabases = new operations.RestorableDroppedDatabases(this); + this.servers = new operations.Servers(this); + this.serverConnectionPolicies = new operations.ServerConnectionPolicies(this); + this.databaseThreatDetectionPolicies = new operations.DatabaseThreatDetectionPolicies(this); + this.dataMaskingPolicies = new operations.DataMaskingPolicies(this); + this.dataMaskingRules = new operations.DataMaskingRules(this); + this.firewallRules = new operations.FirewallRules(this); + this.geoBackupPolicies = new operations.GeoBackupPolicies(this); + this.databases = new operations.Databases(this); + this.elasticPools = new operations.ElasticPools(this); + this.recommendedElasticPools = new operations.RecommendedElasticPools(this); + this.replicationLinks = new operations.ReplicationLinks(this); + this.serverAzureADAdministrators = new operations.ServerAzureADAdministrators(this); + this.serverCommunicationLinks = new operations.ServerCommunicationLinks(this); + this.serviceObjectives = new operations.ServiceObjectives(this); + this.elasticPoolActivities = new operations.ElasticPoolActivities(this); + this.elasticPoolDatabaseActivities = new operations.ElasticPoolDatabaseActivities(this); + this.serviceTierAdvisors = new operations.ServiceTierAdvisors(this); + this.transparentDataEncryptions = new operations.TransparentDataEncryptions(this); + this.transparentDataEncryptionActivities = new operations.TransparentDataEncryptionActivities(this); + this.serverUsages = new operations.ServerUsages(this); + this.databaseUsages = new operations.DatabaseUsages(this); + this.databaseAutomaticTuning = new operations.DatabaseAutomaticTuningOperations(this); + this.encryptionProtectors = new operations.EncryptionProtectors(this); + this.failoverGroups = new operations.FailoverGroups(this); + this.managedInstances = new operations.ManagedInstances(this); + this.operations = new operations.Operations(this); + this.serverKeys = new operations.ServerKeys(this); + this.syncAgents = new operations.SyncAgents(this); + this.syncGroups = new operations.SyncGroups(this); + this.syncMembers = new operations.SyncMembers(this); + this.subscriptionUsages = new operations.SubscriptionUsages(this); + this.virtualClusters = new operations.VirtualClusters(this); + this.virtualNetworkRules = new operations.VirtualNetworkRules(this); + this.extendedDatabaseBlobAuditingPolicies = new operations.ExtendedDatabaseBlobAuditingPolicies(this); + this.extendedServerBlobAuditingPolicies = new operations.ExtendedServerBlobAuditingPolicies(this); + this.serverBlobAuditingPolicies = new operations.ServerBlobAuditingPolicies(this); + this.databaseBlobAuditingPolicies = new operations.DatabaseBlobAuditingPolicies(this); + this.databaseVulnerabilityAssessmentRuleBaselines = new operations.DatabaseVulnerabilityAssessmentRuleBaselines(this); + this.databaseVulnerabilityAssessments = new operations.DatabaseVulnerabilityAssessments(this); + this.jobAgents = new operations.JobAgents(this); + this.jobCredentials = new operations.JobCredentials(this); + this.jobExecutions = new operations.JobExecutions(this); + this.jobs = new operations.Jobs(this); + this.jobStepExecutions = new operations.JobStepExecutions(this); + this.jobSteps = new operations.JobSteps(this); + this.jobTargetExecutions = new operations.JobTargetExecutions(this); + this.jobTargetGroups = new operations.JobTargetGroups(this); + this.jobVersions = new operations.JobVersions(this); + this.longTermRetentionBackups = new operations.LongTermRetentionBackups(this); + this.backupLongTermRetentionPolicies = new operations.BackupLongTermRetentionPolicies(this); + this.managedBackupShortTermRetentionPolicies = new operations.ManagedBackupShortTermRetentionPolicies(this); + this.managedDatabases = new operations.ManagedDatabases(this); + this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies = new operations.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies(this); + this.serverAutomaticTuning = new operations.ServerAutomaticTuningOperations(this); + this.serverDnsAliases = new operations.ServerDnsAliases(this); + this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this); + this.restorableDroppedManagedDatabases = new operations.RestorableDroppedManagedDatabases(this); + this.restorePoints = new operations.RestorePoints(this); + this.managedDatabaseSecurityAlertPolicies = new operations.ManagedDatabaseSecurityAlertPolicies(this); + this.managedServerSecurityAlertPolicies = new operations.ManagedServerSecurityAlertPolicies(this); + this.sensitivityLabels = new operations.SensitivityLabels(this); + this.databaseOperations = new operations.DatabaseOperations(this); + this.elasticPoolOperations = new operations.ElasticPoolOperations(this); + this.capabilities = new operations.Capabilities(this); + this.databaseVulnerabilityAssessmentScans = new operations.DatabaseVulnerabilityAssessmentScans(this); + this.managedDatabaseVulnerabilityAssessmentRuleBaselines = new operations.ManagedDatabaseVulnerabilityAssessmentRuleBaselines(this); + this.managedDatabaseVulnerabilityAssessmentScans = new operations.ManagedDatabaseVulnerabilityAssessmentScans(this); + this.managedDatabaseVulnerabilityAssessments = new operations.ManagedDatabaseVulnerabilityAssessments(this); + this.instanceFailoverGroups = new operations.InstanceFailoverGroups(this); + this.backupShortTermRetentionPolicies = new operations.BackupShortTermRetentionPolicies(this); + this.tdeCertificates = new operations.TdeCertificates(this); + this.managedInstanceTdeCertificates = new operations.ManagedInstanceTdeCertificates(this); + this.managedInstanceKeys = new operations.ManagedInstanceKeys(this); + this.managedInstanceEncryptionProtectors = new operations.ManagedInstanceEncryptionProtectors(this); + this.recoverableManagedDatabases = new operations.RecoverableManagedDatabases(this); + this.managedInstanceVulnerabilityAssessments = new operations.ManagedInstanceVulnerabilityAssessments(this); + this.serverVulnerabilityAssessments = new operations.ServerVulnerabilityAssessments(this); + this.managedDatabaseSensitivityLabels = new operations.ManagedDatabaseSensitivityLabels(this); + } +} + +// Operation Specifications + +export { + SqlManagementClient, + SqlManagementClientContext, + Models as SqlManagementModels, + Mappers as SqlManagementMappers +}; +export * from "./operations"; diff --git a/packages/@azure/arm-sql/lib/sqlManagementClientContext.ts b/packages/@azure/arm-sql/lib/sqlManagementClientContext.ts new file mode 100644 index 000000000000..e4015c4da383 --- /dev/null +++ b/packages/@azure/arm-sql/lib/sqlManagementClientContext.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-sql"; +const packageVersion = "5.7.0"; + +export class SqlManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + subscriptionId: string; + + /** + * Initializes a new instance of the SqlManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The subscription ID that identifies an Azure subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.SqlManagementClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/packages/@azure/arm-sql/package.json b/packages/@azure/arm-sql/package.json index b0b284534c1b..e28a3903a0cb 100644 --- a/packages/@azure/arm-sql/package.json +++ b/packages/@azure/arm-sql/package.json @@ -4,8 +4,8 @@ "description": "SqlManagementClient Library with typescript type definitions for node.js and browser.", "version": "5.7.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -43,8 +43,7 @@ "esm/**/*.js.map", "esm/**/*.d.ts", "esm/**/*.d.ts.map", - "src/**/*.ts", - "README.md", + "lib/**/*.ts", "rollup.config.js", "tsconfig.json" ], @@ -53,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-sql.js.map'\" -o ./dist/arm-sql.min.js ./dist/arm-sql.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "autoPublish": true + "sideEffects": false } diff --git a/packages/@azure/arm-sql/tsconfig.json b/packages/@azure/arm-sql/tsconfig.json index 87bbf5b5fa49..51ea90961ce5 100644 --- a/packages/@azure/arm-sql/tsconfig.json +++ b/packages/@azure/arm-sql/tsconfig.json @@ -14,6 +14,6 @@ "outDir": "./esm", "importHelpers": true }, - "include": ["./src/**/*.ts"], + "include": ["./lib/**/*.ts"], "exclude": ["node_modules"] }